Identifying Multiple Identical USB Raw Devices with NI-VISA

Updated Apr 24, 2019

Reported In

Software

  • Measurement & Automation Explorer (MAX)
  • LabVIEW

Driver

  • NI-VISA

Issue Details

I used the VISA Driver Development Wizard to develop a USB driver for my USB RAW device. When I plug the USB device in, it is detected by Measurement & Automation Explorer (MAX) and I can communicate with the device without any problems. 

I have a second USB device which has the same Product ID (PID) and Vendor ID (VID) as the first USB device. When I individually insert the USB devices, they work without any problems. However, when I insert both at the same time, only one is detected in MAX. What could be causing this problem?

Solution

Typically, a USB RAW device resource name is something like USB0::0x046D::0xC01A::NI-VISA-0::RAW. Then the second identical device would use USB0::0x046D::0xC01A::NI-VISA-1::RAW as the name. If the devices have a serial number programmed in, NI-VISA will replace NI-VISA-x with the actual serial number. So the resource would become USB0::0x046D::0xC01A::DeviceSerialNumber::RAW 

To resolve this issue you will need to ensure that each USB device has a distinct serial number for it to be identified by NI-VISA and show up in MAX correctly.

Additional Information

You are unable to just assign an alias to the VISA resource to get them to show up separately since VISA needs to use the VISA resources to associate multiple devices.