Daqadcsetmux, Daqadcsetrate – Measurement Computing TempBook rev.3.0 User Manual
Page 137

TempBook User’s Manual
daqCommand Reference (Enhanced API) 11-13
daqAdcSetMux
DLL Function
daqAdcSetMux(DaqHandleT handle, DWORD startChan, DWORD endChan, DaqAdcGain gain,
DWORD flags);
C
daqAdcSetMux(DaqHandleT handle, DWORD startChan, DWORD endChan, DaqAdcGain gain,
DWORD flags);
Visual BASIC
VBdaqAdcSetMux&(ByVal handle&, ByVal startChan&, ByVal endChan&, ByVal gain&,
ByVal flags&)
Delphi
daqAdcSetMux(handle:DaqHandleT; startChan:DWORD; endChan:DWORD; const
gain:DaqAdcGain; flags:DWORD)
Parameters
handle
Handle to the device for which to configure the ADC channel scan group
startChan
The starting channel of the scan group
endChan
The ending channel of the scan group
gain
The gain value for all channels
flags
Channel configuration flags in the form of a bit mask
Returns
DerrInvGain
- Invalid gain
DerrIncChan
- Invalid channel
DerrNoError
- No error (also, refer to API Error Codes on page 11-39)
See Also
daqAdcSetScan, daqAdcGetScan
Program References
DACEX1.C, DAQEX.FRM (VB)
Used With
All devices
daqAdcSetMux
sets a simple scan sequence of local A/D channels from startChan to
endChan
with the specified gain value. This command provides a simple alternative to
daqAdcSetScan
if only consecutive channels need to be acquired. The flags parameter is used
to set channel dependent options. See ADC Flags Definition table for channel flags definitions.
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);
Parameters
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.
actualRate
Returns the actual rate applied. This may be different from the requested rate.
Returns
DerrNoError
- No error (also, refer to API Error Codes on page 11-39)
See Also
daqAdcSetAcq, daqAdcSetTrig, daqAdcArm, daqAdcSetFreq, daqAdcGetFreq
Program References
Used With
All devices
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.