# AlazarSetTriggerOperationForScanning¶

## Function Syntax¶

RETURN_CODE AlazarSetTriggerOperationForScanning(HANDLE handle, U32 slopeId, U32 level, U32 options)

Configure the trigger engines of a board to use an external trigger input and, optionally, synchronize the start of an acquisition with the next external trigger event after AlazarStartCapture() is called.

Return

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

Remark

AlazarSetTriggerOperationForScanning() is intended for scanning applications that supply both external clock and external trigger signals to the digitizer, where the external clock is not suitable to drive the digitizer in between trigger events.

Remark

This function configures a board to use trigger operation TRIG_ENGINE_OP_J, and the source of TRIG_ENGINE_J to be TRIG_EXTERNAL. The application must call AlazarSetExternalTrigger() to set the full-scale external input range and coupling of the external trigger signal connected to the TRIG IN connector. An application should call AlazarSetTriggerOperationForScanning() or AlazarSetTriggerOperation(), but not both.

Remark

The trigger level is specified as an unsigned 8-bit code that represents a fraction of the full scale input voltage of the external trigger range: 0 represents the negative limit, 128 represents the 0 level, and 255 represents the positive limit.

Remark

AlazarSetTriggerOperationForScanning() in currently only supported on ATS9462 with FPGA 35.0 or later.

Parameters
• [in] handle: Board handle

• [in] slopeId: Select the direction of the rate of change of the external trigger signal when it crosses the trigger voltage level that is required to generate a trigger event. Must be an element of ALAZAR_TRIGGER_SLOPES.

• [in] level: Specify a trigger level code representing the trigger level in volts that an external trigger signal connected must pass through to generate a trigger event. See the Remarks section below.

• [in] options: The options parameter may be one of ALAZAR_STOS_OPTIONS