Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure one or multiple NI 9178 with modules?

I usually drop a "DAQmx device" control, let him have the value "cDAQ1" or DAQmxSystem.DevNames[0]  (that is the first cDAQ found in the system, at the moment of the call of the property node).

 

From there I just append strings like "Mod1/line0" , or "Mod2/line0:3" , to get to my module and then call the appropriate VI to read/write.

 

I use NI 9178 usb as chassis, then 4x NI 9435, 2x NI9472, 1x NI 9221 and 1x NI 9263

 

Almost always I have only 1 chassis connected, but for some product tests I must connect 2 of them

 

My questions are:

 

  1. Are there "best practices" or better methods to address my modules? should I wrap DAQmx VIs? should I use MAX configuration? I develop test software, so end result is exe file, and the software is deployed and used to 10 PC in production line.
  2. If I use 2 chassis, with different modules into them (for example one has 8 modules, the other has only 3 modules), how can I differentiate them? How can I refer to one of them? how can I say to the user "cDAQ1 is the one with ....", and cDAQ2 is the other?
  3. How can I make configuration invariant? Chassis are automatically named cDAQ1, 2, 3... as soon as they are connected to the computer the first time. So the same chassis can be called "cDAQ1" on one computer but cDAQ3 on another just because that PC saw two other chassis before.
0 Kudos
Message 1 of 4
(2,773 Views)

Hi friend

I would like to answer your questions one by one:

1) To access several different modules and the same task I recommend the method explained in the following link, Easily Synchronize and Trigger NI-DAQmx with Channel Expansion. However, what you are doing is not incorrect, is indeed pretty valid.

2)You can rename the chassis using NI-MAX, then it will be easier to identify it on LabVIEW.

3)Unfortunately, there is not a way to perform this, because this will require an extra memory that the chassis does not have in order to store the name.

 

I hope this to be useful. Thanks for Contribute to the community.

 

 

Message 2 of 4
(2,746 Views)

Appending "Mod1/line" to "cDAQ1" will break if the modules are renamed. Consider using the DAQmx Device Chassis.ModuleDevNames property node in order to enumerate the names of modules within a chassis.

 

Unfortunately there isn't a way to store an invariant name with a physical piece of hardware. The closest piece of invariant-but-unique information that you get is the serial number (DAQmx Device DevSerialNum property).

 

For your case of two chassis with different modules in them, if you know a priori which modules you'll have, you could use information from the DAQmx System and DAQmx Device property nodes in order to detect which chassis is which based on which modules they have in them (for example, if "cDAQ2" has a 9435 and a 9472 in it, it is "test fixture A", and if it has 8x 9401s then it is "test fixture B"). Otherwise, if they're the same, then the only differentiating information will be the serial number.

——
Brandon Streiff
ni.com/compactdaq · ni.com/daq
Message 3 of 4
(2,736 Views)

I have discovered another thing.

 

MAX registers a chassis/module serial number to a name (for example : serial number 0x123456 is NI 9178 named "cDAQ1" , serial number 0xaabbcc is NI 9135, named "cDAQ1Mod1", ecc...)

 

Once they are "registered" in a PC, they are remembered.

If they are disconnected, you see the "x" red icon.

When they come online, they get the same names they had.

 

So we have 6 Chassis (8 slots), all with the same modules.

 

We labeled them, 1 to 6, and set their name accordigly (cDAQ1 , ..., cDAQ6)

 

Now, I export the MAX configuration to a file.

 

If I delete/change their name, I can import this configuration, and have it restored as before.

 

BUT

 

If I do the same in another computer, it doesn't work, the only option I get when I import is to create virtual devices.

 

This import operation really does work only within the same computer.

PC1 : Export config ---> then Import ---> OK

PC1 : Export config ---> go to PC2 and import PC1 config ---> NO, can only create virtual devices

 

 

Why?

 

In INI or NCE there is no info about the computer, I saw the data inside, they are compatibile.

 

I have the same computers, same OS, same MAX version, all the same

same hardware.

BUT configuration can't be imported from one PC to another (exact equal) PC? wtf 😄

0 Kudos
Message 4 of 4
(2,722 Views)