Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to have always my card in Dev1 ?

Hi.

 

I have a ni4472 in my rack.

To communicate with it I open /Dev1/ai0

 

If I replace the board, and I make a nilsdev I can see that my board is now in Dev2 and that Dev1 is not used.

 

As I don't know what the customers do with the spare boards, I might be in this case.

I could enumerate the device and use dev1 or dev2 or devx depending on the cases, but I would prefer to have always Dev1

 

I guess that the config is stored in a file somewhere.

 

Do you know where?

Do you know a clean way to have always dev1 ? (remove a file, patch a file?)

 

Thanks

0 Kudos
Message 1 of 4
(3,428 Views)

DAQmx configuration information is actually stored in a database - not a file.

 

That being said, the best way to ensure that a device has a specific name is through the import/export feature (typically used in deployment scenarios).

 

If you are not familiar with this feature, here's an introduction:

1. From MAX, you can select File>>Export to export your configuration for any or all devices/tasks/channels (I'd recommend exporting to ini or txt file).

2. On a system, you can import that configuration by selecting File>>Import, or you can programmatically import with a MAX Copy Configuration function.

 

As well, please note that I would not recommend using "Dev1" for your reserved name because that is a default name.  If you name it something like, "TemperatureDev", for example, you will never have a conflict.  (Even with importing a configuration, it will not automatically rename another device using your name).

Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 2 of 4
(3,412 Views)
nilsdev tells me you're using DAQmx for Linux.

You can either use nidaqmxconfig from the terminal to detect and rename your boards, or you can use DAQmx properties in your program to detect and choose the right device. My reccommendation is the second approach.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 3 of 4
(3,405 Views)

Hi

 

Ok, I didn't use nidaqmxconfig yet.

However, as the serial num of the board might change at any reboot, I probably need to have a script that will make an import / patch the file / export...

 

Thanks

 

Chris

 

0 Kudos
Message 4 of 4
(3,388 Views)