08-03-2012 03:34 PM
I’ve hit a bit of a snag in my test programming in teststand, do any of you know of a good tutorial or explanation on the NI website that involves switching with more than one of the same device, basically I want teststand to choose between two DMMs and pick the one that’s currently not being used. Or if anyone cares to explain that would be great, please provide some example code if possible.
08-06-2012 12:46 PM
Hello DanHHunter,
Which programming language are you using and what devices?
NI hardware will populate in MAX with different device IDs that you can pass to your code. If you try to access a device that is currently being used, you will receive a resource error. The same would happen when trying to open a connection to any other kind of hardware. I simple method would be to try an open one connection, if the connection returns with an error, you can try to open the connection with the other device. Otherwise you may be able to send the device a command to determine if it is in use or not.
08-06-2012 04:23 PM
What you're trying to do is accomplished with the Auto Scheduler in TestStand.
See the C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 2010 SP1\Examples\Auto Schedule folder for a demo of how to do it.