Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically determine the capabilities of a card under NI-DAQmx (e.g. max sample rate, number of AI/AO/CTR channels, etc.

Is there a DAQ_Get_Device_Info() equivalent for NIDAQmx? I need to iterate thru all the devices on my system, and build up a list of device capabilities. The system may include M-series and E-series cards.
Message 1 of 17
(6,569 Views)
Hello,

There is no equivalent for DAQ_Get_Device_Info() for NI-DAQmx. Something you can do though would be to use traditional to identify all of the E-series boards, and if there is an M-series board and an error is generated, catch that error number and ignore it. You won't be able to get the "info of the M-series devices", but at least you will know where those board are at. I will forward this information (no equivalent for that function call DAQ_Get_Device_Info() ) to R&D though to see if they can add it into the next NI-DAQ versions.

Thanks,

LA
0 Kudos
Message 2 of 17
(6,562 Views)
Thanks for the reply. For the time being, I guess I'll build a hard-coded table of the capabilities of the devices I'm "likely" to encounter. If/when new functionality appears in future versions of NI-DAQmx, perhaps I'll be able to get rid of the table.
Thanks again for your reply!
0 Kudos
Message 3 of 17
(6,563 Views)
Hello

You can do some basic device discovery, although not as extensive as with DAQ Device Info.

I dont know whether you know about these functions already, but, you can use DAQmxSysDevNames to get the device numbers for devices on your system (dev1, dev2, etc..) and then use DAQmxGetDevProductType to find out about the model (PCI or PXI 6234). Im assuming you are using the C DAQmx API.

I agree, some more discovery functions are needed

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 4 of 17
(6,563 Views)
Yes, thanks! - I was aware of these functions, and I do use them, and you are right, I am using the C DAQmx API.
I was looking for a generic way to discover and configure my system, but the reality of it is that we make the purchases of the cards, so it really isn't too much work to build lookup tables with kind of informatin I'm looking for. We only buy a narrow subset of all available products, so my table doesn't have to get too big.
0 Kudos
Message 5 of 17
(6,565 Views)
Hi,

Imagine making a new API without including functions for identifying the capabilities of the boards?????
NI made a great driver system compatible with nearly all boards, but you can't read what the boards are capable of.
This leads to customers typing in invalid values all the time because it is not possible to verify the value before calling a method.
I expected this to be solved when going from the old legacy NI-DAQ to the new mx.

-cpede
0 Kudos
Message 6 of 17
(6,273 Views)
Attached is a program I've used in the past to determine number of AI channels. It could be easily modified to check for AO or digital or counter. Also, there is a ton of properties that you have access to (i.e. max sample rate, max/min voltage inputs, etc.) that are accessed as properties of the type of channel, or timing properties, as opposed to properties of the board. Check out the DAQmx C Reference Help (Usually at Start>>All Programs>>National Instruments>>NI-DAQ). Expand the NI-DAQmx C Properties, and look at the List of Channel Properties, and Timing Properties, etc.
-Alan A.
0 Kudos
Message 7 of 17
(6,262 Views)
Thanks for the reply. I have installed the NI-DAQmx Base for Windows, but I only have a "NI-DAQmx Base 1.x C Reference Help" and it does not show any available channel properties, only function like "DAQmxBaseCreateAIVoltageChan" etc.?

It there a newer version, or am I looking at the wrong place for these information?

-cpede
0 Kudos
Message 8 of 17
(6,259 Views)
All the previous posts on this thread were dealing with NI-DAQmx. That is what my comments referred to. NI-DAQmx Base is a little different, and contains a subset of the functionality of NI-DAQmx. Unfortunately, the properties that I mentioned previously are not available in NI-DAQmx Base.
-Alan A.
0 Kudos
Message 9 of 17
(6,254 Views)
Look in the NI-DAQmx C Reference Help under the section

Subsection

You'll find the API call explanations there. Unfortunately, they don't show up on a search of the index.

J
0 Kudos
Message 10 of 17
(6,226 Views)