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.

Hi,
Ok now I downloaded and started to use the NI-DAQmx driver (not the base), and indeed I get a lot of properties.

But I'm still not able to find the capabilities of the boards installed. Fx:

I found two methods: DAQmxGetAIRngHigh and DAQmxGetAIRngLow, they seems to read the valid input range of the board, despite the setting specified in the DAQmxCreateAIVoltageChan method; that's fine. I don't understand why they require a task handle however, and why they must be called after creating a channel, I would expect a device name?

Then I tried to call the method DAQmxGetAISampAndHoldEnable. This created and error; I guess that this means that sample-and-hold is not supported on the board I have, that's true.

But how do I find:
· the maximum sample rate of the board?
· the possible valid terminal configurations of the board RTSE, Diff, or NRSE
· support for analog or digital input trigger
· etc.???

Please help.

-cpede
0 Kudos
Message 11 of 17
(2,538 Views)
I've had the same problem. The info is not exactly forthcoming in the user's manual. 😛
I found the most effective way to find out about the board's capabilities was to explore the board using Max and play around at the test screen.
Good luck.

Jim
0 Kudos
Message 12 of 17
(2,533 Views)
Cpede,
All that info can be found in the spec sheet for the board.
M Series here.
E Series here.
Programmatically, for max sample rate, you can use this function: DAQmxGetSampClkMaxRate(TaskHandle taskHandle, float64 *data);
For valid terminal configurations, I'm not aware of any E or M series device that is not capable of RSE, NRSE, or Diff.
As for support for analog or digital trigger, again, I'm not sure if there are any E or M series devices that are not capable of this.
-Alan A.
0 Kudos
Message 13 of 17
(2,514 Views)
Thanks for the reply.

I'm using NI-DAQmx v7.3 and I don't have a method called DAQmxGetSampClkMaxRate?
I have a method called DAQmxGetAIConvRate, but this changes value dependent on the number of channels created.
Fx. I have an old PCI-MIO-16E-1 board, with 1 channel created it returns 1.25 MS/s as specified for the board. If I create 2 or more channels it always returns 1 MS/s. Then again this would be ok if the sample clock returned could be used in the DAQmxCfgSampClkTiming method. But for 1 channel I can use 1.25 MS/s, but for multiple channels I cannot use the 1 MS/s returned, but have to do the old trick dividing with the number of channels: 1.25 MS/s / [number of channels ] ???

My point is that it should be possible to read these properties from the driver. Otherwise you are not able to make a dynamic system, but a system of devices you know in advance!

You are probably right with respect to the RES, NRES and Diff. But how do I then detect if the bard support unipolar input? I know that one of my boards PCI-6023E, does not support this, how do I detect that and how do I specify the polarity?

-cpede
0 Kudos
Message 14 of 17
(2,513 Views)
cpede:

Thanks for your feedback, cpede. We will be taking your requests into consideration in planning for future versions of NI-DAQ.

Thanks,

Chris W.
.NET and C++ DAQmx Team
NI R&D
0 Kudos
Message 15 of 17
(2,458 Views)
Any progress here yet? I assume the functionality is there and is used by MAX, it is only undocumented?

What about DAQmxGetSystemInfoAttribute and DAQmxGetDeviceAttribute that I found in NIDAQmx.h. Where is description of  'int32 attribute'  parameter?  Both functions are missing in "NI-DAQmx C Reference"?
0 Kudos
Message 16 of 17
(2,308 Views)

Hi vldmr-

Yes!  With NI-DAQmx 8.0 a list of new properties are available through the driver API.  These include the ability to list all available I/O channels.  Discussions of these new properties are available in the NI-DAQmx C Reference Help under NI-DAQmx>>C Properties>>List of Device Properties.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 17 of 17
(2,279 Views)