Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining DAQmx devices

I need some help setting up DAQmx tasks and channels. I have several (>100) different PXI chassis with different types of DAQmx boards in them. I need to get from a slot number and card type to a device name so I can setup tasks and channels programmatically. I prefer not to use the nipxiconfig utility since this requires super user to run. I prefer not to use nidaqmxconfig since each board in the config files are serial number dependant and that would drive me to save a config file for every one of my chassis and I would also need to be super user to import the config file.

I would like to read a slot number and card type from a text file and programmatically determine a DAQmx device name so I can create tasks and channel. Any suggestions?

0 Kudos
Message 1 of 8
(7,688 Views)

Have you tried posting this question to the NI support forums?  Seems like a question that would be supported, that is if there are "supported" alternatives I guess.

http://forums.ni.com/ni/

0 Kudos
Message 2 of 8
(4,654 Views)

I believe you should be able to use the "DAQmx System" and "DAQmx Device" property nodes to accomplish this (which, unless I'm mistaken, should be available in DAQmx 8.0).  Using the DAQmx System property node to get an array of all the DAQmx device names in your system, you can then use the DAQmx Device property nodes to get the corrosponding chassis number, slot number, and card type.  It's not a direct way to get the information, but with a little bit of code work you can probably build an array that gives the chassis number, slot number, and product type for each device name.

DAQmx Properties.PNG

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 3 of 8
(4,654 Views)

I have already tried this, but if you don't setup the PXI chassis and SBC using the nipxiconfig program, the DAQmx System property node will error out and tell you  that you have not setup the chassis using nipxiconfig.  I would like a method of determining devices that does not require me to use the nipxiconfig program. 

I kind of makes sense that if you haven't told the software what the PXI chassis is, then how does it now how to check what card is in what slot.

0 Kudos
Message 4 of 8
(4,654 Views)

You are correct that you will need to set up your PXI chassis before you can query for the slot from NI-DAQmx.  Different chassis have different configurations with different bus switches that changes the topology of the PCI hierarchy.  Without this information about which chassis is installed NI-DAQmx can't determine the slot.  Do all of your systems have the same chassis type?  Or do you have multiple types of chassis?

Even if you don't configure the chassis you still should be able to determine the device type.  I also think you can get the PCI Bus Number and the PCI Device Number, which you might be able to use to figure more out about your system layout, although I still think it will be difficult to figure out the PXI slot without configuring the PXI chassis.

0 Kudos
Message 5 of 8
(4,654 Views)

I know that nilsdev will supply me with the product type and device namewithout having to setup the PXI config, but what could give me the PCI bus number?

0 Kudos
Message 6 of 8
(4,654 Views)

The System property node and the device property node should not error out if you don't ask for properties that require the PXI configuration being set up.  Namely the PCI Dev Number and the PCI Bus Number don't require this to be set up.  The PXI Slot number does.  If you query for the device type or the PCI Bus Number or the PCI Dev Number it shouldn't throw an error.  Are these throwing an error for you?  If so, which error are you getting? (error code)

Neil S.

0 Kudos
Message 7 of 8
(4,654 Views)

Your correct.  I tried just getting the product type and the Bus Type and it didn't give the error.  But if I ask for the Slot number or chassis number, I get an

-201059 Device information retrieval failed because PXI chassis is not identified.  Use MAX or nipxiconfig to identify your chassis.

I will just have to use the nipxiconfig program to setup my PXI chassis and controller.

Thanks for all your help.

0 Kudos
Message 8 of 8
(4,654 Views)