beautypg.com

Daqadcsetrate – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 88

background image

daqAdcSetRate

Also See: daqAdcSetAcq, daqAdcSetTrig, daqAdcArm, daqAdcSetFreq, daqAdcGetFreq

Format

daqAdcSetRate(handle, mode, state, reqValue, actualValue)

Purpose

daqAdcSetRate

configures the acquisition scan rate using the selected device’s built-in acquisition pacer

clock.

Parameter Summary

Parameter Type

Description

handle DaqHandleT

Handle to device for which to set the scan rate

mode DaqAdcRateMode

Sets the acquisition mode in terms of period or frequency

state DaqAdcAcqState

Indicates the acquisition state which scan rate applies to
(either pre-trigger or post-trigger)

reqValue FLOAT

Variable which indicates the requested acquisition scan rate

actualValue PFLOAT

Variable which indicates the actual acquisition scan rate

Parameter Values

handle:

obtained from the daqOpen function.

mode:

see table below

state:

see table below

reqValue:

valid values for freq range from 0.0 to 1,000,000.0

actualValue:

a pointer to a floating point number, ranging from 0.0 to 1,000,000.0

Parameter Type Definitions

mode-(DaqAdcRateMode)

Definition

Description

DarmPeriod

Sets requested scan rate in terms of period (nanoseconds)

DarmFrequency

Sets requested scan rate in terms of frequency (hertz, or channel scans per second)

DarmExtClockPacer

Sets external pacer clock divisor (WaveBook 516 only)

state-(DaqAdcAcqState)

Definition

Description

DaasPreTrig

Scan rate configuration is applied to pre-trigger acquisition state

DaasPostTrig

Scan rate configuration is applied to post-trigger acquisition state

Returns

DerrNoError

No

error

Function Usage

The daqAdcSetRate function should be used if internally pacing an acquisition with a device’s built-in
pacer clock. This function configures the internal pacer clock to the appropriate scanning frequency or period.
When the internal pacing clock fires, a new channel scan will be initiated, starting with the first channel in the
channel scan group (see the daqAdcSetScan function for channel configuration). The specific period or
frequency during which these scans will be taken is determined by the acquisition scan rate setting.

For correct results, the daqAdcSetRate function must be called after
daqAdcSetClockSource

, daqAdcSetScan (or daqAdcSetMux), and

daqAdcSetTrig

.

4.2-32 Daq API Command Reference

988594

Programmer’s Manual