From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-18-2015 04:52 AM
Say If I have two or more similiar USB devices, how do I programmatically differentiate them and gave them proper alias?
Using defined digital inputs would help to identify them?
Clement
Solved! Go to Solution.
06-18-2015 04:58 AM
Hello,
First :
How are they recognized by the computer ?
06-18-2015 05:00 AM - edited 06-18-2015 05:02 AM
Hi Astroboy,
What about getting your USB serial number to ID it ?
You can get it using MAX
BR,
Vincent
06-18-2015 05:09 AM
What if it is troublesome to find the serial numbers and the operators just replace another device and install, and started working right away?
06-18-2015 05:17 AM
Following the link below could help you even if this is a french one...
I apologize i couldn't find the english one
http://www.ni.com/getting-started/set-up-hardware/instrument-control/f/usb-connect
I didn't undestand what you mean in your previous post so i hope this general link could help.
BR,
Vincent
06-18-2015 05:45 AM
What USB devices?
Assuming NI-USB-DAQs reading the serial number is the rigth way to identify the USB device.
And easy done with the property nodes.
However, it seems that you want to identify a test setup. So you need to use the (replaceable) USB device to identify what type of setup is connected.
Using spare inputs for this task is a typical way, and need idividual programming. A standard solution for sensor identification is TEDS.
And you can't make it fool proof, since fools are so genious! 😄 😄
06-18-2015 08:56 PM
Ok allow me to explain. I do not know if I have a better idea.
If I have 2 same models of the USB devices, connected to my laptop. These devices are connected to the machine together and each has different purpose to operate.
If they are identified by employing two specified digital input lines. They are connected as bit 01 and bit 10 for each USB device as they play different operations.
Once they are connected and they are auto given aliases. Then temporary tasks are loaded to find find the status of the digital input lines. Once they are identified and given proper aliases and the actual tasks will be loaded and they can be used to perform operation, even wirhout having to find the serial numbers or give them aliases manually.
So if they are swapped or replaced with the same model, it will still work in the same way as long as they are identified by their digial inputs and perform the correct operations.
What do yiou think?
Clement
06-19-2015 02:09 AM - edited 06-19-2015 02:15 AM
Your solution with two DI is a common method. BTW the same method is used with fligth turbine engines, an identifying connector is chained to the turbine and the controller board(s) can be replaced.
I would write a little subvi with DAQmx task in / out and a (type def'd) enum input for the setup, a true/false output (maybe together with a custom error on the error out) and add that after every create task.
If the ID of the the setup fails, output a message and/or enter the auto alias process.
06-19-2015 10:30 AM
Yup I've used, and like the jumper method when extra DIO is available. If you go based on the serial number you might have issues when you swap around hardware. I've often seen during debugging someone will grab a piece of hardware from another tester to see if an issue follows the wiring or follows the hardware. Having external jumpers as a method of identification isn't perfect but I've seen cause less issues than using a hardcoded serial number.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord