beautypg.com

Daqadcsettrig – Measurement Computing TempBook rev.3.0 User Manual

Page 139

background image

TempBook User’s Manual

daqCommand Reference (Enhanced API) 11-15

daqAdcSetTrig

DLL Function

daqAdcSetTrig(DaqHandleT handle, DaqAdcTriggerSource triggerSource, BOOL rising,

WORD level, WORD hysteresis, DWORD channel);

C

daqAdcSetTrig(DaqHandleT handle, DaqAdcTriggerSource triggerSource, BOOL rising,

WORD level, WORD hysteresis, DWORD channel);

Visual BASIC

VBdaqAdcSetTrig&(ByVal handle&, ByVal triggerSource&, ByVal rising&, ByVal

level%, ByVal hysteresis%, ByVal channel&)

Delphi

daqAdcSetTrig(handle:DaqHandleT; triggerSource:DaqAdcTriggerSource;

rising:longbool; level:WORD; hysteresis:WORD; channel:DWORD)

Parameters

handle

Handle to the device for which the ADC acquisition trigger is to be configured.

triggerSource

Sets the trigger source.

rising

Boolean flag to indicate the rising or falling edge for the trigger source

level

The trigger level (in A/D counts) for an analog level trigger

hysteresis

hysteresis value for analog level trigger (if selected)

channel

Channel for which the analog level trigger(if selected) is to be detected.

Returns

DerrNoError

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

See Also

daqAdcSetAcq

Program References

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

Used With

All devices

daqAdcSetTrig

sets and arms the trigger of the A/D converter. Several trigger sources and

several mode flags can be used for a variety of acquisitions. daqAdcSetTrig will stop current
acquisitions, empty acquired data, and arm the Daq* using the specified trigger.

Trigger detection for the given trigger source will not begin until the acquisition has been armed
with the daqAdcArm function. Trigger sources may be defined as follows:

DatsImmediate

- Trigger the acquisition immediately upon issuance of the daqAdcArm

function. This trigger mode is used to begin collecting data immediately upon configuration
of the acquisition.

DatsSoftware

- Trigger the acquisition upon issuance of the daqAdcSoftTrig function.

This trigger mode can be used to initiate a trigger upon some form of user or application
program input.

DatsAdcClock

- Trigger the acquisition upon ADC pacer clock input. This trigger mode

can be used to synchronize the trigger event with the ADC pacer clock.

DatsExternalTTL

- Trigger the acquisition upon sensing a rising or falling (depending

on state of rising flag) signal on an external TTL input signal (trig0 - pin 25 on P1).

DatsHardwareAnalog

- Trigger upon detection of a rising or falling (depending on the

state of the rising flag) analog signal (whose count is defined by the level parameter).
This trigger mode is detected in hardware to allow generally faster acquisition frequencies
than the DatsSoftwareAnalog trigger source. However, use of this mode is restricted to
channel level triggering on only the first channel within the channel scan (defined by the
channel parameter). Note: This mode is not available on Daq PCMCIA product lines.

DatsSoftwareAnalog

- Trigger upon detection of a rising or falling (depending on the

state of the rising flag) analog signal (whose count is defined by the level parameter).
This trigger mode is detected in software and generally will not allow the acquisition speeds of
the DatsHardwareAnalog trigger source. However, this mode has no trigger channel
restrictions. Any valid channel in the scan group can be configured as the trigger channel by
specifying it in the channel parameter.

Note: The level parameter is only used for the analog trigger modes. level is a count
representing the A/D count level trigger threshold to be passed through in order to satisfy the analog
trigger event. A number of factors are used to determine its proper value. For help in calculating
this analog count level properly, see the daqAdcCalcTrig function.