• No results found

Using a Hardware Acquisition Start Trigger Signal

7.2 The Acquisition Start Trigger

7.2.5 Using a Hardware Acquisition Start Trigger Signal

7.2.5.1 Introduction

If the Trigger Mode parameter for the acquisition start trigger is set to on and the Trigger Source parameter is set to line 1, CC1, CC2, or CC3, an externally generated electrical signal injected into the selected source will act as the acquisition start trigger signal for the camera. This type of trigger signal is generally referred to as a hardware trigger signal or as an external acquisition start trigger signal (ExASTrig).

If the Trigger Source is set to line 1, the GPIO line must be properly set to operate as an input in order to accept the trigger signal.

A rising edge or a falling edge of the ExASTrig signal can be used to trigger acquisition start. The Trigger Activation parameter is used to select rising edge or falling edge triggering.

When the Trigger Mode parameter is set to on, the camera will initially be in a "waiting for acquisition start trigger" acquisition status. It can’t react to frame start trigger signals when in this acquisition status. When the appropriate ExASTrig signal is applied to the selected source, the camera will exit the "waiting for acquisition start trigger" acquisition status and will enter the "waiting for frame start trigger" acquisition status. It can then react to frame start trigger signals. When the number of frame start trigger signals received by the camera is equal to the current Acquisition Frame Count parameter setting, the camera will return to the "waiting for acquisition start trigger" acquisition status. When a new ExASTrig signal is applied to the selected source, the camera will again exit from the "waiting for acquisition start trigger" acquisition status and enter the "waiting for frame start trigger" acquisition status.

To set the parameters for software acquisition start triggering:

Image Acquisition Control AW00098506000

For more information about setting the camera for hardware acquisition start triggering and selecting the source to receive the ExASTrig signal, see Section 7.2.5.3 on page 75.

For more information about the electrical requirements for the GPIO line when it is set to operate as an input, see Section 5.6.2 on page 37.

For more information about CC1, CC2, and CC3, see Section 6.1 on page 45.

7.2.5.2 Acquisition Start Trigger Delay

The acquisition start trigger delay feature lets you specify a delay (in microseconds) that will be applied between the receipt of each hardware acquisition start trigger signal by the camera and when the trigger signal will become effective.

The acquisition start trigger delay may be specified in the range from 0 to 1000000 µs (equivalent to 1 s). When the delay is set to 0 µs, no delay will be applied.

If you are parameterizing the camera with Basler pylon, the Trigger Delay Abs parameter will determine the length of the delay.

If you are parameterizing the camera via direct register access, the Trigger Delay Raw Acquisition Start register will determine the length of the delay.

7.2.5.3 Setting the Parameters Related to Hardware Acquisition Start Triggering and Applying a Hardware Trigger Signal

Setting the Parameters Using Basler pylon and Applying a Signal

You can set all of the parameters needed to perform hardware acquisition start triggering from within your application software by using the pylon API. The following code snippet illustrates using the API to set the parameter values required to enable rising edge hardware acquisition start triggering with line 1 as the trigger source:

// Select the acquisition start trigger

Camera.TriggerSelector.SetValue(TriggerSelector_AcquisitionStart);

// Set the mode for the selected trigger Camera.TriggerMode.SetValue(TriggerMode_On);

// Configure the GPIO line as an input

Camera.LineSelector.SetValue(LineSelector_Line1);

Camera.LineMode.SetValue(LineMode_Input);

// Set the source for the selected trigger to line 1 Camera.TriggerSource.SetValue (TriggerSource_Line1);

The acquisition start trigger delay will not operate if the Acquisition Start Trigger Mode parameter is set to off or if you are using a software acquisition start trigger.

AW00098506000 Image Acquisition Control

// Set the activation mode for the selected trigger to rising edge Camera.TriggerActivation.SetValue(TriggerActivation_RisingEdge);

// Set the acquisition frame count

Camera.AcquisitionFrameCount.SetValue(5);

// Apply a rising edge of the externally generated electrical signal // (ExASTrig signal) to line 1 on the camera

You can also use the Basler pylon Viewer application to easily set the parameters.

For more information about the pylon API and the pylon Viewer, see Section 3.1 on page 21.

For more detailed information about the camera’s GPIO line, see Section 5.6 on page 36.

Setting the Parameters Using Direct Register Access and Applying a Signal

1. Set the value of the Trigger Mode Acquisition Start register to On.

2. Set the value of the Trigger Source Acquisition Start register to Line 1, CC1, CC2, or CC3.

a. If the trigger source is set to line 1, set the GPIO line to operate as an input by setting the value of the LineModeLine1 register to Input.

3. Set the value of the Trigger Activation Acquisition Start register to Rising Edge or Falling Edge.

4. Set the value of the Acquisition Frame Count register as desired.

5. Apply the appropriate externally generated electrical signal (ExASTrig signal) to the selected trigger source.

For more information about direct register access, see Section 3.2 on page 23.

For more detailed information about the camera’s GPIO line, see Section 5.6 on page 36.

To set the parameters for hardware acquisition start triggering:

Image Acquisition Control AW00098506000