
daqAdcRd
Also See: daqAdcSetMux, daqAdcSetTrig,
daqAdcSoftTrig
Format
daqAdcRd(handle, chan, sample, gain, flags)
Purpose
daqAdcRd takes a single reading from the given local A/D channel using a software trigger.
Parameter Summary
Parameter Type Description
handle DaqHandleT
Handle to the device from which the ADC reading will be acquired
chan DWORD
A single channel number for which the sample will be taken
sample PWORD
A pointer to a value where an acquisition sample is stored
gain DaqAdcGain
The channel’s gain setting
flags DWORD
Channel configuration flags in the form of a bit mask
Parameter Values
handle: obtained from the daqOpen function
chan: must be a valid channel number for the device
sample: must be a valid pointer to a short integer variable (2 bytes)
gain: see ADC Gain Definition table for gain parameter values
flags: see ADC Flag Definition table for flags parameter values
Returns
DerrInvGain Invalid gain
DerrInvChan Invalid channel
DerrNoError No error
For more details on error messages, please refer to the Daq Error Table.
Function Usage
This function will use a software trigger to immediately trigger and acquire one sample from the specified
acquisition channel.
Prototypes
C/C++
daqAdcRd(DaqHandleT handle, DWORD chan, PWORD sample, DaqAdcGain gain,
DWORD flags);
Visual BASIC
VBdaqAdcRd&(ByVal handle&, ByVal chan&, sample%, ByVal gain&, ByVal
flags&)
Program References
None
Programmer’s Manual 908594 Daq API Command Reference 4.2-13
Comentarios a estos manuales