Nov 1, 2020

When accuracy matters: Process synchronization with industrial cameras
In visual inspection systems, an image must be captured at the exact moment when the (usually moving) object is fully underneath the lens and the illumination is activated. Sounds simple – but it involves some tricky details. This article presents these details along with hints to avoid them by selecting the appropriate hardware and the correct adjustment of settings in the software. The focus is on the camera support inquiries that are most frequently received by the technical support of Baumer.
Synchronization of machine cycle during processing, camera, and illumination takes place via so-called triggers – external signals or events that initiate image capturing by the camera and that are generated by hardware components or the applied software. These signals must be generated, transported, and processed. The processing steps require time or are subject to fluctuations that must be taken into account. However, modern industrial cameras are excellently equipped to handle such synchronization.
If the machine cycle and the camera do not operate synchronously, objects are not precisely situated under the camera during image capturing (right), which impedes the error-free functioning of image processing algorithms.
Using triggers
It is recommended to use triggers for synchronization, regardless of the used camera type. This means the camera should not operate in free running mode, but instead the TriggerMode must be activated in the software. Once the camera receives a trigger, it starts capturing images after an adjustable TriggerDelay. This delay ensures that fluctuations or delays in the system (for example due to cabling or illumination technology) are taken into account. In most cases, the delay must be determined by trial and error, as it depends on the used components. The delay in the camera itself is given as a maximum value in the data sheet.
When working with triggers, it is also important to consider the point in time when the camera is receptive to the next incoming trigger signal. This depends on the employed camera and sensor type. For users, it is important to determine the frame rate that is required by the application. This can be used to specify additional parameters or exclude some sensor and camera types.
What is the trigger source?
A trigger is controlled by external hardware, the software, or an Action Command. If possible, a hardware trigger should be used, as it is subject to much less variation and delays in the microsecond range. In contrast, when using a software trigger, the fluctuations are in the millisecond range. Whether this is acceptable or not must be evaluated based on the application at hand. An Action Command can be used for example in synchronization with encoders to start image capturing at certain encoder positions. Some camera types, such as the CX models with Precision Time Protocol (PTP), allow time-synchronized triggering by an Action Command. In all cases, the TriggerSource register is used in the camera software.
Which input (I/O type) should be used for the hardware trigger?
The majority of digital industrial cameras today are equipped with one or more opto-decoupled digital inputs and/or so-called GPIOs (general purpose inputs/outputs).
The first-mentioned circuits have a switching time in the range of milliseconds, but can handle higher voltages and are insensitive to ground loops and electromagnetic interference due to the galvanic separation of the two circuits. GPIOs, on the other hand, are faster – they react with a latency in the nanosecond range, but are considered less reliable in terms of their resistance to ground loops and electromagnetic interference due to the lack of galvanic isolation between the signal
source and the camera.
Figure 2: Application-specific requirements can be implemented with the different trigger modes.
Number of images after the trigger?
Usually only a single image is required, which favors the use of the FrameStart Trigger1) Mode. In this mode, exactly one frame – the combination of exposure time and sensor read out – is captured for each incoming trigger (see illustration 2). Triggers that are received during the exposure and the read out are discarded by the camera. If, due to a higher clock rate,  an overlap of sensor exposure time and readout of the previous image is required, the TriggerOverlap2) Readout Mode is recommended (see illustration 2). Here, the timing is chosen to ensure that the camera accepts and processes the trigger in the form that the readout of frame (n) and the exposure time of frame (n+1) occur very shortly after each other. If several images are required after the trigger, it is recommended to use the sequencer.

---
1)  GenICam_SFNC_v2_4 S. 155
2)  GenICam_SFNC_v2_4 S. 178
Figure 3: Sample set-up of a sequencer set.
Sequencer – when more than one image is required
The Sequencer allows the capturing of image series and sequences with automatic re-parameterization of the camera based on different events and signals. For this purpose, the desired camera settings are stored in so-called sequencer sets. A sequence consists of several consecutive sequencer sets. Within the sequences, connections take place via different paths. Therefore, in addition to different camera functions, each sequencer set also includes path-related functions (see illustration 3).
Each of these sets is allocated a number, and in Baumer cameras, can contain functions such as exposure time, gain, partial scan parameters, or the control of digital outputs. The allocated number is also part of the path information for the transition between sequencer sets. Another component is the signal whose change in state activates the set transition as well as the change in state (edge) that triggers. The source of the signal can be a hardware trigger or an internal camera signal, such as the end of a counter or timer. GenICam events such as ExposureActive or ReadoutActive can also serve as trigger sources.
While the use of a Sequencer is apparently more elaborate, it nevertheless offers substantially higher flexibility. For example, the exposure time can be individually set for single images or groups of images if they are captured in a dedicated sequencer set. In addition to the specific set exposure times, outputs can also be activated, and, for example, partial scan parameters can be set. If the process sequence and the required settings are presented as a process diagram, then everything is ready for efficient Sequencer creation.
Process and time synchronization via PTP
In some instances, the process may require the components to not only be synchronized but also to have a common time base. This is handled by the Precision Time Protocol (PTP) according to the IEEE 1588 standard, which is supported by the 10 GigE cameras of the LX series and some GigE models of the CX series. It can be used, for instance, to synchronously capture images of several cameras. At fixed predefined times, an Action Command then actuates a trigger in all cameras. To clearly and unmistakably identify and allocate the images as well, each image can be allocated a trigger ID.

Press download


Further information

Press contact
To the top