int32 DAQmxReadDigitalLines (TaskHandle
taskHandle, int32 numSampsPerChan, float64 timeout, bool32
fillMode, uInt8 readArray, uInt32 arraySizeInBytes, int32
*sampsPerChanRead, int32 *numBytesPerSamp, bool32 *reserved);
Reads multiple samples from each digital line in a
task. Each line in a channel gets one byte per sample.
||The task to read samples from.
||The number of samples, per channel, to read. The
default value of -1 (DAQmx_Val_Auto)
reads all available samples. If readArray does not
contain enough space, this function returns as many samples as fit
NI-DAQmx determines how many samples to read based on whether the
task acquires samples continuously or acquires a finite number of
If the task acquires samples continuously and you set this
parameter to -1, this function reads all the samples currently
available in the buffer.
If the task acquires a finite number of samples and you set this
parameter to -1, the function waits for the task to acquire all
requested samples, then reads those samples. If you set the Read
All Available Data property to TRUE, the function reads the samples
currently available in the buffer and does not wait for the task to
acquire all requested samples.
||The amount of time, in seconds, to wait for the
function to read the sample(s). To specify an infinite wait, pass
-1 (DAQmx_Val_WaitInfinitely). This
function returns an error if the timeout elapses.
A value of 0 indicates to try once to read the requested samples.
If all the requested samples are read, the function is successful.
Otherwise, the function returns a timeout error and returns the
samples that were actually read.
||Specifies whether or not the samples are interleaved.
||Group by channel (non-interleaved)
||Group by scan number (interleaved)
||The size of the array, in samples, into which samples are
||Reserved for future use. Pass NULL to this
||The array to read samples into. Each
numBytesPerSamp corresponds to one sample per
channel, with each element in that grouping corresponding to a line
in that channel, up to the number of lines contained in the
||The actual number of samples read from each
||The number of elements in readArray that
constitutes a sample per channel. For each sample per channel,
numBytesPerSamp is the number of bytes that
channel consists of.