beautypg.com

D-11, Daqadcsetfreq, Daqadcsetmux – Measurement Computing WaveBook rev.3.0 User Manual

Page 207

background image

WaveBook User’s Manual,

6-24-99

daqX API - Command Reference D-11

daqAdcSetFreq

DLL Function

DaqAdcSetFreq(DaqHandleT handle, FLOAT freq);

C

DaqAdcSetFreq(DaqHandleT handle, FLOAT freq);

Visual BASIC

VbdaqAdcSetFreq&(ByVal handle&, ByVal freq!)

Delphi

DaqAdcSetFreq(handle:DaqHandleT; freq:single)

Handle

Handle to the device for which the ADC acquisition frequency is to be set.

Parameters

Freq

The sampling frequency in Hz
Valid values: 1000000.0 - 0.0002

Returns

DerrNoError

No error (see the API Error Codes table at the end of this chapter).

See Also

DaqAdcGetFreq, daqAdcSetClockSource

Program References

ADCEX1.C, DACEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)

Used With

All devices

Description

daqAdcSetFreq

calculates and sets the frequency of the pacer clock using the frequency specified in Hz. The frequency is converted to

two counter values that control the frequency of the pacer clock (in this conversion, some resolution of the frequency may be lost).
daqAdcRdFreq

can be used to read the exact frequency setting of the pacer clock. daqAdcSetClock can be used to explicitly set the

two counter values of the pacer clock. The pacer clock can be used to control the sampling rate of the A/D converter.

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)

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

Parameters

flags

Channel configuration flags in the form of a bit mask

DerrInvGain

Invalid gain

DerrIncChan

Invalid channel

Returns

DerrNoError

No error (see the API Error Codes table at the end of this chapter).

See Also

daqAdcSetScan, daqAdcGetScan

Program References

DACEX1.C, DAQEX.FRM (VB)

Used With

All devices

Description

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.