Discussion:
Multiply USB-6501's on the same pc
(too old to reply)
AndersWB
2007-06-29 14:10:14 UTC
Permalink
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 BrandtBK Medical
Dennis Knutson
2007-06-29 14:40:14 UTC
Permalink
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 <a href="http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=18350&amp;query.id=6131#M18350" target="_blank">http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=18350&amp;query.id=6131#M18350</a>.
AndersWB
2007-07-02 08:40:13 UTC
Permalink
Thank's. Works like a charm!
&nbsp;
Don't know why i hadn't noticed that method.

Continue reading on narkive:
Loading...