Emulating a burst trigger mode using JAI cameras

Burst trigger mode is a camera mode where, when given a single external trigger, the camera produces more than one image in a quick sequence. These images may be spaced evenly in the trigger period or tightly clustered around the start of the external trigger pulse. This technique is often used to capture a series of images of a single object (such as a passing vehicle in a traffic application) or can be used in situations where groups of objects pass a trigger point in asynchronous fashion and require multiple images to ensure that all items or areas of interest in the group are captured.

While not obvious, any JAI camera with a pulse generator is capable of supporting a burst trigger mode. In this article, we will walk through the various settings that are needed to establish a burst trigger method. To start off, depending on the camera, an I/O cable will be needed to connect the external trigger to the camera. For the Spark Series, the 12P-02S cable would help with this and for the Go Series, a 06P-02S cable can be used.

Once the external trigger is connected, set the camera to operate in trigger mode (Trigger mode -> on, Trigger selector -> Frame Start, Exposure mode -> Timed). Once this is set, set the Trigger Source to Pulse Generator 0. Once these settings are done, the pulse generator can be configured to achieve burst trigger functionality.

The most important parameter to define is the “length” of the pulse generator. This is the total time it takes to complete a single pulse generator cycle including both low and high periods. There are three settings available in the JAI Control tool to do this. They are “Pulse Generator Length,” “Pulse Generator Length (ms),” and “Pulse Generator Frequency.” You only need to set one of these. The others are correlated and will automatically be adjusted to match the one you set. For a more complete description of these, see the JAI Technical Note called “Tips for Using the Pulse Generator” available on the JAI website.

In addition, we will set the Pulse Generator Start Point (the actual point in the cycle at which the rising edge starts), Pulse Generator End Point (the actual point in the cycle at which the falling edge starts), Pulse Generator Repeat Count (the number of pulses to generate each time the pulse generator is activated), Pulse Generator Clear Source (the line on which the activation signal will appear), Pulse Generator Clear Activation (the point in the activation signal where activation will occur -- either Rising Edge or Falling Edge), and Pulse Generator Clear Sync Mode (the reset behavior when the activation signal is received – either immediately, or after the current cycle ends).

In the screenshot below, a burst mode setup is shown, where an external trigger of 1 Hz is provided to the pulse generator and the pulse generator splits the trigger into 5 evenly spaced triggers to capture 5 “burst mode” images: 

 

 

 

In this example, we have used “Pulse Generator Length (ms)” to set the length of our cycle to approximately 180 ms. This will enable us to accommodate 5 pulses and still leave a little room before the next external trigger is received. (Note: to define a length of EXACTLY 180 ms might require adjusting the “Clock Pre-scaler” setting. See “Tips for Using the Pulse Generator” for more information.)

The Pulse Generator Start Point is set to 0 ms, meaning the pulse will “go high” as soon as the activation signal is received. The Pulse Generator End Point is set to approximately 10 ms. Thus, our Pulse Generator 0 signal will go high for 10 ms, then stay low for 170 ms to complete the cycle. This 10 ms pulse is more than enough to trigger the camera to capture a frame.

Since we have set the Pulse Generator Repeat Count to 5, each time we activate the pulse generator we will not just get one 10 ms pulse, we will get a “burst” of five evenly-spaced 10 ms pulses approximately 180 ms apart. With Pulse Generator 0 having been defined to be our Trigger Source, this produces our “burst mode” of 5 images per each external trigger.  

To activate each burst, we set the Pulse Generator Clear Source to “Line 5 – Opt In 1,” which is where we have connected our external trigger via the I/O cable previously discussed. Then we set our Pulse Generator Clear Activation to “Rising Edge” so that our burst-mode cycle will begin on the rising edge of our external trigger.

The last setting is the Pulse Generator Clear Sync mode. In “Async” mode, each Clear Source activation will cause the burst mode to start again immediately, even if it is in the middle of one of its 5 pulses. In “Sync” mode, the pulse generator will always finish the current pulse cycle before acting upon the new clear source signal. Note that this only applies to the current “pulse” and not to the repeat count. If a new Clear Source  signal is received during the 3rd of 5 specified “repeats,” the repeat counter starts over and the 4th and 5th cycle are dropped from the current burst with the only difference being whether the new sequence starts immediately (Async) or after the third Pulse Generator cycle is completed (Sync).

Since our 5-image burst takes less than 900 ms to complete and our external trigger is at one-second intervals, it really shouldn’t matter which sync mode we use for this example. However, in a real-life situation where the timing of the next external trigger might be unpredictable, a choice might have to be made regarding how to handle a new trigger that occurs during the middle of a burst.

While the above example is a simple one, it can be easily modified to provide burst modes with more or fewer images, as well as closer spacing between pulses, provided there is enough time and illumination to allow the camera to stay within its minimum trigger interval specifications.

Hopefully, this article provides a good sense of the capabilities of JAI cameras and their versatility. More complex tasks can also be achieved by using two pulse generators (in cameras equipped with multiple pulse generators), and by combining the above method with Sequence Trigger modes to get different ROIs, gains, black levels, and even exposure times for each trigger from the pulse generator!

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.