How To: Synchronize a Light Source With a Basler ace 2 Camera#
Issue#
You trigger a Basler camera and use an output signal from the camera to trigger a light source, e.g., a flashlight.
The light source settings and camera exposure times are configured properly.
However, when working with very short exposure times (<100 µs) you may see that your resulting image is too dark. The effect will get stronger the shorter the exposure time.
The reason for that is often some delay / ramp up between trigger and full brightness of the light source itself.
The following signals show the issue more clearly:

So when triggering both devices at the same time, only a portion of the exposure time "sees" the full brightness of the light. This results in a too dark image.
Solution#
A possible solution would be to slightly delay the start of the camera exposure and wait for the light to reach the full intensity. With the Basler ace 2 this is now possible, e.g. like this:
- Connect your main trigger to line 1 input of the camera, and connect the light source trigger to line 2 output of the camera.
- Within the Digital I/O Control category of the pylon Viewer, set the
LineSelectorparameter toLine1for the input line. - Set
Line2as output line and useTimer2ActivateasLineSource. - In the Counter and Timer Control category, set the
TimerSelectortoTimer1, theTimerTriggerSourcetoLine1, and theTimerDelayto a value of 40 µs. - Set the second
TimerSelectortoTimer2, theTimerTriggerSourcealso toLine1but don't use a delay. - Within the Acquisition Control category, set
TriggerSelectortoFrameStartand theTriggerSourcetoTimer1Active.
For all setting required in the pylon Viewer, refer to the image below.

The signals will now look like this:

With this setup, the full 60 µs exposure time will also get the full light intensity.
Info
The above diagrams are simplified and don't show all possible delays happening in the trigger path.