LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set which USB-NI-9221 device I am communicating with in LabVIEW?

Solved!
Go to solution

I have 2 USB NI-9221 DAQ installed on one computer, and am trying to pin down which DAQ is getting assigned to each part of my program.  I've set up one subvi to use Dev1 channel names and the other to use Dev2 channels, but when I run the compiled code on the target PC the DAQ channels assignments appear to be reversed!  How do I pin them down?  I've tried removing both devices in MAX and pluging them back in in different order, but they are still crossed up.  I've tried swapping the channel names in LabVIEW but it's still going to the wrong ones.

 

0 Kudos
Message 1 of 5
(3,423 Views)
Solution
Accepted by topic author scottmc

You need to swap the device names in MAX...not in LabVIEW.

 

Unplug one device.  Open MAX.  Look at "devices and interfaces".  Which one shows that the device is not plugged in?

 

Now you know.  Now make some stickers which say "Dev1" and Dev2", and put them on the appropriate devices.

 

Now write your code accordingly.  🙂

0 Kudos
Message 2 of 5
(3,413 Views)

scottmc,

 

Device names can change so I understand how you can be confused.  My advice to you (in addition to what Diane recommended) is that when you click on a Device in MAX you should see an entry that lists the serial number of the device like: DDE595.  You can then correlate this to the serial number of your specific device so that you know which one is which.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 3 of 5
(3,393 Views)

On a new machine with running Windows the first pluged in USB device will get Dev1 and the second will get Dev2.

In the case you plug in the USB devices while Windows is not running and you will start Windows the device which is found first will get Dev1.  The sequence is the same as shown in the Device Manager >> USB Controllers. Hopefully you have a good documentation of the motherboard to find out which port is located where.

 

Just as background information why you will see the devices swaped.

And don't swap the devices before deleting them in MAX. Otherwise you will get Dev3 and Dev4.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 5
(3,383 Views)

I was able to get this worked out, thanks for the tips.  I was able to change my fixturing around so that I was able to do my testing with a single DAQ, but the double DAQ tricks listed here did work.

 

0 Kudos
Message 5 of 5
(3,252 Views)