LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

We have multiple DAQ systems and multiple laptops. How do we setup our laptops where each DAQ has the same name on each computer?

We have multiple DAQ systems and multiple laptops. How do we setup our laptops where each DAQ has the same name on each computer? If we import .nce, it simulates the device in NI MAX. When the DAQ is connected, it creates a new DAQ with a new name instead of using the simulated DAQ. What is the best way to set this up?

0 Kudos
Message 1 of 15
(3,969 Views)

You can change the Name of a device in settings in NI MAX. Change names of each DAQ in each system to match.

 

Capture_NI MAX.PNG

 

 

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 2 of 15
(3,955 Views)

I've also wondered about this.  In our case, we have two PCs running the same program, a behavioral Training Program.  If the PC is connected to Station 1, which uses a Joystick as input, it "knows" to use the Joystick version of the program because it "sees the Joystick" (duh) -- if it doesn't see the Joystick, then it "must be" at Station 2.

 

Each Station uses the same NI USB-6501 to handle the rest of the I/O.  When PC 1 is connected to Station 1, its 6501 shows up as "Dev 1", and all is good.  Similarly, PC 2 connected to Station 2 also sees its 6501 as "Dev 1".  But if I switch the PCs, so PC1 is connected to the 6501 at Station 2, MAX says "Oh, this is a different 6501 from Dev 1, I better call it Dev 2", and my Task, designed for Dev 1, fails.

 

MAX clearly can distinguish these devices, as it knows its Serial Number.  What would be nice would be to have code that looks at whatever USB device is plugged in, gets its serial number, and (if it is the appropriate model device) assigns it the appropriate Name to match the Task.  That way, I can write a Task for an NI USB-6501 and, at Run Time, if such a gadget is connected, my code will use it.

 

Is this possible?  I'll bet this would also answer the original poster's question ...

 

Bob Schor

0 Kudos
Message 3 of 15
(3,899 Views)

If we are talking about USB DAQmx devices , NI DMMs and NI Scopes (But not the SPI devices)

 

Create an exe to rename the alias when NI Device Manager sees it plug in.  Edit the right registry keys and you can have that exe in the DEV MON list just check "Allways do this for this device"

 

Some mad Google skills will show you examples (Maybe even some by me!)  Or else I'll have access to an example on Monday (I left that thumb drive at the office today)

 

It came in very handy when I delivered multiple fixures with USB DMMs  and the user kept moving them between stations.


"Should be" isn't "Is" -Jay
Message 4 of 15
(3,890 Views)

Jeff,

     I'm very interested ...

BS

0 Kudos
Message 5 of 15
(3,837 Views)

I'm interested enough to bookmark and kudo because I have a feeling this can be extremely useful to me later on.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 15
(3,822 Views)



@NavyNick wrote:

We have multiple DAQ systems and multiple laptops. How do we setup our laptops where each DAQ has the same name on each computer? If we import .nce, it simulates the device in NI MAX. When the DAQ is connected, it creates a new DAQ with a new name instead of using the simulated DAQ. What is the best way to set this up?


Each Daq has a unique Hex SerialNum, sometimes you might have two of the same type,but the physical channels are configured differently with their ActiveDev# from computer to computer. We hard code(constant) what test box we use with what software the physical channel were setup for. We then feed(ini file) into the software the Daq SerialNum associated with that specific Test Box#.This was done so that incase the Daq was ever replaced, that SerialNum was configured specifically for thos PysicalChannels for that particular software to run on. So in this example, you can see that from my development computer my Daq was Dev999...but on a different computer it sees it differently with a different Dev# which is dependent on which devices are connected to it.Here we look for the ActiveDev's with their SerialNum on that computer, we then look to see if it matches the Daq SerialNum already configured to the software needed to run. Once found, concatenate the output with the new Dev#.Then we insert and replace this into the configure PhysicalChannel string using Regex.Also, keeps me from changing it from MAX, which we have done in the past Smiley Tongue  If the device was not found..ouput a custom error. Hopes this helps!  Smiley Wink

Configure My Daq to ActiveDevNumBogus.png

error found....

Error 5001.pngError 5001.png

0 Kudos
Message 7 of 15
(3,771 Views)

@Bob_Schor wrote:

Jeff,

     I'm very interested ...

BS


OK, So I tracked down my original sources:

http://www.ni.com/white-paper/10686/en/ 

https://forums.ni.com/t5/LabVIEW/how-to-programmatically-configure-USB-devices-So-that-each-time/m-p...

 

The only irritating thing is that you must clear all device associations from NI Device Monitor SO, Adding a new device style means setting up all new devices all over again.  (Hmmm a clear selective associations would be nice)  Or you need to regedit stuff that is not very well documented


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 15
(3,747 Views)

Thank you!  This is extremely helpful.  I had not played around with the plethora of DAQmx Property Nodes, and had not realized that there is a lot of "hidden information" there.  I'm currently writing some demo code to see if I can take an existing Task Name, created for a particular device (say "Dev1", whatever that is), inventory my System Devices to see if a "compatible" device exists on my system (for example, my actual task is built for a USB-6501, for which I don't have a "spare" for development, but I do have a USB-6009 with similar Digital I/O, so could develop and test with that), and update the Task Channels if necessary to match the actual device.

 

Don't (yet) know if this will work, but it's the first glimpse I've gotten as to how to code DAQmx to be more "device-flexible".

 

Bob Schor

0 Kudos
Message 9 of 15
(3,743 Views)

Well Bob, then you really need to add a kudos here It certainly should be do-able!

 

Developing with simulated devices is how I usually go though my day.  Keeping the DAQmx'y stuff in the LabVIEW project is helpful as well.  except, when it comes time to integrate the system-  I prefer my tasks in MAX on the target so I can troubleshoot hardware!-  Somebody allways wires things "to print" - it won't ever work that way!Smiley Embarassed


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 15
(3,729 Views)