Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiply USB-6501's on the same pc

Hi all,
I'v got a question concerning the USB-6501, USB to Parallel interface.
In our production area we've got four boxes with different testequipment in them. In each box a USB-6501
is installed to control the interfacing. A Labview program is then installed on multiply testpc's, to
control the four boxes.
When i, for the first time, connect a USB-6501 device to one of the testpc's i can, in Measurement and
Automation studio, see that the device is given the handle "Dev1". As it is now, i then create a "task" from this device handle, which i'm then using for controlling the device from Labview.
My problem is that when i now disconnect the USB-6501 device and connect one of the other boxes, with a
different USB-6501 interface, this device is then given the handle "Dev2". Now i would have to go and
change the task i created ealier, for my Labview program to work. The old device would still be
recognized as Dev1 if i would reconnect it again, and i would have to change the task again. With four boxes this would be quite a hassle, and downright unaceptable for our production.
If i could have it as i wanted, i would want my Labview program to create the "Task" on-the-fly, everytime i run the program. This routine would then search for any connected USB-6501 devices and create the task from this. In this way i would also be independent of having to create a task, when i need to create a new testpc, which is most desirable.
Does anyone out there have a solution for my problem?
Thank you all in advance,
Anders Winther Brandt
BK Medical
0 Kudos
Message 1 of 3
(3,464 Views)

Creating a task in MAX is optional. You can use the DAQmx System property to get a list of all devices and the DAQmx Device property called ProductType to determine what each device is. If you were to look at the shipping DAQmx examples, you would find very few that depend on a pre-defined task in MAX. Most of them do all of the setup in the LabVIEW program.

For an example on how to list the available devices, see http://forums.ni.com/ni/board/message?board.id=250&message.id=18350&query.id=6131#M18350.

0 Kudos
Message 2 of 3
(3,458 Views)
Thank's. Works like a charm!
 
Don't know why i hadn't noticed that method.
0 Kudos
Message 3 of 3
(3,436 Views)