# AlazarSetTriggerOperation¶

## Function Syntax¶

RETURN_CODE AlazarSetTriggerOperation(HANDLE handle, U32 TriggerOperation, U32 TriggerEngine1, U32 Source1, U32 Slope1, U32 Level1, U32 TriggerEngine2, U32 Source2, U32 Slope2, U32 Level2)

Configures the trigger system.

Remark

The trigger level is specified as an unsigned 8-bit code that represents a fraction of the full scale input voltage of the trigger source: 0 represents the negative limit, 128 represents the 0 level, and 255 represents the positive limit. For example, if the trigger source is CH A, and the CH A input range is ± 800 mV, then 0 represents a –800 mV trigger level, 128 represents a 0 V trigger level, and 255 represents +800 mV trigger level.

Remark

If the trigger source is external, the full scale input voltage for the external trigger connector is dictated by the AlazarSetExternalTrigger() function.

Remark

All PCI Express boards except ATS9462 support only one external trigger level. If both Source1 and Source2 are set to TRIG_EXTERNAL of ALAZAR_TRIGGER_SOURCES, Level1 is ignored and only Level2 is used. All other boards support using different values for the two levels.

Return

ApiSuccess upon success, or an error code. See RETURN_CODE for more detailed information.

Parameters
• [in] handle: Board handle

• [in] TriggerOperation: Specify how the two independent trigger engines generate a trigger. This can be one of ALAZAR_TRIGGER_OPERATIONS

• [in] TriggerEngine1: First trigger engine to configure. Can be one of ALAZAR_TRIGGER_ENGINES.

• [in] Source1: Signal source for the first trigger engine. Can be one of ALAZAR_TRIGGER_SOURCES.

• [in] Slope1: Sign Direction of the trigger voltage slope that will generate a trigger event for the first engine. Can be one of ALAZAR_TRIGGER_SLOPES.

• [in] Level1: Select the voltage level that the trigger signal must cross to generate a trigger event.

• [in] TriggerEngine2: Second trigger engine to configure. Can be one of ALAZAR_TRIGGER_ENGINES.

• [in] Source2: Signal source for the second trigger engine. Can be one of ALAZAR_TRIGGER_SOURCES.

• [in] Slope2: Sign Direction of the trigger voltage slope that will generate a trigger event for the second engine. Can be one of ALAZAR_TRIGGER_SLOPES.

• [in] Level2: Select the voltage level that the trigger signal must cross to generate a trigger event.