LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 600X Enumeration

I need to communicated with two or more USB 6000 series devices. The user interface must have a selection of connected device IDs for the user to select from. So seek a means of enumerating the plugged in USB 6000 devices. I also need this enumeration to update whenever one is plugged in.

 

Are the vi's:

niModInst Open Installed Devices Session.vi

niModInst Get Installed Device Attribute (String).vi

The appropriate VIs to perform this enumeration?

 

If so which of the drives is the correct one to select for the Opener VI? Is it "NI-DMM"?

 

Is there an Event Frame event that will trigger when a USB 6000 series device is plugged in?

0 Kudos
Message 1 of 3
(657 Views)

As long as they're the same devices, just load up MAX and change their names. Then the user can just pick 'em from a list. MAX will handle their names across unplug/replug/etc.

 

I don't think there's an Event structure case that would respond to a new device being plugged in. You'll probably have to poll it.

0 Kudos
Message 2 of 3
(638 Views)

There are some Property Nodes that will let you interrogate the DAQmx Devices that are connected to your PC.  I'll give you their names, and if you use Quick Drop (type ^<space> to open Quick Drop, then type the name), it will "drop" the function on your Block Diagram.

  • DAQmx System Property Node.  This has the useful "DevNames", which is an Array of DAQmx "Device wires" for all the DAQmx Devices that MAX sees.  I bring this Array wire into a For Loop to use with the next Property Node.
  • DAQmx Device Property Node.  Wire the "Device Wire" to the top "Active Dev" input.  It will return a bunch of useful information, including "Product Type" (a String that might say "USB-6001") and "DevSerialNum" (a U32 that, if displayed in Hex, should match the NI Serial Number of a specific Device).

I wrap this functionality inside a little sub-VI, sometimes with additional code to detect whether I have 0 "compatible" devices (a Dialog Box pops up and says "Plug in the Frammistat, dummy!"), exactly 1 device (so it just uses it), or several compatible Devices ("Which Camera should I use?") (similar code also works with IMAQdx, by the way).

 

Bob Schor

0 Kudos
Message 3 of 3
(603 Views)