Skip to content

Triggered Image Acquisition (dart E)#

If the camera is configured for triggered image acquisition, you can trigger image captures at particular points in time.

Most modern imaging applications work with triggered image acquisition.

Using the Feature#

Hardware and Software Triggering#

When the camera is configured for hardware triggering, an electrical signal applied to one of the camera's input lines can act as a trigger signal.

When the camera is configured for software triggering, a software command or signal acts as a trigger signal. The software command can be executed using the pylon API.

In terms of configuration, the only difference between hardware and software triggering is the trigger source. For hardware triggering, you must choose a hardware trigger source. For software triggering, you must choose a software trigger source.

Also, some configuration steps don't apply to software triggering, e.g., choosing a trigger activation mode.

Configuring Triggered Image Acquisition#

To configure triggered image acquisition:

  1. Set the TriggerMode parameter to On to enable triggered image acquisition.
  2. Configure the trigger:
    1. Set the TriggerSource parameter to define which signal triggers the trigger.
    2. If applicable, set the TriggerActivation parameter to define which signal transition triggers the trigger.

Info

  • Don't trigger the camera at a rate that exceeds one or both of the following limiting factors:

    • The maximum allowed frame rate for the current camera settings. If you apply Frame Start trigger signals to the camera when it is not ready to receive them, the signals will be ignored.
    • The host computer's capacity limits for data transfer, storage, or both. If you try to acquire more images than the host computer is able to process, frames may be dropped.

Trigger Sources#

You can set the trigger source using the TriggerSource parameter.

This defines how a trigger is triggered.

The following trigger sources are available:

Hardware Trigger Sources#

  • Line1: The trigger selected can be triggered by applying an electrical signal to I/O line 1.
  • PeriodicSignal1: The trigger selected can be triggered using the Periodic Signal feature.

Software Trigger Sources#

  • Software: The trigger selected can be triggered by executing a TriggerSoftware command via the pylon API.

Trigger Activation Modes#

You can set the activation mode using the TriggerActivation parameter.

This setting only applies to hardware triggering. It defines which signal transition activates the selected trigger. For example, you can specify that a trigger becomes active when the trigger signal falls.

The following trigger activation modes are available:

  • LevelHigh: The trigger is active as long as the trigger signal is high.
  • LevelLow: The trigger is active as long as the trigger signal is low.

Sample Code#

// Enable triggered image acquisition for the Frame Start trigger
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source to Line 1
camera.TriggerSource.SetValue(TriggerSource_Line1);
// Set the trigger activation mode to level high
camera.TriggerActivation.SetValue(TriggerActivation_LevelHigh);
INodeMap& nodemap = camera.GetNodeMap();
// Enable triggered image acquisition for the Frame Start trigger
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source to Line 1
CEnumParameter(nodemap, "TriggerSource").SetValue("Line1");
// Set the trigger activation mode to level high
CEnumParameter(nodemap, "TriggerActivation").SetValue("LevelHigh");
// Enable triggered image acquisition for the Frame Start trigger
camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);
// Set the trigger source to Line 1
camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line1);
// Set the trigger activation mode to level high
camera.Parameters[PLCamera.TriggerActivation].SetValue(PLCamera.TriggerActivation.LevelHigh);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Enable triggered image acquisition for the Frame Start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source to Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line1");
CHECK(errRes);
/* Set the trigger activation mode to level high */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerActivation", "LevelHigh");
CHECK(errRes);
# Enable triggered image acquisition for the Frame Start trigger
camera.TriggerMode.Value = "On"
# Set the trigger source to Line 1
camera.TriggerSource.Value = "Line1"
# Set the trigger activation mode to level high
camera.TriggerActivation.Value = "LevelHigh"

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