Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5368

Using DAQmxGetDigitalPowerUpStates()

$
0
0

I was in doubt if this topic is best here or in DAQmx forum, but I choose this because any Labview related answer would be not useful for me and - on other hand - here I'm sure to find someone that will understand my C notation.
 

I'm trying to read the power-up state of DO bits with DAQmxGetDigitalPowerUpStates() function. 

Docs is here: http://zone.ni.com/reference/en-XX/help/370471AE-01/daqmxcfunc/daqmxgetdigitalpowerupstates/

 

When I read a single line status, i.e

...
int32 P0_0;
DAQmxGetDigitalPowerUpStates ("Dev1", "Dev1/port0/line0",   &P0_0, NULL);
...

it works.
When I try to read more lines:

...
int32 P0_0, P0_1;
DAQmxGetDigitalPowerUpStates ("Dev1", "Dev1/port0/line0", &P0_0, "Dev1/port0/line1", &P0_1, NULL);
...

it fails at runtime with a fatal error: "Missing argument to variable argument function."

Moreover, in the doc linked before is stated "channelName: The digital line or port to get the power-up state from. You can specify a list or range of channels". 
I assume this is wrong, too, because the variabile argument function cannot validate if we are passing a pointer to a single int32 or the base address of an array of int32s.

I will survive without using this function, but it will be nice to discover who is wrong or broken: me, the documentation or the function itself. Smiley Sad

All my tests were done with an USB-6212, if this is significant. 
Attached is a minimal program demostrating this behaviour.



Viewing all articles
Browse latest Browse all 5368


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>