ProXR+ZUSB+LabVIEW: Identifying peripherals


#1

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:

  1. 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?

  2. 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.


#2

Hi, I will try to answer your questions and propose some solutions.

  1. You can use the Self-Test VI available in the Instrument driver to identify the ProXR board. But this technique won’t work if you intend to use multiple ProXR boards in future.
    A better solution would be to bind the ProXR board to a comm port. The ProXR board has a FTDI chip for RS232 to USB conversion. You can use the utilty available here https://www.ftdichip.com/Support/Utilities.htm?#Comport_Assignment to bind comm port to the FTDI converter.
    Moreover they have some great utilities like https://www.ftdichip.com/Support/Utilities.htm#MicrosoftUSBView which shows the Product serial number and IDs. So you can read this information for the comm port and identify your instrument. LabVIEW example code is available here https://www.ftdichip.com/Support/SoftwareExamples/FTDIChip-ID.htm. Also, you can setup custom ID into any converter chip associated with a particular instrument using https://www.ftdichip.com/Support/Utilities.htm#FT_PROG and then put a check for this ID in your code, this way you can even put authentication and registration features in your application.

  2. yes it can be taken out by creating controls for these inputs. But I didn’t understand the need for it. Can you please explain how searching for other peripherals gets messy?

Thanks