D-12, Daqadcsetrate, Daqadcsetscan – Measurement Computing WaveBook rev.3.0 User Manual
Page 208

D-12 daqX API - Command Reference,
6-24-99
WaveBook User’s Manual
daqAdcSetRate
DLL Function
daqAdcSetRate(DaqHandleT handle, DaqAdcRateMode mode, DaqAdcAcqState acqState, FLOAT
reqRate, PFLOAT actualRate);
C
daqAdcSetRate(DaqHandleT handle, DaqAdcRateMode mode, DaqAdcAcqState acqState, FLOAT
reqRate, PFLOAT actualRate);
Visual BASIC
VBdaqAdcSetRate(ByVal handle&, ByVal mode&, ByVal acqState&, ByVal reqRate!,
actualRate!);
Delphi
daqAdcSetRate(handle: DaqHandleT; mode: DaqAdcRateMode, acqState: DaqAdcAcqState;
reqRate:FLOAT; actualRate:PFLOAT);
handle
Handle to the device for which to set ADC scanning frequency.
mode
Specifies the rate mode (frequency or period).
acqState
Specifies the acquisition state to which the rate is to be applied.
reqRate
Specifies the requested rate.
Parameters
actualRate
Returns the actual rate applied. This may be different from the requested rate.
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcSetAcq, daqAdcSetTrig, daqAdcArm, daqAdcSetFreq, daqAdcGetFreq
Program References
Used With
All devices
Description
daqAdcSetRate
configures the ADC scan rate using the rate mode specified by the mode parameter. Currently, the valid modes are:
DarmPeriod
- Defines the requested rate to be in periods/sec.
DarmFrequency
- Defines the requested rate to be a frequency.
This function will set the ADC acquisition rate requested by the reqRate parameter for the acquisition state specified by the acqState
parameter. Currently, the following acquisition states are valid:
DaasPreTrig
- Sets the pre-trigger ADC acquisition rate to the requested rate.
DaasPostTrig
- Sets the post-trigger ADC acquisition rate to the requested rate.
If the requested rate is unattainable on the specified device, a rate will be automatically adjusted to the device’s closest attainable rate. If
this occurs, the actualRate parameter will return the actual rate for which the device has been programmed.
daqAdcSetScan
DLL Function
daqAdcSetScan(DaqHandleT handle, PDWORD channels, DaqAdcGain *gains, PDWORD flags,
DWORD chanCount);
C
daqAdcSetScan(DaqHandleT handle, PDWORD channels, DaqAdcGain *gains, PDWORD flags,
DWORD chanCount);
Visual BASIC
VBdaqAdcSetScan&(ByVal handle&, channels&(), gains&(), flags&(), ByVal chanCount&)
Delphi
daqAdcSetScan(handle:DaqHandleT; channels:PDWORD; gains:DaqAdcGainP; flags:PDWORD;
chanCount:DWORD)
handle
Handle to the device for which ADC scan group is to be configured
channels
An array of up to 512 channel numbers
*gains
An array of up to 512 gain values
flags
Channel configuration flags in the form of a bit mask
Parameters
chanCount
The number of values in the chans and gains arrays
Valid values: 1 -512
DerrNotCapable
No high speed digital
DerrInvGain
Invalid gain
DerrInvChan
Invalid channel
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcGetScan, daqAdcSetMux
Program References
ADCEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)
Used With
All devices
Description
daqAdcSetScan
configures an A/D scan group consisting of multiple channels. As many as 512 channel entries can be made in the A/D
scan group configuration. Any analog input channel can be included in the scan group configuration at any valid gain setting. Scan group
configuration may be composed of local or expansion channels and (for the DaqBook/DaqBoard) the high-speed digital I/O port.
The channels parameter is a pointer to an array of up to 512 channel values. Each entry represents a channel number in the scan group
configuration. Channels can be entered multiple times at the same or different gain setting. The gains parameter is a pointer to an array
of up to 512 gain settings. Each gain entry represents the gain to be used with the corresponding channel entry. Gain entry can be any
valid gain setting for the corresponding channel. The flags parameter is a pointer to an array of up to 512 channel flag settings. Each
flag entry represents a 4-byte-wide bit map of channel configuration settings for the corresponding channel entry. The channel flags can
be used to set channel specific configuration settings (such as polarity). See the ADC Flags Definition table for valid channel flag values.
The chanCount parameter represents the total number of channels in the scan group configuration. This number also represents the
number of entries in each of the channels, gains and flags arrays.