beautypg.com

Daqadccalctrig, Daqadcdisarm – Measurement Computing TempBook rev.3.0 User Manual

Page 128

background image

11-4 daqCommand Reference (Enhanced API)

TempBook User’s Manual

daqAdcCalcTrig

DLL Function

daqAdcCalcTrig(DaqHandleT handle, BOOL bipolar, FLOAT gainVal, FLOAT

voltageLevel, PWORD triggerLevel);

C

daqAdcCalcTrig(DaqHandleT handle, BOOL bipolar, FLOAT gainVal, FLOAT

voltageLevel, PWORD triggerLevel);

Visual BASIC

VBdaqAdcCalcTrig&(ByVal handle&, ByVal bipolar&, ByVal gainVal!, ByVal

voltageLevel!, triggerLevel%)

Delphi

daqAdcCalcTrig(handle:DaqHandleT; bipolar:longbool; gainVal:single;

voltageLevel:single; var triggerLevel:DWORD)

Parameters

handle

Handle to the device for which the trigger level is to be calculated

bipolar

A flag that should be non-zero if the trigger channel is bipolar, or zero if it is unipolar

gainVal

A gain value of the trigger channel

voltageLevel

Voltage level to trigger at.

triggerLevel

Returned count to program the trigger using the daqAdcSetTrig function

Returns

DerrNoError

- No error (also, refer to API Error Codes on page 11-39)

See Also

daqAdcSetTrig

Program References

None

Used With

All devices

daqAdcCalcTrig

calculates the trigger level and source for an analog trigger. The result of

daqAdcCalcTrig

is the triggerLevel parameter. The triggerLevel parameter can then

be passed to the daqAdcSetTrig function to configure the analog trigger.

The triggerLevel parameter is calculated from: the unipolar/bipolar and gain settings of the
trigger channel, the desired analog voltage setpoint and trigger polarity, and the external reference
voltage of D/A channel 1. The trigger channel is automatically the first channel in the current A/D
scan group for DaqBooks and DaqBoards.

The bipolar parameter should be set according to the current bipolar/unipolar setting of the
trigger channel. This parameter is jumper-selectable when using a DaqBook/100/112 and
DaqBoard/100A/112A and software-programmable when using the DaqBook/200/200A.

The gainVal parameter sent to the daqAdcCalcTrig should be the actual gain of the trigger
channel, not the gain definition used by the rest of the Daq* A/D functions. For example, if the
trigger channel uses the gain definition DgainX8, the gain parameter of daqAdcCalcTrig
should be 8.

The voltageLevel defines the analog voltage at which the Daq* will trigger. The setpoint must
be within the valid input range of the trigger channel. For example, the setpoint range for a bipolar
channel with unity gain would be 0 to 10 V (for ×8 gain, the range would be 0 to 1.25 V) for a
DaqBook or a DaqBoard. Note: When using the Daq PCMCIA, the bipolar parameter is ignored.

daqAdcDisarm

DLL Function

daqAdcDisarm(DaqHandleT handle);

C

daqAdcDisarm(DaqHandleT handle);

Visual BASIC

VBdaqAdcDisarm&(ByVal handle&)

Delphi

daqAdcDisarm(handle:DaqHandleT)

Parameters

handle

handle to the device to disable ADC acquisitions

Returns

DerrNoError

- No error (also, refer to API Error Codes on page 11-39)

See Also

daqAdcArm

Program References

None

Used With

All devices

daqAdcDisarm

allows you to disarm an ADC acquisition if one is currently active.

If the specified trigger event has not yet occurred, the trigger event will be disabled and no
ADC acquisition will be performed.

If the trigger event has occurred, the acquisition will be halted and the data transfer stopped
and no more ADC data will be collected.