Triggering according to the Lego principle

We are all familiar with them. The colourful plastic bricks with the patented stud system, which allows you to combine the bricks in any way you wish and let your imagination run free. The Lego principle is as ingenious as it is simple and has turned out to be a recipe for success. The world of machine vision has made good use of this principle.

Undiscovered possibilities

Camera trigger signals today are much more than hardware lines, which start an image acquisition in the camera firmware within a matter of microseconds. Thanks to GenICam and the SFNC, trigger signals have become abstract signal definitions with a defined behavior and wide-ranging benefits. The separation of trigger-activating signals (software) from trigger-capable device inputs (hardware) makes the possible applications of triggers all the more varied. Furthermore, image acquisition is no longer restricted to an external source. Counters, timers, generated PWM signals or a software event are also potential signaling devices.

With the release of the Vision Firmware V1.5, numerous features have been added to the trigger configuration of IDS cameras. Thus, countless connection options are available for the trigger sources.

Trigger use cases

Function blocks, such as timers, counters, PWM or UserOutput may, in turn, also be flexibly interconnected. This opens up innumerable possibilities for controlling image acquisition for a vision camera. The following use cases describe just some examples of the many trigger options which can be implemented using IDS vision cameras (as of Vision Firmware V1.5). These are described in such a way that you can reconstruct them directly with the IDS Vision Cockpit using the GenICam node tree.

Non-cyclic image acquisition

Use case: Different types of parts are transported on a conveyor belt. A light barrier triggers image acquisition of the parts to read out barcodes for part identification purposes.

read more ...

Characteristics

  • The trigger signal is a software or hardware trigger, for example.
  • Non-cyclic trigger signals occur as a result of different parts and distances.
  • Immediately after the trigger signal, acquisition starts with the exposure.
  • To produce sharp images, the exposure time is preset to the lighting conditions and speed of the conveyor belt.
  • Precisely one image is captured for each trigger signal.
  • During the acquisition and readout time, no further trigger signal is accepted.

Parameter Settings

AcquisitionMode   = Continuous
ExposureTime      = 15000
TriggerSelector   = ExposureStart
    TriggerMode   = On
    TriggerSource = Line0

The AcquisitionStart command prepares the system to receive trigger signals:

Acquisition Start

Execute AcquisitionStart

If "Line0" is set as the TriggerSource, external hardware trigger sources can now start the exposure, e.g. using signals from a light barrier or a button.

If "Software" is the TriggerSource, use the software trigger command:

Acquisition

TriggerSource = Software
    Execute TriggerSoftware

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram of the non-cyclic image acquisition

Signal/time diagram of the non-cyclic image acquisition

Delayed image acquisition

Use case: In a conveyor system, where the trigger sensor cannot be mounted next to the camera for constructional reasons, image acquisition must be started with a delay. The time delay depends on the conveyor speed.

read more ...

Characteristics

  • The trigger signal is a software or hardware trigger, for example.
  • Image acquisition starts the specified exposure time with a delay (TriggerDelay) with respect to the trigger signal.
  • The TriggerDelay time can be configured (in microseconds from 0 to approx. 16 sec).
  • Precisely one image is captured for each trigger signal.
  • The individual trigger signals may occur non-cyclically.
  • No further trigger signal is accepted during the TriggerDelay and acquisition.

Parameter Settings

AcquisitionMode   = Continuous
ExposureTime      = 15000
TriggerSelector   = ExposureStart
    TriggerMode   = On
    TriggerSource = Line0
    TriggerDelay  = 500

With these trigger settings, exposure is only started 500 µs after the Line0 trigger signal occurs.

The TriggerDelay can be used with any other TriggerSelector or TriggerSource.

The AcquisitionStart command prepares the system to receive trigger signals.

Acquisition Start

Execute AcquisitionStart

If "Line0" is set as the TriggerSource, external hardware trigger sources can now start the exposure, e.g. using signals from a light barrier or a button.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram of the delayed image acquisition

Signal/time diagram of the delayed image acquisition

Scaled triggering

Use case: A print web is captured by an IDS camera in line-scan mode. An encoder specifies the cycle time that will allow you to synchronize acquisition with the machine speed and keep the pixels the same size. However, the encoder frequency is not the same as the line frequency, which means that the cycle time must be reduced with the trigger prescaler.

read more ...

Characteristics

  • The input signal is received via a software or hardware trigger.
  • The trigger signal starts the specified exposure time for each image acquisition.
  • Precisely one image is captured for each trigger signal.
  • Each xth trigger signal can be processed by the TriggerDivider.

The start signal for the ExposureStart is configured so that an image is only captured on Line0 every 4th signal.

Parameter Settings

AcquisitionMode    = Continuous
ExposureTime       = 15000
TriggerSelector    = ExposureStart
    TriggerMode    = On
    TriggerSource  = Line0
    TriggerDivider = 4

By starting acquisition manually, the system is now prepared to receive trigger signals.

Acquisition Start

Execute AcquisitionStart

If "Line0" is set as the TriggerSource, external hardware trigger sources can now start the exposure, e.g. the print web encoder.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram of scaled triggering

Signal/time diagram of scaled triggering

Triggering the acquisition period

Use Case: You want to observe a drop falling. When the drop enters the image area, it is detected by a light barrier and image acquisition starts. Images are captured which document the surface movement of the drop as it falls. A second light barrier at the bottom edge of the image ends acquisition as soon as the drop leaves the image area.

read more ...

Characteristics

  • During the active phase of the trigger signal, images are captured continuously.
  • The frame rate and exposure time are fixed.
  • The number of images captured is determined by the duration of the active signal phase and the configured frame rate.

Acquisition Configuration

AcquisitionMode        = Continuous
AcquisitionFrameRate   = 30
ExposureTime           = 1000
TriggerSelector        = AcquisitionStart
    TriggerMode        = On
    TriggerSource      = Line0
    TriggerActiviation = RisingEdge
TriggerSelector        = AcquisitionStop
    TriggerMode        = On
    TriggerSource      = Line0
    TriggerActiviation = FallingEdge

The AcquisitionStart command prepares the system to receive trigger signals.

Acquisition Start

Execute AcquisitionStart

If "Line0" is set as the TriggerSource (rising edge), continuous acquisition starts. If the edge of the trigger signal is on "Line0", continuous acquisition ends.

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for triggering the acquisition period

Signal/time diagram for triggering the acquisition period

Cyclical triggering

Use Case: You want to document the course of an object’s movement by means of a time-lapse recording. The exposure time is adapted to the specified length of time.

read more ...

Characteristics

  • Cyclical trigger signals can be generated by a timer or by a PWM signal.
    • For high-frequency signals (up to 100 kHz), it is better to use a PWM signal.
    • For low-frequency signals (e.g. 1 frame per minute), you can use a timer with an optional trigger signal.
  • By using an additional controllable signal level (e.g. UserOutput), you can restart a timer at regular intervals.
  • The trigger signal starts the specified exposure time for each image acquisition.
  • Precisely one image is captured for each trigger signal.

Parameter Settings

AcquisitionMode    = Continuous
ExposureTime       = 15000
TriggerSelector    = ExposureStart
    TriggerMode    = On
    TriggerSource  = Timer0Start
    TriggerDivider = 6

The Timer0 is configured to run for 10 seconds (10,000,000 µs). If the signal level of UserOutput0 is set to "LevelHigh", Timer0 constantly restarts. In combination with the divider trigger, only the sixth timer start leads to an acquisition.

Timer Settings

TimerSelector              = Timer0
    TimerDuration          = 10000000
    TimerTriggerSource     = UserOutput0
    TimerTriggerActivation = LevelHigh

By starting acquisition manually, the system is now prepared to receive trigger signals. However, acquisition does not start until the timer starts running.

Acquisition Start

Execute AcquisitionStart

If UserOutput0 is now set to True (=LevelHigh), the timer starts and the first frame is captured immediately. It is recommended to first execute the TimerReset command. This ensures that even the first interval is reset to full length.

Timer Start

TimerSelector = Timer0
    Execute TimerReset
 
UserOutput0   = True

Using these settings, one image is captured every minute until AcquisitionStop is executed or UserOutput0 is set to False (=LevelLow).

Acquisition Stop

UserOutput0   = False
Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for cyclical triggering

Signal/time diagram for cyclical triggering

Triggered exposure time

Use Case: A camera delivers images that are processed and evaluated directly. It is also possible to determine here whether the images are over or under exposed. The exposure time for the next acquisition can then be adapted dynamically using the pulse generator without needing to change the parameters in the camera.

read more ...

This type of acquisition is also referred to as “level controlled exposure” or “bulb mode”.

Characteristics

  • The trigger pulse width determines the exposure time.
    • The exposure starts as early as possible after the exposure start trigger begins (in this case: rising edge on Line0).
    • The exposure lasts as long as the time specified by the trigger signals.
    • The exposure lasts at least as long as is defined in TriggerControlledExposureTimeMin.
    • The exposure is terminated at the latest after TriggerControlledExposureTimeMax.
  • Precisely one image is captured for each trigger signal.

Acquisition Configuration

AcquisitionMode   = Continuous
TriggerSelector   = ExposureStart
    TriggerMode       = On
    TriggerSource     = Line0
    TriggerActivation = RisingEdge
TriggerSelector   = ExposureEnd
    TriggerMode       = On
    TriggerSource     = Line0
    TriggerActivation = FallingEdge
TriggerControlledExposureTimeMin = 500
TriggerControlledExposureTimeMax = 1000000

Using the parameters TriggerControlledExposureTimeMin or TriggerControlledExposureTimeMax, you restrict the exposure time to a time range that is suitable for your application. This allows you to avoid exposure times that are too short or too long.

The AcquisitionStart command prepares the system to receive trigger signals.

Acquisition Start

Execute AcquisitionStart

If "Line0" is set as the TriggerSource, an external pulse generator can now control the exposure of acquisitions.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully transferred upon execution of the AcquisitionStop command.

Interleaved image acquisition

A trigger-controlled exposure time can also be “interleaved” (Interleaved Image Acquisition), depending on the sensor of the camera used. The sensor is already lit up during the readout time ready for the next acquisition. This allows maximum frame rates to be achieved. The TriggerControlledExposureTimeMin parameter also determines the degree of interleaving. The following applies:

  • The higher the TriggerControlledExposureTimeMin is set, the more interleaving is allowed.
  • If TriggerControlledExposureTimeMin is greater than the duration of the readout, the extent of interleaving does not increase further.

Signal/time diagram for triggered exposure time

Signal/time diagram for triggered exposure time

Fastest possible counted image sequence

Use Case: A camera captures parts which are transported on a conveyor belt and are to be subject to quality inspections. Since, for technical reasons, there is no option to hold the light source stable, three images are always taken in quick succession with different exposure times. The image with the best exposure is then analyzed.

read more ...

Characteristics

  • Several images are captured in quick succession ("burst") for each trigger signal.
  • The trigger signal is a software or a hardware trigger, for example.
  • The exposure time is preset.
  • The series of images is captured as quickly as the sensor will allow.
  • A counter is used as a tool for the counted image sequence, which ends acquisition automatically when the required number of images is reached.
  • No further trigger signal is processed while the counter is active.

The parameters for acquisition are configured in such a way that images are captured while the counter is counting, i.e. is “active”. The exposure time must be set beforehand!

Parameter Settings

AcquisitionMode   = Continuous
ExposureTime      = 15000
TriggerSelector   = ExposureStart
    TriggerMode       = On
    TriggerSource     = Counter0Active
    TriggerActivation = LevelHigh

The counter is triggered by an external hardware signal (Line0). Its end value (Duration) is set to the required number of image series. Counting is based on the ExposureStart event. The start signal (CounterTrigger) also resets the counter at the same time. (Counter Reset).

Counter Settings

CounterSelector      = Counter0
    CounterTriggerSource = Line0
    CounterResetSource   = CounterTrigger
    CounterEventSource   = ExposureStart
    CounterDuration      = 3

By starting acquisition manually, the system is prepared. However, acquisition does not start until the counter is active.

Acquisition Start

Execute AcquisitionStart

You can now capture series of images using the hardware trigger (Line0). Acquisition stops automatically when the counter reaches the preset end value.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for the fastest possible counted image sequence

Signal/time diagram for the fastest possible counted image sequence

Counted image sequence with fixed frame rate

Use Case: A camera is used at a set of traffic lights to record the behavior of drivers upon crossing the stop line while the lights are on red. A series of images with an adapted frame rate allows you to draw conclusions with regard to speed, the braking action or a change of direction. This allows you to differentiate between a driver who accidentally crosses the stop line slowly and then stops and one who commits a real traffic violation and fails to stop.

read more ...

Characteristics

  • A defined number of images are captured for each trigger signal.
  • The trigger signal is a software or a hardware trigger, for example.
  • The exposure time is preset.
  • The image series is captured at a specified frame rate.
  • A counter is used as a tool for the counted image sequence, which ends acquisition automatically when the required number of images is reached.
  • No further trigger signal is processed while the counter is active.

The parameters for acquisition are configured in such a way that images are captured while the counter is counting, i.e. is “active”. The exposure time and frame rate must be set beforehand!

The hardware trigger (Line0) starts the recording of the image series. This stops automatically when the Counter0 end value is reached.

Parameter Settings

AcquisitionMode      = Continuous
AcquisitionFrameRate = 30
ExposureTime         = 30000
TriggerSelector = AcquisitionStart
    TriggerMode     = On
    TriggerSource   = Line0
TriggerSelector = AcquisitionStop
    TriggerMode     = On
    TriggerSource   = Counter0End

The counter end value (Duration) is set to the required number of image series. Counting is based on the FrameStart event. The start signal (CounterTrigger) also resets the counter at the same time. (Counter Reset).

Counter Settings

CounterSelector      = Counter0
    CounterTriggerSource = AcquisitionStart
    CounterResetSource   = CounterTrigger
    CounterEventSource   = FrameStart
    CounterDuration      = 3

By starting acquisition manually, the system is prepared.

Acquisition Start

Execute AcquisitionStart

A hardware trigger (Line0) starts the image series.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for the counted image sequence with fixed frame rate

Signal/time diagram for the counted image sequence with fixed frame rate

Fastest possible time-controlled image sequence

Use Case: You want to examine the impact of a drop on different surfaces. To do so, acquisition is always triggered if a drop falls within the image area. In this case, acquisition is maintained at the maximum frame rate for a specified time in order to document the behavior upon impact.

read more ...

Characteristics

  • Several images are captured in quick succession ("burst") for each trigger signal.
  • The trigger signal is a software or a hardware trigger, for example.
  • The exposure time is preset.
  • The series of images is captured as quickly as the sensor will allow.
  • A timer is used as a tool for the image sequence, which ends acquisition automatically when the set time has elapsed.
  • No further trigger signal is processed while the timer is active.

Depending on the speed and data quantity of the “burst”, the maximum bandwidth of the data interface may be exceeded! You must therefore check whether a burst such as this can be maintained and, if so, for how long, and how long the intervals between the individual bursts need to be.

The parameters for acquisition are configured in such a way that images are captured while Timer0 is running, i.e. is “active”. In other words, as soon as the sensor is ready again after acquisition, the next acquisition starts immediately.

Acquisition Configuration

AcquisitionMode   = Continuous
ExposureTime      = 15000
TriggerSelector   = ExposureStart
    TriggerMode       = On
    TriggerSource     = Timer0Active
    TriggerActivation = LevelHigh

The timer is triggered by the rising signal edge of an external hardware signal (Line0). Its duration (TimerDuration) is set to precisely one second (1 s = 1000000 µs).

Timer Configuration

TimerSelector          = Timer0
    TimerDuration          = 1000000
    TimerTriggerSource     = Line0
    TimerTriggerActivation = RisingEdge

By starting acquisition manually, the system is now prepared to receive a trigger signal.

Acquisition Start

Execute AcquisitionStart

You can now capture series of images using the hardware trigger (Line0). Acquisition stops automatically when the timer reaches the preset time.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for the fastest possible time-controlled image sequence

Signal/time diagram for the fastest possible time-controlled image sequence

Time-controlled image sequence with fixed frame rate

Use Case: The reaction of test objects is to be analyzed and tested when a specific event occurs, e.g. reaction time, behavior, decisions. To do so, image acquisition starts when an external trigger signal is received. For a predefined time period, images are captured at a suitable frame rate to document the reaction.

read more ...

Characteristics

  • Several images are captured in a specified time.
  • The trigger signal is a software or a hardware trigger, for example.
  • The exposure time is preset.
  • The image series is captured at a specified frame rate.
  • A timer is used as a tool for the image sequence, which ends acquisition automatically when the set time has elapsed.
  • No further trigger signal is processed while the timer is active.

Continuous acquisition (10 fps) starts with an external trigger signal (Line0) and ends when the Timer0 period that was started in parallel elapses.

Acquisition Configuration

AcquisitionMode   = Continuous
ExposureTime      = 15000
AcquisitionFrameRate = 10
TriggerSelector   = AcquisitionStart
    TriggerMode       = On
    TriggerSource     = Line0
    TriggerActivation = RisingEdge
TriggerSelector   = AcquisitionEnd
    TriggerMode       = On
    TriggerSource     = Timer0End
    TriggerActivation = RisingEdge

The timer is triggered when image acquisition starts (AcquisitionStart) and is set to precisely one second (1 s = 1000000 µs).

Timer Configuration

TimerSelector          = Timer0
    TimerDuration          = 1000000
    TimerTriggerSource     = AcquisitionStart
    TimerTriggerActivation = RisingEdge

By starting acquisition manually, the system is now prepared to receive a trigger signal.

Acquisition Start

Execute AcquisitionStart

You can now capture series of images using the hardware trigger (Line0). Acquisition stops automatically when the timer reaches the preset time. Each additional hardware trigger starts a new series of images.

The AcquisitionStop command ends acquisition mode:

Acquisition Stop

Execute AcquisitionStop

Any acquisitions that have already started are still fully exposed and transferred upon execution of the AcquisitionStop command.

Signal/time diagram for a time-controlled image sequence with fixed frame rate

Signal/time diagram for a time-controlled image sequence with fixed frame rate

Trigger tips

The following tips and notes help you to avoid errors and better understand the behavior of the trigger features:

  • Indented parameters may occur more than once and may have a different value for each parent node.
  • Always set trigger sources that are not required to inactive (“OFF”).
  • Any image acquisitions that have already started are always fully exposed and transferred, even if control signals end in the meantime.
  • To configure trigger parameters, image acquisition must be stopped (AcquisitionStop)! To subsequently use the configured trigger, image acquisition must be started again (AcquisitionStart)!
  • If trigger mode is enabled (TriggerMode = ON), the AcquisitionStart command simply sets image acquisition to "ready". Image acquisition only starts with a defined trigger signal for the configured TriggerSource.
  • If images are to be triggered continuously, AcquisitionMode is typically set to continuous. Otherwise, image acquisition ends automatically if one image (Single Frame) or a number of X images (Multi Frame) have been captured.
  • You can easily simulate external trigger signals using "UserOutputs".
read more ...

Simulating an external trigger signal

If you wish to test complex trigger applications and do not have any hardware signals available, you can still simulate a trigger signal. To do so, place a UserOutput on a Line (hardware input) and configure this as the output. You can now use the UserOutput to activate and deactivate the Line, as though a hardware signal were present there.

Example: Simulated hardware trigger on Line2

The ExposureStart trigger is placed on Line2:

Acquisition Configuration

TriggerSource = Line2

Line2 is configured as though it were an output with a signal input from UserOutput0:

Line Configuration

LineSelector = Line2
LineMode     = Output
LineSource   = UserOutput0

Upon activation of image acquisition, the system is prepared to now receive triggers:

Acquisition Start

Execute AcquisitionStart

Switching UserOutput0 on and off now activates trigger signals on Line2 and triggers your application. The signal is created upon activation of the UserOutputValue.

Simulate a trigger signal

UserOutputSelector = UserOutput0
UserOutputValue    = true
UserOutputValue    = false