Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Devices Handling Same Tasks

Hi,
 
I am developing a program in LabVIEW 8.2 that interfaces to an NI-6501 DIO device.  I have created several tasks in MAX and everything works fine from LV calling the saved tasks etc. 
 
My question is how do I make these tasks accessible by several different 6501's?  I have a box that I am making ~10 of and each has a 6501 inside.  I would like a computer to be able to use these tasks to run any of the 10 boxes.  If I go into MAX each time I plug in a new box I have to rename the Device to Dev1 in order for my task to work.  My tasks are configured as Dev1/port0/line1 etc.  Only 1 6501 board will be plugged into the computer at one time so fighting over the board resources will not be a problem.  So is there an elegant way to make any 6501 that is plugged into the computer use the same tasks that I created in MAX without a user having to reconfigure MAX each time?
 
Thanks,
David
0 Kudos
Message 1 of 3
(3,569 Views)
Currently, your code references attached devices by the id 'Dev1.'  Change the constant that you've wired in the code to be the name shown in MAX.  It's not necessary to  rename the device in MAX at all, just have your code reference the name of the device in use.  Be careful that you don't reference a device that's not currently plugged in, or you will receive an error.

I've actaully attached a VI that you can use to read the names of all your attached DAQmx devices.  Use these values as the referene you pass to your code.

Let me know if you have any questions!
Elijah Kerry
NI Director, Software Community
Message 2 of 3
(3,551 Views)
Elijah,
 
Thank you for the reply.  It's not quite the answer I was looking for since I used MAX to create my task it specifies which device I am locked to.  However, I've changed how tasks are handled in my program, I am no longer creating static tasks in MAX, so your solution works well.  Thanks for the heads up on how to query which devices are present on the system.
 
Thanks again for your help!
 
David
0 Kudos
Message 3 of 3
(3,529 Views)