Daqadcrd – Measurement Computing TempBook rev.3.0 User Manual
Page 130

11-6 daqCommand Reference (Enhanced API)
TempBook User’s Manual
daqAdcRd
DLL Function
daqAdcRd(DaqHandleT handle, DWORD chan, PWORD sample, DaqAdcGain gain,
DWORD flags);
C
daqAdcRd(DaqHandleT handle, DWORD chan, PWORD sample, DaqAdcGain gain,
DWORD flags);
Visual BASIC
VBdaqAdcRd&(ByVal handle&, ByVal chan&, sample%, ByVal gain&, ByVal flags&)
Delphi
daqAdcRd(handle:DaqHandleT; chan:DWORD; var sample:WORD; const gain:DaqAdcGain;
flags:DWORD)
Parameters
handle
Handle to the device for which the ADC reading is to be acquired
chan
A single channel number
sample
A pointer to a value where an A/D sample is stored. Valid values: (See
daqAdcSetTag
)
gain
The channel gain
flags
Channel configuration flags in the form of a bit mask
Returns
DerrFIFOFull
- Buffer Overrun
DerrInvGain
- Invalid gain
DerrInvChan
- Invalid channel
DerrNoError
- No Error (also, refer to API Error Codes on page 11-39)
See Also
daqAdcSetMux, daqAdcSetTrig, daqAdcSoftTrig
Program References
DACEX.PAS (Delphi)
Used With
All devices
daqAdcRd
is used to take a single reading from the given local A/D channel. This function will use
a software trigger to immediately trigger and acquire one sample from the specified A/D channel.
•
The chan parameter indicates the channel for which to take the sample.
•
The sample parameter is a pointer to where the collected sample should be stored.
•
The gain parameter indicates the channel’s gain setting.
•
The flags parameter allows the setting of channel-dependent options. See ADC Flags
Definition table for channel flags definitions.