Skip to content

Exposure Mode#

The Exposure Mode camera feature allows you to choose a method for determining the length of exposure when the camera is configured for hardware triggering.

The resulting camera behavior also depends on the Trigger Activation setting.

Using the Feature#

Setting the Exposure Mode#

To set the exposure mode:

  1. Set the TriggerSelector parameter to FrameStart.
  2. Set the TriggerMode parameter to On.
  3. Set the TriggerSource parameter to one of the available hardware trigger sources, e.g., Line1.
  4. Set the ExposureMode parameter to one of the following values:
    1. Timed
    2. TriggerWidth (if available)
    3. TriggerControlled (if available)

Available Exposure Modes#

Timed Exposure Mode#

Timed exposure mode is available on all camera models.

In this mode, the length of exposure is defined by the value of the camera's Exposure Time setting.

If the camera is configured for software triggering, exposure starts when the software trigger signal is received and continues until the exposure time has expired.

If the camera is configured for hardware triggering, the following applies:

Avoiding Overtriggering in Timed Exposure Mode

If the Timed exposure mode is enabled, don't attempt to trigger a new exposure start while the previous exposure is still in progress. Otherwise, the trigger signal will be ignored, and aFrame Start Overtrigger event will be generated.

This scenario is illustrated below for rising edge triggering.

Overtriggering with Timed Exposure

Trigger Width Exposure Mode#

Trigger Width exposure mode is available on some camera models.

In this mode, the length of exposure is defined by the width of the hardware trigger signal. This is useful if you intend to vary the length of exposure for each captured frame.

If the camera is configured for rising edge triggering, exposure starts when the trigger signal rises and continues until the trigger signal falls:

Trigger Width Exposure with Rising Edge Triggering

If the camera is configured for falling edge triggering, exposure starts when the trigger signal falls and continues until the trigger signal rises:

Trigger Width Exposure with Falling Edge Triggering

Avoiding Overtriggering in Trigger Width Exposure Mode

If the Trigger Width exposure mode is enabled, do not send trigger signals at too high a rate. Otherwise, trigger signals will be ignored, and Frame Start Overtrigger events will be generated.

You can avoid overtriggering in Trigger Width exposure mode by doing the following:

Trigger Controlled Exposure Mode#

Trigger Controlled exposure mode is available on some camera models.

In this mode, the length of exposure is defined by applying Exposure Start and Exposure End trigger signals to the camera.

The trigger signals can be controlled via any availabletrigger source.

Example:

You enable Trigger Controlled exposure mode. You set the trigger source for the Exposure Start trigger to Line1 and the trigger source for the Exposure End trigger to Line2.

Now, you can start the exposure by applying a hardware trigger signal on Line 1 and stop the exposure by applying a hardware trigger signal on Line 2.

You can find sample code for this configuration below.

Exposure Time Offset#

On some camera models, the exposure is slightly longer than the width of the trigger signal. This is because an exposure time offset is added automatically to the time determined by the width of the trigger signal.

To achieve the desired exposure time, you must compensate for the exposure time offset. To do so:

  1. Subtract the exposure time offset from the desired exposure time.
  2. Use the resulting time as the high or low time for the trigger signal.

Example: To achieve an exposure time of 3000 µs and the exposure time offset is 64 µs, use 3000 - 64 = 2936 µs as the high or low time for the trigger signal.

Specifics#

Show all camera models

Camera Model Available Exposure Modes Exposure Time Offset [µs]
a2A1920-51gcBAS Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-51gcPRO Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-51gmBAS Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-51gmPRO Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-160ucBAS Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-160ucPRO Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-160umBAS Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A1920-160umPRO Timed
Trigger Width
Trigger Controlled
Timed: Not specified
Trigger Width: 13.73
a2A3840-13gcBAS Timed Timed: Not specified
a2A3840-13gmBAS Timed Timed: Not specified
a2A3840-45ucBAS Timed Timed: Not specified
a2A3840-45umBAS Timed Timed: Not specified
acA640-90gc Timed
Trigger Width
Not specified
acA640-90gm Timed
Trigger Width
Not specified
acA640-90uc Timed
Trigger Width
Not specified
acA640-90um Timed
Trigger Width
Not specified
acA640-120gc Timed
Trigger Width
Not specified
acA640-120gm Timed
Trigger Width
Not specified
acA640-120uc Timed
Trigger Width
Not specified
acA640-120um Timed
Trigger Width
Not specified
acA640-121gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 13
acA640-300gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA640-300gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA640-750uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA640-750um Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA720-290gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA720-290gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA720-520uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA720-520um Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA780-75gc Timed
Trigger Width
Not specified
acA780-75gm Timed
Trigger Width
Not specified
acA800-200gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA800-200gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA800-510uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA800-510um Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA1280-60gc Timed Not specified
acA1280-60gm Timed Not specified
acA1300-22gc Timed
Trigger Width
Not specified
acA1300-22gm Timed
Trigger Width
Not specified
acA1300-30gc Timed
Trigger Width
Not specified
acA1300-30gm Timed
Trigger Width
No
acA1300-30uc Timed
Trigger Width
Not specified
acA1300-30um Timed
Trigger Width
Not specified
acA1300-60gc Timed Not specified
acA1300-60gm Timed Not specified
acA1300-60gmNIR Timed Not specified
acA1300-75gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA1300-75gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 64
acA1300-200uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA1300-200um Timed
Trigger Width
Timed: Not specified
Trigger Width: 32
acA1440-73gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 13
acA1440-73gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 13
acA1440-220uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 13
acA1440-220um Timed
Trigger Width
Timed: Not specified
Trigger Width: 13
acA1600-20gc Timed
Trigger Width
Not specified
acA1600-20gm Timed
Trigger Width
Not specified
acA1600-20uc Timed
Trigger Width
Not specified
acA1600-20um Timed
Trigger Width
Not specified
acA1600-60gc Timed Not specified
acA1600-60gm Timed Not specified
acA1920-25gc Timed Not specified
acA1920-25gm Timed Not specified
acA1920-25uc Timed Not specified
acA1920-25um Timed Not specified
acA1920-40gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA1920-40gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA1920-40uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA1920-40ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA1920-40um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA1920-40umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA1920-48gc Timed
Trigger Width
Not specified
acA1920-48gm Timed
Trigger Width
Not specified
acA1920-50gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA1920-50gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA1920-150uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 65 / 56.5a
acA1920-150um Timed
Trigger Width
Timed: Not specified
Trigger Width: 65 / 56.5a
acA1920-155uc Timed Timed: Not specified
Trigger Width: 15
acA1920-155ucMED Timed Timed: Not specified
Trigger Width: 15
acA1920-155um Timed Timed: Not specified
Trigger Width: 15
acA1920-155umMED Timed Timed: Not specified
Trigger Width: 15
acA2000-50gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2000-50gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2000-50gmNIR Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2000-165uc Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2000-165um Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2000-165umNIR Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2040-25gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2040-25gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2040-25gmNIR Timed
Trigger Width
Timed: Not specified
Trigger Width: 37
acA2040-35gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA2040-35gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA2040-55uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2040-55um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2040-90uc Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2040-90um Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2040-90umNIR Timed
Trigger Width
Timed: 28b
Trigger Width: 28b
acA2040-120uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2040-120um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-20gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA2440-20gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 14
acA2440-35uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-35ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-35um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-35umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-75uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-75ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-75um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2440-75umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA2500-14gc Timed Not specified
acA2500-14gm Timed Not specified
acA2500-14uc Timed Not specified
acA2500-14um Timed Not specified
acA2500-20gc Timed
Trigger Width
Not specified
acA2500-20gcMED Timed
Trigger Width
Not specified
acA2500-20gm Timed
Trigger Width
Not specified
acA2500-20gmMED Timed
Trigger Width
Not specified
acA2500-60uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 37 / 56.5a
acA2500-60um Timed
Trigger Width
Timed: Not specified
Trigger Width: 37 / 56.5a
acA3088-16gc Timed Not specified
acA3088-16gm Timed
Trigger Width
Not specified
acA3088-57uc Timed Not specified
acA3088-57um Timed Not specified
acA3800-10gc Timed Not specified
acA3800-10gm Timed Not specified
acA3800-14uc Timed Not specified
acA3800-14um Timed Not specified
acA4024-8gc Timed Not specified
acA4024-8gm Timed Not specified
acA4024-29uc Timed Not specified
acA4024-29um Timed Not specified
acA4096-11gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-11gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-30uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-30ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-30um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-30umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-40uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-40ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-40um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4096-40umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-8gc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-8gm Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-20uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-20ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-20um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-20umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-30uc Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-30ucMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-30um Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4112-30umMED Timed
Trigger Width
Timed: Not specified
Trigger Width: 15
acA4600-7gc Timed Not specified
acA4600-10uc Timed Not specified
acA5472-5gc Timed Not specified
acA5472-5gm Timed Not specified
acA5472-17uc Timed Not specified
acA5472-17um Timed Not specified
boA4096-93cc Timed
Trigger Width
Trigger Controlled
Timed: 0
Trigger Width: 14.26
Trigger Controlled: 14.26
boA4096-93cm Timed
Trigger Width
Trigger Controlled
Timed: 0
Trigger Width: 14.26
Trigger Controlled: 14.26
boA4112-68cc Timed
Trigger Width
Trigger Controlled
Timed: 0
Trigger Width: 14.26
Trigger Controlled: 14.26
boA4112-68cm Timed
Trigger Width
Trigger Controlled
Timed: 0
Trigger Width: 14.26
Trigger Controlled: 14.26
daA1280-54lc Timed Not specified
daA1280-54lm Timed Not specified
daA1280-54uc Timed Not specified
daA1280-54um Timed Not specified
daA1600-60lc Timed Not specified
daA1600-60lm Timed Not specified
daA1600-60uc Timed Not specified
daA1600-60um Timed Not specified
daA1920-15um Timed
Trigger Widthc
Not specified
daA1920-30uc Timed
Trigger Widthc
Not specified
daA1920-30um Timed
Trigger Widthc
Not specified
daA2500-14lc Timed
Trigger Widthc
Not specified
daA2500-14lm Timed
Trigger Widthc
Not specified
daA2500-14uc Timed
Trigger Widthc
Not specified
daA2500-14um Timed
Trigger Widthc
Not specified
daA2500-60mc Exposure Mode feature not supported Exposure Mode feature not supported
puA1280-54uc Timed Not specified
puA1280-54um Timed Not specified
puA1600-60uc Timed Not specified
puA1600-60um Timed Not specified
puA1920-30uc Timed Not specified
puA1920-30um Timed Not specified
puA2500-14uc Timed Not specified
puA2500-14um Timed Not specified

  1. 8-bit pixel format / 10-bit pixel format

  2. Valid if the pixel format is set to a 12-bit format. For 8-bit formats, the values depend on the available USB 3.0 bandwidth. See this table.

  3. Do not attempt to trigger a new exposure start while the previous frame acquisition is still in progress. Otherwise, the trigger signal will be partly ignored, and the exposure time for the new frame will be shorter than the trigger signal. This situation is illustrated below for rising edge triggering.
    Overtriggering with Trigger Width Exposure

Sample Code#

// ** Working with the Timed exposure mode **
// Select and enable the Frame Start trigger
camera.TriggerSelector.SetValue(TriggerSelector_FrameStart);
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source to Line 1
camera.TriggerSource.SetValue(TriggerSource_Line1);
// Enable Timed exposure mode
camera.ExposureMode.SetValue(ExposureMode_Timed);
// ** Working with the Trigger Controlled exposure mode **
NOTE: Only available on selected camera models. Check the 'Specifics' section */
// Select and enable the Exposure Start trigger
camera.TriggerSelector.SetValue(TriggerSelector_ExposureStart);
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source for the Exposure Start trigger to Line 1
camera.TriggerSource.SetValue(TriggerSource_Line1);
// Select and enable the Exposure End trigger
camera.TriggerSelector.SetValue(TriggerSelector_ExposureEnd);
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source for the Exposure End trigger to Line 2
camera.TriggerSource.SetValue(TriggerSource_Line2);
// Enable Trigger Controlled exposure mode
camera.ExposureMode.SetValue(ExposureMode_TriggerControlled);
INodeMap& nodemap = camera.GetNodeMap();
// ** Working with the Timed exposure mode **
// Select and enable the Frame Start trigger
CEnumerationPtr(nodemap.GetNode("TriggerSelector"))->FromString("FrameStart");
CEnumerationPtr(nodemap.GetNode("TriggerMode"))->FromString("On");
// Set the trigger source to Line 1
CEnumerationPtr(nodemap.GetNode("TriggerSource"))->FromString("Line1");
// Enable Timed exposure mode
CEnumerationPtr(nodemap.GetNode("ExposureMode"))->FromString("Timed");
// ** Working with the Trigger Controlled exposure mode **
models();
// Select and enable the Exposure Start trigger
CEnumerationPtr(nodemap.GetNode("TriggerSelector"))->FromString("ExposureStart");
CEnumerationPtr(nodemap.GetNode("TriggerMode"))->FromString("On");
// Set the trigger source for the Exposure Start trigger to Line 1
CEnumerationPtr(nodemap.GetNode("TriggerSource"))->FromString("Line1");
// Select and enable the Exposure End trigger
CEnumerationPtr(nodemap.GetNode("TriggerSelector"))->FromString("ExposureEnd");
CEnumerationPtr(nodemap.GetNode("TriggerMode"))->FromString("On");
// Set the trigger source for the Exposure End trigger to Line 2
CEnumerationPtr(nodemap.GetNode("TriggerSource"))->FromString("Line2");
// Enable Trigger Controlled exposure mode
CEnumerationPtr(nodemap.GetNode("ExposureMode"))->FromString("TriggerControlled");
INodeMap& nodemap = camera.GetNodeMap();
// ** Working with the Timed exposure mode **
// Select and enable the Frame Start trigger
CEnumParameter(nodemap, "TriggerSelector").SetValue("FrameStart");
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source to Line 1
CEnumParameter(nodemap, "TriggerSource").SetValue("Line1");
// Enable Timed exposure mode
CEnumParameter(nodemap, "ExposureMode").SetValue("Timed");
// ** Working with the Trigger Controlled exposure mode **
models();
// Select and enable the Exposure Start trigger
CEnumParameter(nodemap, "TriggerSelector").SetValue("ExposureStart");
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source for the Exposure Start trigger to Line 1
CEnumParameter(nodemap, "TriggerSource").SetValue("Line1");
// Select and enable the Exposure End trigger
CEnumParameter(nodemap, "TriggerSelector").SetValue("ExposureEnd");
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source for the Exposure End trigger to Line 2
CEnumParameter(nodemap, "TriggerSource").SetValue("Line2");
// Enable Trigger Controlled exposure mode
CEnumParameter(nodemap, "ExposureMode").SetValue("TriggerControlled");
// ** Working with the Timed exposure mode **
// Select and enable the Frame Start trigger
camera.Parameters[PLCamera.TriggerSelector].SetValue(PLCamera.TriggerSelector.FrameStart);
camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);
// Set the trigger source to Line 1
camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line1);
// Enable Timed exposure mode
camera.Parameters[PLCamera.ExposureMode].SetValue(PLCamera.ExposureMode.Timed);
// ** Working with the Trigger Controlled exposure mode **
models();
// Select and enable the Exposure Start trigger
camera.Parameters[PLCamera.TriggerSelector].SetValue(PLCamera.TriggerSelector.ExposureStart);
camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);
// Set the trigger source for the Exposure Start trigger to Line 1
camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line1);
// Select and enable the Exposure End trigger
camera.Parameters[PLCamera.TriggerSelector].SetValue(PLCamera.TriggerSelector.ExposureEnd);
camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);
// Set the trigger source for the Exposure End trigger to Line 2
camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line2);
// Enable Trigger Controlled exposure mode
camera.Parameters[PLCamera.ExposureMode].SetValue(PLCamera.ExposureMode.TriggerControlled);
// ** Working with the Timed exposure mode **
// Select and enable the Frame Start trigger
Pylon.DeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
Pylon.DeviceFeatureFromString(hdev, "TriggerMode", "On");
// Set the trigger source to Line 1
Pylon.DeviceFeatureFromString(hdev, "TriggerSource", "Line1");
// Enable Timed exposure mode
Pylon.DeviceFeatureFromString(hdev, "ExposureMode", "Timed");
// ** Working with the Trigger Controlled exposure mode **
// Cosatrans ERROR: cannot convert statement in line 10
// Select and enable the Exposure Start trigger
Pylon.DeviceFeatureFromString(hdev, "TriggerSelector", "ExposureStart");
Pylon.DeviceFeatureFromString(hdev, "TriggerMode", "On");
// Set the trigger source for the Exposure Start trigger to Line 1
Pylon.DeviceFeatureFromString(hdev, "TriggerSource", "Line1");
// Select and enable the Exposure End trigger
Pylon.DeviceFeatureFromString(hdev, "TriggerSelector", "ExposureEnd");
Pylon.DeviceFeatureFromString(hdev, "TriggerMode", "On");
// Set the trigger source for the Exposure End trigger to Line 2
Pylon.DeviceFeatureFromString(hdev, "TriggerSource", "Line2");
// Enable Trigger Controlled exposure mode
Pylon.DeviceFeatureFromString(hdev, "ExposureMode", "TriggerControlled");
/* 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 */
/* ** Working with the Timed exposure mode ** */
/* Select and enable the Frame Start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source to Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line1");
CHECK(errRes);
/* Enable Timed exposure mode */
errRes = PylonDeviceFeatureFromString(hdev, "ExposureMode", "Timed");
CHECK(errRes);
/* ** Working with the Trigger Controlled exposure mode ** */
/* Cosatrans ERROR: cannot convert statement in line */10
/* Select and enable the Exposure Start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSelector", "ExposureStart");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source for the Exposure Start trigger to Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line1");
CHECK(errRes);
/* Select and enable the Exposure End trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSelector", "ExposureEnd");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source for the Exposure End trigger to Line 2 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line2");
CHECK(errRes);
/* Enable Trigger Controlled exposure mode */
errRes = PylonDeviceFeatureFromString(hdev, "ExposureMode", "TriggerControlled");
CHECK(errRes);

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