LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

National Instruments Questions on USB DAQ Devices

What is the default DAQmx setting for a USB device name, when installed for the 1st time?  How are additional USB hardware handled when they are connected to the USB port?

 

Does DAQmx recognize specific USB devices by their serial numbers?

 

Does DAQmx keep all previous instances of recognized devices, even when they are not connected to the USB port?

 

If a USB DAQ device is exchanged with an identical product, how will DAQmx react with its device instances?

 

What will DAQmx do to a device instance if power is removed from the USB DAQ hardware, while the computer is still on?

 If we rename a device in DAQmx, and refer to that name in our software, can we expect that the device name will not change and thus the software is predictable to always recognize the hardware?
PJZ
0 Kudos
Message 1 of 9
(4,051 Views)

Hi GC - LF,

 

Thanks for posting to the NI Discussion Forums! Hopefully, I can provide some insight into this topic. By default, DAQmx will assign the name "Dev1" to the first device you install. Additional devices will be "Dev2, Dev3, Dev4, ..." and so on, depending on the availability of the name (for example, if there is a Dev1, Dev2, and Dev4 already in the system, then the next device installed will default to Dev3 and the next after that will be Dev5).

 

Each device is recognized by its serial number and will have a unique instance in Measurement & Automation Explorer (MAX). When a device is disconnected or removed, the instance of that device will stay in MAX until it is manually deleted, though it will now appear with a small red 'X' icon. If an identical product is installed, it will be treated as a new instance since it will have a different serial number. If power is removed from a USB device, MAX will keep an instance of that device, though any attempt to access it will result in an error that the specified resource is invalid.

 

Finally, if you give a specific name to a device, MAX will always remember that name regardless of whether you unplug it or not, though the name will only be valid for the specific serial number. In this way, your software can be made to access this specific resource, though any attempt to swap the application with a new device will force you to change the name of this new device in MAX to match the name in software (the original device will have to be removed from MAX at this point so you don't have a name collision). Please let me know if you have any further questions. Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 2 of 9
(3,998 Views)

Hello,

 

thank you for the answer to the last post, for I have a quite similar question but being a bit more specific.

I am working with LabView version 8.2 (update to 8.6 possible if necessary) and I am using two NI cDAQ-9172 devices (not at the same time but it is possible to use either of them). Because I am used to program independendly of the computer the program is running on, I have the problem to organize the devices in connection with the order in which the two similar devices are connected to the computer the program is running on (one will be named "cDAQ1" and the other "cDAQ2"). My programmed LabView VI is just using device "cDAQ1" and if both cDAQ-9172 devices are connected, I have a problem when using the hardware referred to cDAQ2 instead of cDAQ1.

 

Now I would like to implement a structure to always automatically delete the installed USB DAQ devices from the MAX. Is there a possibility to handle MAX features like to delete the

already installed devices in LabView itself?

 

Thank you very much and feel free to ask if you dont understand my english.

 

Best regards

H. Helbing

0 Kudos
Message 3 of 9
(3,974 Views)

Hello Helbing,

 

Unfortunately, you cannot delete the devices in MAX programmatically from LabVIEW. You can, however, use the DAQmx System and DAQmx Device Property Nodes to query device information such as what is in the system and what the serial numbers are of each device (if the device is disconnected from the system, it will not be returned by this property node). You may be able to implement a method in software to query and compare what is returned to be able to choose which device to use. These property nodes are found in the LabVIEW functions palette under Measurement I/O » NI-DAQmx » Advanced » System Setup.  Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 4 of 9
(3,946 Views)

On a related topic - I'm trying to uniquely identify different ni-USB devices. 

 

I have several similar fixtures, each with a USB-6009 on board.  They can be used anywhere in the building here at work, and they are interchanged on different computers, etc. and run by different people.  My challenge is to use the right calibration constants for each system.  Each fixture has sensors that I've calibrated individually.

 

Right now I can ID them from the USB device's serial number.  I query the s/n of the USB module. Then I have a lookup table to match that s/n with the sensor calibration for that fixture.  This works well, but I have to deploy that cal data (lookup table) out to anyone who might use the fixture. 

 

It would be great to save calibration constants (or just any sort of string data) on board the USB-6009.  Is there any way to do this?  Do the modules have any flash-memory (like scratchpad memory) that is accessible to the user?   My current method works but storing data on-board the fixture would be even better. 

 

Any ideas you have would be great.  Thanks! bb

0 Kudos
Message 5 of 9
(3,703 Views)
No.
0 Kudos
Message 6 of 9
(3,692 Views)

Why not just store the data on an USB stick for 10 € or less. But lock it to the device by physical means (propably more expensive), otherwise they get misused/displaced.

 

Felix

0 Kudos
Message 7 of 9
(3,686 Views)

Unfortunately, there is no way to do this with these devices. The closest way to do this on a DAQ board would be to add a user-defined comment to the device when performing an external calibration (using the Cal.UserDefinedInfo property). This may not be ideal since it can only be done when performing an external calibration adjustment, and the size of the string is limited depending on the device you are using. However, this will not be an option with a USB-6008/9 such as in your application since it cannot be calibrated.

 

user_defined_comment.png

Daniel S.
National Instruments
0 Kudos
Message 8 of 9
(3,679 Views)
The device has 12 digital I/O points.  If you have enough unused digital input points, you could hard code a serial number into them.  Associate each serial number with a unique binary number.  Hardwire wire your digital inputs to be either on or off on each device.  When you connect your USB, have your program read the digital inputs and based on their on/off status, you determine the binary number and will know which unique serial number is associated with it.  As long as no one messes with those wires, you should be just fine.
0 Kudos
Message 9 of 9
(3,673 Views)