Personal Daq User’s Manual
Appendix B,
887095
API Commands B-5
daqAdcRd
DLL Function
daqAdcRd(DaqHandleT handle, DWORD chan, PVOID sample, daqAdcGain gain,
DWORD flags);
C
daqAdcRd(DaqHandleT handle, DWORD chan, PVOID sample, DaqAdcGain gain,
DWORD flags);
Visual BASIC
VBdaqAdcRdSingle&(ByVal handle&, ByVal chan&, sample!, ByVal gain&, ByVal flags&)
Delphi
daqAdcRd(handle:DaqHandleT; chan:DWORD; sample:pointer; const gain:daqAdcGain;
flags:DWORD)
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
Parameters
flags
Channel configuration flags in the form of a bit mask
DerrFIFOFull
Buffer Overrun
DerrInvGain
Invalid gain
DerrInvChan
Invalid channel
Returns
DerrNoError
No Error
See Also
daqAdcSetMux, daqAdcSetTrig, daqAdcSoftTrig
Program References
None
Used With
All devices
Description
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.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com