11-06-2014 10:22 AM
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?
11-06-2014 12:04 PM
You can change the Name of a device in settings in NI MAX. Change names of each DAQ in each system to match.
11-07-2014 04:47 PM
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
11-07-2014 05:34 PM - edited 11-07-2014 05:38 PM
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.
11-08-2014 08:35 PM
Jeff,
I'm very interested ...
BS
11-09-2014 12:30 AM
I'm interested enough to bookmark and kudo because I have a feeling this can be extremely useful to me later on.
11-10-2014 07:37 AM - edited 11-10-2014 07:47 AM
@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 If the device was not found..ouput a custom error. Hopes this helps!
error found....
11-10-2014 08:55 AM - last edited on 08-19-2024 02:09 PM by Content Cleaner
@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/
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
11-10-2014 09:01 AM
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
11-10-2014 09:31 AM
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!