02-18-2022 12:47 PM
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?
02-18-2022 01:25 PM
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.
02-21-2022 10:52 AM
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.
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