Synchronization of time stamps without IEEE1588 with BVS CA industrial cameras
1. Introduction
Camera timestamps are an important GigE Vision/GenICam/SFNC feature that can be used to specify in images when it was captured (to be more precise, when the image exposure was started). Without additional synchronization, it is merely a camera-specific timer with a manufacturer-specific step size and an accuracy that depends on the implementation. Each camera starts its own timestamp at zero and there is no way to adjust it or synchronize it with other cameras or host PCs. Efforts are underway to firmly establish precise timestamps according to IEEE1588 in GigE Vision. This requires cameras that are capable of performing the necessary synchronization as well as providing the appropriate network hardware and driver software and procedures to maintain synchronization. There are many applications that cannot benefit from IEEE1588 but require synchronization in some form. The following document describes solutions for these scenarios.
2. Use and reset timestamp
The standard itself offers no possibility to reset the timestamp of a camera, except by switching the camera on and off. For this reason, Balluff has developed its own mechanism with which the timestamp can be reset via hardware input: mvTimestampReset
Figure 1: ImpactControlCenter - mvTimestampReset
This mechanism can of course be used to synchronize cameras by connecting the inputs of the cameras with each other and a predefined input signal resets the timestamp of all cameras. From this point on, all cameras start at zero and count up the timestamp. An elementary accuracy can be achieved here, but this is limited to the drifting of the clock frequency of the internal clock (e.g. a 1 MHz oscillator in the FPGA). To compensate for the drift, the reset of the timestamp can be performed every second or minute and the reset pulse itself can be counted in each camera.
If we now assume that the reset pulse was generated by the master camera via a timer and sends the reset signal to all cameras, the reset pulses of all cameras can now be counted and transmitted together with the reset timestamp as chunk data in the image. In this way, a synchronized time stamp with the precision of the master camera is achieved between all connected cameras.
The settings used for this in ImpactControlCenter from Balluff are as follows:
Figure 2: A timer1 generates the AcquisitionStart signal
If the (unknown) drift of the reset pulse of the master camera is to be removed, a precise 1 PPS (Pulse per Second) signal can be used, which is provided by the host PC if it is equipped with NTP (Network Time Protocol) software or with a GPS device.
This makes the synchronization very accurate; i.e. it is in the range of several dozen µs due to the hardware delay of the reset signal input line and the accuracy of the local quartz-based time stamp oscillator (~100ppm). Now the counter counts seconds within the camera and the timestamp adds accurate microseconds, resulting in a reliable timestamp. An example of how chunk data can look like is shown in the following image. The timestamp is given in µs and Counter1 counts the reset pulses that are generated in the camera itself via Timer1.
Figure 3: Output of the chunk data
The task of resetting the counter at the beginning of the recording can be accomplished by setting the reset parameter accordingly. Of course, it depends on whether the camera is recording images continuously or triggered.