Skip to content

Timer (ace)#

The Timer camera feature allows you to configure a timer output signal that goes high on specific camera events and goes low after a specific duration.

For a description of the Timer feature for ace 2 and boost cameras, click here.

Using the Feature#

How It Works#

This is how the timer works:

  • A trigger source event that starts the internal timer occurs.
  • A delay begins to expire.
  • When the delay has expired, the timer output signal goes high and stays high for the duration that you have configured.
  • When the signal's duration has expired, the timer output signal goes low.

Timer Operation

Configuring the Timer#

  1. Set the LineSelector parameter to the output line that you want to use for the timer signal.
    If the line is a GPIO line, the line must be configured as output.
  2. Set the LineSource parameter to TimerActive.
  3. Set the TimerTriggerSource parameter to one of the availabletrigger source events:

    • ExposureStart: The timer starts when the exposure starts.
    • FlashWindowStart: The timer starts when the flash window opens.
  4. Set the TimerDuration parameter to the desired timer duration in microseconds.

  5. Set the TimerDelay parameter to the desired timer delay in microseconds.

Info

On some camera models, you may have to increase the maximum timer duration and timer delay values.

Increasing the Maximum Timer Duration and Delay#

On some camera models, the TimerDuration and TimerDelay parameters are limited to a default maximum value of 4 095.

To increase the maximum timer duration on these models:

  1. Divide the desired timer duration by 4 095 and round up the result to the nearest integer.
    Example: Assume you want to set a timer duration of 50 000 µs. 50000 / 4095 = 12.21 ≈ 13.
  2. Set the TimerDurationTimebaseAbs parameter to the value determined in step 1, in this case 13.
  3. Set the TimerDuration parameter to the desired timer duration, in this case 50 000.
    Internally, the camera calculates the timer duration as follows: TimerDurationRaw x TimerDurationTimebaseAbs = TimerDurationAbs.

To increase the maximum timer delay on these models:

  1. Divide the desired timer delay by 4 095 and round up the result to the nearest integer.
    Example: Assume you want to set a timer delay of 6 000 µs. 6000 / 4095 = 1.47 ≈ 2.
  2. Set the TimerDelayTimebaseAbs parameter to the value determined in step 1, in this case 2.
  3. Set the TimerDelay parameter to the desired timer delay, in this case 6 000.
    Internally, the camera calculates the timer delay as follows: TimerDelayRaw x TimerDelayTimebaseAbs = TimerDelayAbs.

Info

Depending on the TimerDurationTimebaseAbs and TimerDelayTimebaseAbs parameter values, the camera may not be able to achieve the exact timer duration and delay desired.
For example, if you set the TimerDurationTimebaseAbs parameter to 13, the camera can only achieve timer durations that are a multiple of 13. Therefore, if you set the TimerDuration parameter to 50 000 and the TimerDurationTimebaseAbs parameter to 13, the camera will automatically change the setting to the nearest possible value (e.g., 49 998, which is the nearest multiple of 13).

Additional Parameters#

  • TimerSelector: Sets which timer to configure. Because Basler ace cameras support only one timer, this parameter is preset and can't be changed.

Specifics#

Show all camera models

Camera Model Default Maximum Value for Timer Duration and Delay Available Trigger Source Event
a2A1920-51gcBAS See Timer (ace 2, boost) -
a2A1920-51gcPRO See Timer (ace 2, boost) -
a2A1920-51gmBAS See Timer (ace 2, boost) -
a2A1920-51gmPRO See Timer (ace 2, boost) -
a2A1920-160ucBAS See Timer (ace 2, boost) -
a2A1920-160ucPRO See Timer (ace 2, boost) -
a2A1920-160umBAS See Timer (ace 2, boost) -
a2A1920-160umPRO See Timer (ace 2, boost) -
a2A2590-22gcBAS See Timer (ace 2, boost) -
a2A2590-22gcPRO See Timer (ace 2, boost) -
a2A2590-22gmBAS See Timer (ace 2, boost) -
a2A2590-22gmPRO See Timer (ace 2, boost) -
a2A2590-60ucBAS See Timer (ace 2, boost) -
a2A2590-60ucPRO See Timer (ace 2, boost) -
a2A2590-60umBAS See Timer (ace 2, boost) -
a2A2590-60umPRO See Timer (ace 2, boost) -
a2A3840-13gcBAS See Timer (ace 2, boost) -
a2A3840-13gcPRO See Timer (ace 2, boost) -
a2A3840-13gmBAS See Timer (ace 2, boost) -
a2A3840-13gmPRO See Timer (ace 2, boost) -
a2A3840-45ucBAS See Timer (ace 2, boost) -
a2A3840-45ucPRO See Timer (ace 2, boost) -
a2A3840-45umBAS See Timer (ace 2, boost) -
a2A3840-45umPRO See Timer (ace 2, boost) -
acA640-90gc 4 095 Exposure Start
acA640-90gm 4 095 Exposure Start
acA640-90uc 16 777 215 Exposure Start
acA640-90um 16 777 215 Exposure Start
acA640-120gc 4 095 Exposure Start
acA640-120gm 4 095 Exposure Start
acA640-120uc 16 777 215 Exposure Start
acA640-120um 16 777 215 Exposure Start
acA640-121gm 16 777 215 Exposure Start
acA640-300gc 16 777 215 Exposure Start
acA640-300gm 16 777 215 Exposure Start
acA640-750uc 16 777 215 Exposure Start
acA640-750um 16 777 215 Exposure Start
acA720-290gc 16 777 215 Exposure Start
acA720-290gm 16 777 215 Exposure Start
acA720-520uc 16 777 215 Exposure Start
acA720-520um 16 777 215 Exposure Start
acA780-75gc 4 095 Exposure Start
acA780-75gm 4 095 Exposure Start
acA800-200gc 16 777 215 Exposure Start
acA800-200gm 16 777 215 Exposure Start
acA800-510uc 16 777 215 Exposure Start
acA800-510um 16 777 215 Exposure Start
acA1280-60gc 4 095 Exposure Start
acA1280-60gm 4 095 Exposure Start
acA1300-22gc 4 095 Exposure Start
acA1300-22gm 4 095 Exposure Start
acA1300-30gc 4 095 Exposure Start
acA1300-30gm 4 095 Exposure Start
acA1300-30uc 16 777 215 Exposure Start
acA1300-30um 16 777 215 Exposure Start
acA1300-60gc 4 095 Exposure Start
acA1300-60gm 4 095 Exposure Start
acA1300-60gmNIR 4 095 Exposure Start
acA1300-75gc 16 777 215 Exposure Start
acA1300-75gm 16 777 215 Exposure Start
acA1300-200uc 16 777 215 Exposure Start
acA1300-200um 16 777 215 Exposure Time
acA1440-73gc 16 777 215 Exposure Start
acA1440-73gm 16 777 215 Exposure Start
acA1440-220uc 16 777 215 Exposure Start
acA1440-220um 16 777 215 Exposure Start
acA1600-20gc 4 095 Exposure Start
acA1600-20gm 4 095 Exposure Start
acA1600-20uc 16 777 215 Exposure Start
acA1600-20um 16 777 215 Exposure Start
acA1600-60gc 4 095 Exposure Start
acA1600-60gm 4 095 Exposure Start
acA1920-25gc 4 095 Exposure Start
acA1920-25gm 4 095 Exposure Start
acA1920-25uc 16 777 215 Exposure Start
acA1920-25um 16 777 215 Exposure Start
acA1920-40gc 16 777 215 Exposure Start
acA1920-40gm 16 777 215 Exposure Start
acA1920-40uc 16 777 215 Exposure Start
acA1920-40ucMED 16 777 215 Exposure Start
acA1920-40um 16 777 215 Exposure Start
acA1920-40umMED 16 777 215 None
acA1920-48gc 16 777 215 Exposure Start
acA1920-48gm 16 777 215 Exposure Start
acA1920-50gc 16 777 215 Exposure Start
acA1920-50gm 16 777 215 Exposure Start
acA1920-150uc 16 777 215 Exposure Start
acA1920-150um 16 777 215 Exposure Start
acA1920-155uc 16 777 215 Exposure Start
acA1920-155ucMED 16 777 215 Exposure Start
acA1920-155um 16 777 215 Exposure Start
acA1920-155umMED 16 777 215 Exposure Start
acA2000-50gc 4 095 Exposure Start
acA2000-50gm 4 095 Exposure Start
acA2000-50gmNIR 4 095 Exposure Start
acA2000-165uc 16 777 215 Exposure Start
acA2000-165um 16 777 215 Exposure Start
acA2000-165umNIR 16 777 215 Exposure Start
acA2040-25gc 4 095 Exposure Start
acA2040-25gm 4 095 Exposure Start
acA2040-25gmNIR 4 095 Exposure Start
acA2040-35gc 16 777 215 Exposure Start
acA2040-35gm 16 777 215 Exposure Start
acA2040-55uc 16 777 215 Exposure Start
acA2040-55um 16 777 215 Exposure Start
acA2040-90uc 16 777 215 Exposure Start
acA2040-90um 16 777 215 Exposure Start
acA2040-90umNIR 16 777 215 Exposure Start
acA2040-120uc 16 777 215 Exposure Start
acA2040-120um 16 777 215 Exposure Start
acA2440-20gc 16 777 215 Exposure Start
acA2440-20gm 16 777 215 Exposure Start
acA2440-35uc 16 777 215 Exposure Start
acA2440-35ucMED 16 777 215 Exposure Start
acA2440-35um 16 777 215 Exposure Start
acA2440-35umMED 16 777 215 Exposure Start
acA2440-75uc 16 777 215 Exposure Start
acA2440-75ucMED 16 777 215 Exposure Start
acA2440-75um 16 777 215 Exposure Start
acA2440-75umMED 16 777 215 Exposure Start
acA2500-14gc 4 095 Exposure Start
acA2500-14gm 4 095 Exposure Start
acA2500-14uc 16 777 215 Exposure Start
acA2500-14um 16 777 215 Exposure Start
acA2500-20gc 16 777 215 Exposure Start
acA2500-20gcMED 16 777 215 Exposure Start
acA2500-20gm 16 777 215 Exposure Start
acA2500-20gmMED 16 777 215 Exposure Start
acA2500-60uc 16 777 215 Exposure Start
acA2500-60um 16 777 215 Exposure Start
acA3088-16gc 16 777 215 Exposure Start
acA3088-16gm 16 777 215 Exposure Start
acA3088-57uc 16 777 215 Exposure Start
acA3088-57um 16 777 215 Exposure Time
acA3800-10gc 4 095 Exposure Start
acA3800-10gm 4 095 Flash Window Start
acA3800-14uc 16 777 215 Flash Window Start
acA3800-14um 16 777 215 Flash Window Start
acA4024-8gc 16 777 215 Exposure Start
acA4024-8gm 16 777 215 Exposure Start
acA4024-29uc 16 777 215 Exposure Start
acA4024-29um 16 777 215 Exposure Start
acA4096-11gc 16 777 215 Exposure Start
acA4096-11gm 16 777 215 Exposure Start
acA4096-30uc 16 777 215 Exposure Start
acA4096-30ucMED 16 777 215 Exposure Start
acA4096-30um 16 777 215 Exposure Start
acA4096-30umMED 16 777 215 Exposure Start
acA4096-40uc 16 777 215 Exposure Start
acA4096-40ucMED 16 777 215 Exposure Time
acA4096-40um 16 777 215 Exposure Start
acA4096-40umMED 16 777 215 Exposure Time
acA4112-8gc 16 777 215 Exposure Start
acA4112-8gm 16 777 215 Exposure Start
acA4112-20uc 16 777 215 Exposure Start
acA4112-20ucMED 16 777 215 Exposure Start
acA4112-20um 16 777 215 Exposure Start
acA4112-20umMED 16 777 215 Exposure Start
acA4112-30uc 16 777 215 Exposure Start
acA4112-30ucMED 16 777 215 Exposure Start
acA4112-30um 16 777 215 Exposure Start
acA4112-30umMED 16 777 215 Exposure Time
acA4600-7gc 4 095 Flash Window
acA4600-10uc 16 777 215 Flash Window Start
acA5472-5gc 16 777 215 Exposure Start
acA5472-5gm 16 777 215 Exposure Start
acA5472-17uc 16 777 215 Exposure Start
acA5472-17ucMED 16 777 215 Exposure Start
acA5472-17um 16 777 215 Exposure Start
boA4096-93cc See Timer (ace 2, boost) -
boA4096-93cm See Timer (ace 2, boost) -
boA4112-68cc See Timer (ace 2, boost) -
boA4112-68cm See Timer (ace 2, boost) -
daA1280-54lc Timer feature not supported Timer feature not supported
daA1280-54lm Timer feature not supported Timer feature not supported
daA1280-54uc Timer feature not supported Timer feature not supported
daA1280-54um Timer feature not supported Timer feature not supported
daA1600-60lc Timer feature not supported Timer feature not supported
daA1600-60lm 16 777 215 Exposure Start
daA1600-60uc Timer feature not supported Timer feature not supported
daA1600-60um Timer feature not supported Timer feature not supported
daA1920-15um Timer feature not supported Timer feature not supported
daA1920-30uc Timer feature not supported Timer feature not supported
daA1920-30um Timer feature not supported Timer feature not supported
daA2500-14lc Timer feature not supported Timer feature not supported
daA2500-14lm Timer feature not supported Timer feature not supported
daA2500-14uc Timer feature not supported Timer feature not supported
daA2500-14um Timer feature not supported Timer feature not supported
daA2500-60mc Timer feature not supported Timer feature not supported
daA2500-60mci Timer feature not supported Timer feature not supported
daA4200-30mci Timer feature not supported Timer feature not supported
puA1280-54uc Timer feature not supported Timer feature not supported
puA1600-60uc Timer feature not supported Timer feature not supported
puA1600-60um Timer feature not supported Timer feature not supported
puA1920-30uc Timer feature not supported Timer feature not supported
puA1920-30um Timer feature not supported Timer feature not supported
puA2500-14uc Timer feature not supported Timer feature not supported
puA2500-14um Timer feature not supported Timer feature not supported

Sample Code#

ace classic/U/L GigE Cameras#

// Select Line 2 (output line)
camera.LineSelector.SetValue(LineSelector_Line2);
// Specify that the timer signal is output on Line 2
camera.LineSource.SetValue(LineSource_TimerActive);
// Specify that the timer starts when exposure starts
camera.TimerTriggerSource.SetValue(TimerTriggerSource_ExposureStart);
// Set the timer duration to 1000 microseconds
camera.TimerDurationAbs.SetValue(1000.0);
// Set the timer delay to 500 microseconds
camera.TimerDelayAbs.SetValue(500.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 2 (output line)
CEnumerationPtr(nodemap.GetNode("LineSelector"))->FromString("Line2");
// Specify that the timer signal is output on Line 2
CEnumerationPtr(nodemap.GetNode("LineSource"))->FromString("TimerActive");
// Specify that the timer starts when exposure starts
CEnumerationPtr(nodemap.GetNode("TimerTriggerSource"))->FromString("ExposureStart");
// Set the timer duration to 1000 microseconds
CFloatPtr(nodemap.GetNode("TimerDurationAbs"))->SetValue(1000.0);
// Set the timer delay to 500 microseconds
CFloatPtr(nodemap.GetNode("TimerDelayAbs"))->SetValue(500.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 2 (output line)
CEnumParameter(nodemap, "LineSelector").SetValue("Line2");
// Specify that the timer signal is output on Line 2
CEnumParameter(nodemap, "LineSource").SetValue("TimerActive");
// Specify that the timer starts when exposure starts
CEnumParameter(nodemap, "TimerTriggerSource").SetValue("ExposureStart");
// Set the timer duration to 1000 microseconds
CFloatParameter(nodemap, "TimerDurationAbs").SetValue(1000.0);
// Set the timer delay to 500 microseconds
CFloatParameter(nodemap, "TimerDelayAbs").SetValue(500.0);
// Select Line 2 (output line)
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line2);
// Specify that the timer signal is output on Line 2
camera.Parameters[PLCamera.LineSource].SetValue(PLCamera.LineSource.TimerActive);
// Specify that the timer starts when exposure starts
camera.Parameters[PLCamera.TimerTriggerSource].SetValue(PLCamera.TimerTriggerSource.ExposureStart);
// Set the timer duration to 1000 microseconds
camera.Parameters[PLCamera.TimerDurationAbs].SetValue(1000.0);
// Set the timer delay to 500 microseconds
camera.Parameters[PLCamera.TimerDelayAbs].SetValue(500.0);
// Select Line 2 (output line)
Pylon.DeviceFeatureFromString(hdev, "LineSelector", "Line2");
// Specify that the timer signal is output on Line 2
Pylon.DeviceFeatureFromString(hdev, "LineSource", "TimerActive");
// Specify that the timer starts when exposure starts
Pylon.DeviceFeatureFromString(hdev, "TimerTriggerSource", "ExposureStart");
// Set the timer duration to 1000 microseconds
Pylon.DeviceSetFloatFeature(hdev, "TimerDurationAbs", 1000.0);
// Set the timer delay to 500 microseconds
Pylon.DeviceSetFloatFeature(hdev, "TimerDelayAbs", 500.0);
/* 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 */
/* Select Line 2 (output line) */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line2");
CHECK(errRes);
/* Specify that the timer signal is output on Line 2 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSource", "TimerActive");
CHECK(errRes);
/* Specify that the timer starts when exposure starts */
errRes = PylonDeviceFeatureFromString(hdev, "TimerTriggerSource", "ExposureStart");
CHECK(errRes);
/* Set the timer duration to 1000 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "TimerDurationAbs", 1000.0);
CHECK(errRes);
/* Set the timer delay to 500 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "TimerDelayAbs", 500.0);
CHECK(errRes);

Other Cameras#

// Select Line 2 (output line)
camera.LineSelector.SetValue(LineSelector_Line2);
// Specify that the timer signal is output on Line 2
camera.LineSource.SetValue(LineSource_Timer1Active);
// Specify that the timer starts when exposure starts
camera.TimerTriggerSource.SetValue(TimerTriggerSource_ExposureStart);
// Set the timer duration to 1000 microseconds
camera.TimerDuration.SetValue(1000.0);
// Set the timer delay to 500 microseconds
camera.TimerDelay.SetValue(500.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 2 (output line)
CEnumerationPtr(nodemap.GetNode("LineSelector"))->FromString("Line2");
// Specify that the timer signal is output on Line 2
CEnumerationPtr(nodemap.GetNode("LineSource"))->FromString("Timer1Active");
// Specify that the timer starts when exposure starts
CEnumerationPtr(nodemap.GetNode("TimerTriggerSource"))->FromString("ExposureStart");
// Set the timer duration to 1000 microseconds
CFloatPtr(nodemap.GetNode("TimerDuration"))->SetValue(1000.0);
// Set the timer delay to 500 microseconds
CFloatPtr(nodemap.GetNode("TimerDelay"))->SetValue(500.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 2 (output line)
CEnumParameter(nodemap, "LineSelector").SetValue("Line2");
// Specify that the timer signal is output on Line 2
CEnumParameter(nodemap, "LineSource").SetValue("Timer1Active");
// Specify that the timer starts when exposure starts
CEnumParameter(nodemap, "TimerTriggerSource").SetValue("ExposureStart");
// Set the timer duration to 1000 microseconds
CFloatParameter(nodemap, "TimerDuration").SetValue(1000.0);
// Set the timer delay to 500 microseconds
CFloatParameter(nodemap, "TimerDelay").SetValue(500.0);
// Select Line 2 (output line)
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line2);
// Specify that the timer signal is output on Line 2
camera.Parameters[PLCamera.LineSource].SetValue(PLCamera.LineSource.Timer1Active);
// Specify that the timer starts when exposure starts
camera.Parameters[PLCamera.TimerTriggerSource].SetValue(PLCamera.TimerTriggerSource.ExposureStart);
// Set the timer duration to 1000 microseconds
camera.Parameters[PLCamera.TimerDuration].SetValue(1000.0);
// Set the timer delay to 500 microseconds
camera.Parameters[PLCamera.TimerDelay].SetValue(500.0);
// Select Line 2 (output line)
Pylon.DeviceFeatureFromString(hdev, "LineSelector", "Line2");
// Specify that the timer signal is output on Line 2
Pylon.DeviceFeatureFromString(hdev, "LineSource", "Timer1Active");
// Specify that the timer starts when exposure starts
Pylon.DeviceFeatureFromString(hdev, "TimerTriggerSource", "ExposureStart");
// Set the timer duration to 1000 microseconds
Pylon.DeviceSetFloatFeature(hdev, "TimerDuration", 1000.0);
// Set the timer delay to 500 microseconds
Pylon.DeviceSetFloatFeature(hdev, "TimerDelay", 500.0);
/* 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 */
/* Select Line 2 (output line) */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line2");
CHECK(errRes);
/* Specify that the timer signal is output on Line 2 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSource", "Timer1Active");
CHECK(errRes);
/* Specify that the timer starts when exposure starts */
errRes = PylonDeviceFeatureFromString(hdev, "TimerTriggerSource", "ExposureStart");
CHECK(errRes);
/* Set the timer duration to 1000 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "TimerDuration", 1000.0);
CHECK(errRes);
/* Set the timer delay to 500 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "TimerDelay", 500.0);
CHECK(errRes);

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