Hello -
Environment: Windows 10, LabVIEW 2013, and a collection of USB-based serial peripherals.
I have a system with multiple peripherals with USB-to-Serial interfaces (just one USB per device but many devices). I’ve no control on what order cables are plugged into a Windows 10 computer running LabVIEW and so VISA references to peripherals can get jumbled.
Making operators “guess” as to which VISA is “connected” to which peripheral is not a good idea. Now to the ProXR24. How to “find” the controller?
I have a loop that iterates over the results of a VISA Find Resource. For each resource, code in the loop determines if the resource is a serial port, if it is a USB serial port, and then attempts to call the ProXR Initialize VI. Initialize always works… because all it does is set up serial port parameters.
Next, I call Set Automatic Refreshing On Off with a FALSE argument to turn refreshing off. I’m making something of an unsafe assumption that this will fail if the attached peripheral is not the ProXR. So far, this seems to work: if the peripheral at that VISA reference is not a ProXR then the call fails and the loop iterates to the next VISA reference. If it is the ProXR then the call succeeds and my code then assigns that VISA reference for later use.
But it’s not an exclusive open. Initialize.vi opens the VISA reference with VISA defaults and FALSE for Duplicate Session. Searching for other peripherals then gets very messy.
My questions:
-
Is there a way to identify the ProXR from an open VISA reference without running a VI that alters the state of the ProXR? Perhaps from a property setting?
-
Could the “duplicate session” and “open mode” inputs to VISA Open be brought out to Initialize.vi to allow for an exclusive lock on the VISA session?
Your time is appreciated.