beautypg.com

Daqadcsetmux, Daqadcsetrate – Measurement Computing Personal Daq rev.6.0 User Manual

Page 144

background image

B-12 API Commands

Appendix B,

887095

Personal Daq User’s Manual

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 Also

daqAdcSetScan, daqAdcGetScan

Program References

None

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.


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; state:daqAdcAcqState;
reqValue:single; actualValue:PSINGLE);

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 Also

daqAdcSetAcq, daqAdcSetTrig, daqAdcArm, daqAdcSetFreq, daqAdcGetFreq

Program References

DAQEX.PAS (Delphi), ADCEX1.C, FREQEX1.C, PULSEEX1.C, MULTEX1.C, DAQEX.FRM (VB)

Used With

All devices

Description

daqAdcSetRate

configures the 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 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 acquisition rate to the requested rate.

DaasPostTrig

- Sets the post-trigger acquisition rate to the requested rate.

Personal Daq does not allow a pre-trigger rate different from the post-trigger rate. Therefore, the pre-trigger rate settings will be ignored
and the post-trigger rate will be used for both the pre-trigger and the post-trigger scan rates.

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.

This manual is related to the following products: