01-03-2011 12:13 PM
My colleagues and I have several VIs that get used with more than one fixture and so they have different DAQs on each fixture. Right now we just make sure that the DAQ has the same name in each DAQmx and everything works well enough. Most of our programs use the DAQ assistant.
Now we're trying to downsize the number of computers we are supporting and allow multiple fixtures to be plugged in to the same computer. This means we have the case where Fixture 1 with DAQ 1 and Fixture 2 with DAQ 2 are both using the same program. This is not running the program at the same time, rather each fixture will be plugged in one at a time. What I want to do is make it so I can swap hardware and handle any program changes in software without having to have the user mess with DAQmx. What is the easiest way to do this? Looking through the forums it looks like we need to move away from the DAQ assistant, is there an easy way to do this?
01-04-2011 10:05 AM
First stab...try to use the DAQmx System Property Node to get a list of all the devices in the system, then use a DAQmx Device Property Node to figure out what type of device it is and then run whichever DAQ Assistant program (you can make it into a subVI) you want for that type of board.
Does that help accomplish what you want to do?
-gaving
01-04-2011 01:19 PM
This is the solution I came up with... First find the name of the connected device:
1
Then use that name and convert the express to code and modify that to accept the name that is found in the first vi:
The limitation is that the first listed daq is the one used so there is less control. But this does seem to accomplish what I needed. Thanks for the ideas gaving
01-04-2011 01:43 PM
An elegant solution!! Well done!!
Just to follow up on your "limitation", you could add an "OR" to your while loop stop condition and add other logic...like based off of "product type" or even "serial number". (you could pass in the serial number you expect to your subVI)
Anyway, just a few ideas. Good luck!
-gaving