05-14-2012 06:07 AM
I realize this must be a stupid question but i can't find a solution...: I wrote a program that uses a USB DAQ card (6341), and will be deployed on multiple PCs. I created DAQmx tasks on one PC, and exported the configuration for the next PC. Unfortunately, on the first PC the DAQ card got recognized as device 3, while on the second PC it got recognized as device 1. Since I am using lots of ports and channels of the DAQ card, it was a big hassle to switch them all from device 3 to device 1. Is there a better way to do this than manually switching every single channel, e.g. by telling MAX to identify a device with a specific device number?
05-14-2012 06:36 AM
Solution 1 is to rename the devices to /dev1 in MAX on each of the PCs. There's no guarantee that they will stay as /dev1 but it's a quick way to do it.
Soultion 2 is to have a drop down list that shows all attached devices and have the user select which one to use. It would require modification to your code to use the selected device (maybe use a global) but it would allow for the various devices names.
Solution 3 is to add some intelligence to your program to go and look for the device and use the name it finds. You would still need to modify your code to use whatever name was found but it would be automatic rather then having the operator make the decision. If you only have the one DAQ, it should be pretty easy to do. Just query MAX and get the device name.
In the past, I've had systems with multiple DAQs and I searched for the serial number (which doesn't change) and used the associated device name (which could change). There are a lot of ways to keep track of the hardware in a system so these are just a few suggestions that I've used.