Daqadcrdn – Measurement Computing Personal Daq rev.6.0 User Manual
Page 138

B-6 API Commands
Appendix B,
887095
Personal Daq User’s Manual
daqAdcRdN
DLL Function
daqAdcRdN(DaqHandleT handle, DWORD chan, PVOID buf, DWORD scanCount,
daqAdcTriggerSource triggerSource, BOOL rising, FLOAT level, FLOAT freq,
daqAdcGain gain, DWORD flags);
C
daqAdcRdN(DaqHandleT handle, DWORD chan, PVOID buf, DWORD scanCount,
DaqAdcTriggerSource triggerSource, BOOL rising, FLOAT level, FLOAT freq,
DaqAdcGain gain, DWORD flags);
Visual BASIC
VBdaqAdcRdNSingle&(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:pointer; scanCount:DWORD;
triggerSource:daqAdcTriggerSource; rising:longbool; level:single; freq:single;
const gain:daqAdcGain; flags:DWORD)
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
Parameters
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
See Also
daqAdcSetFreq, daqAdcSetMux, daqAdcSetClock, daqAdcSetTrig
Program References
None
Used With
All devices
Description
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.