Daqadcrdn – Measurement Computing TempBook rev.3.0 User Manual
Page 131

TempBook User’s Manual
daqCommand Reference (Enhanced API) 11-7
daqAdcRdN
DLL Function
daqAdcRdN(DaqHandleT handle, DWORD chan, PWORD buf, DWORD scanCount,
DaqAdcTriggerSource triggerSource, BOOL rising, WORD level, FLOAT freq,
DaqAdcGain gain, DWORD flags);
C
daqAdcRdN(DaqHandleT handle, DWORD chan, PWORD buf, DWORD scanCount,
DaqAdcTriggerSource triggerSource, BOOL rising, WORD level, FLOAT freq,
DaqAdcGain gain, DWORD flags);
Visual BASIC
VBdaqAdcRdN&(ByVal handle&, ByVal chan&, buf%(), ByVal scanCount&, ByVal
triggerSource&, ByVal rising&, ByVal level%, ByVal freq!, ByVal gain&, ByVal
flags&)
Delphi
daqAdcRdN(handle:DaqHandleT; chan:DWORD; buf:PWORD; scanCount:DWORD;
triggerSource:DaqAdcTriggerSource; rising:longbool; level:WORD; freq:single;
const gain:DaqAdcGain; flags:DWORD)
Parameters
handle
Handle to the device for which the ADC channel samples are to be acquired
chan
A single channel number
buf
An array where the A/D scans will be returned
scanCount
The number of scans to be taken
Valid values:
1 - 32767
triggerSource
The trigger source
rising
Boolean flag to indicate the rising or falling edge for the trigger source
level
The trigger level if an analog trigger is specified
Valid values:
0 -4095
freq
The sampling frequency in Hz (
100000.0 to 0.0002
)
gain
The channel gain
flags
Channel configuration flags in the form of a bit mask
Returns
DerrFIFOFull
- Buffer overrun
DerrInvGain
-Invalid gain
DerrIncChan
- Invalid channel
DerrInvTrigSource
- Invalid trigger
DerrInvLevel
- Invalid level (also, refer to API Error Codes on page 11-39)
See Also
daqAdcSetFreq, daqAdcSetMux, daqAdcSetClock, daqAdcSetTrig
Program References
None
Used With
All devices
daqAdcRdN
is used to take multiple scans from a single A/D channel. This function will:
•
Configure the pacer clock
•
Configure all channels with the specified gain parameter
•
Configure all channel options with the channel flags specified
•
Arm the trigger
•
Acquire count scans from the specified A/D channel
See ADC Flags Definition table (in ADC Miscellaneous Definitions) for channel flags
parameter definition.