MATRIX VISION - mvBlueFOX3 Technical Documentation
Creating synchronized acquisitions using timers

Basics

Getting images from several cameras exactly at the same time is a major task in

  • 3D image acquisitions
    (the images must be acquired at the same time using two cameras) or
  • acquisitions of larger objects
    (if more than one camera is required to span over the complete image, like in the textile and printing industry).

To solve this task, the mvBlueFOX3offers timers that can be used to generate pulse at regular intervals. This pulse can be connected to a digital output. The digital output can be connected digital to the digital input of one or more cameras to use it as a trigger.

Connecting the hardware

One camera is used as master (M), which generates the trigger signal. The other ones receive the trigger signal and act as slaves (S).

Connecting the cameras

The connection of the mvBlueFOX3 cameras should be like this:

Figure 1: Master - Slave connecting
Symbol Comment Input voltage Min Type Max Unit
Uext. External power   3.3   30 V
Rout Resistor digital output     2   kOhm

Programming the acquisition

You will need two timers and you have to set a trigger.

Start timer

Two timers are used for the "start timer". Timer1 defines the interval between two triggers. Timer2 generates the trigger pulse at the end of Timer1.

The following sample shows a trigger

  • which is generated every second and
  • the pulse width is 10 ms:
#include <mvIMPACT_CPP/mvIMPACT_acquire.h>
#include <mvIMPACT_CPP/mvIMPACT_acquire_GenICam.h>

... 

// Master: Set timers to trig image: Start after queue is filled
    GenICam::CounterAndTimerControl catcMaster(pDev);
    catcMaster.timerSelector.writeS( "Timer1" );
    catcMaster.timerDelay.write( 0. );
    catcMaster.timerDuration.write( 1000000. );
    catcMaster.timerTriggerSource.writeS( "Timer1End" );

    catcMaster.timerSelector.writeS( "Timer2" );
    catcMaster.timerDelay.write( 0. );
    catcMaster.timerDuration.write( 10000. );
    catcMaster.timerTriggerSource.writeS( "Timer1End" );
See also
Counter And Timer Control
Note
Make sure the Timer1 interval must be larger than the processing time. Otherwise, the images are lost.

The timers are defined, now you have to do following steps:

  1. Set the digital output, e.g. "Line 0",
  2. connect the digital output with the inputs of the slave cameras, and finally
  3. set the trigger source to the digital input, e.g. "Line4".

Set digital I/O

In this step, the signal has to be connected to the digital output, e.g. "Line0":

// Set Digital I/O
    GenICam::DigitalIOControl io(pDev);
    io.lineSelector.writeS( "Line0" );
    io.lineSource.writeS( "Timer2Active" );
See also
Digital I/O Control

This signal has to be connected with the digital inputs of the slave cameras as shown in Figure 1 and 2.

Set trigger

"If you want to use Master - Slave":

// Set Trigger of Master camera
    GenICam::AcquisitionControl ac(pDev);
    ac.triggerSelector.writeS( "FrameStart" );
    ac.triggerMode.writeS( "On" );
    ac.triggerSource.writeS( "Timer1Start" );
// or ac.triggerSource.writeS( "Timer1End" );
// Set Trigger of Slave camera 
    GenICam::AcquisitionControl ac(pDev);
    ac.triggerSelector.writeS( "FrameStart" );
    ac.triggerMode.writeS( "On" );
    ac.triggerSource.writeS( "Line4" );
    ac.triggerActivation.writeS( "RisingEdge" ); 
See also
Acquisition Control

Now, the two timers will work like the following figure illustrates, which means

  • Timer1 is the trigger event and
  • Timer2 the trigger pulse width:
Figure 2: Timers

By the way, this is a simple "pulse width modulation (PWM)" example.

Setting the synchronized acquisition using wxPropView

The following figures show, how you can set the timers and trigger using the GUI tool wxPropView

  1. Setting of Timer1 (blue box) on the master camera:

    Figure 3: wxPropView - Setting of Timer1 on the master camera

  2. Setting of Timer2 (purple box) on the master camera:

    Figure 4: wxPropView - Setting of Timer2 on the master camera

  3. Setting the trigger slave camera(s)
    - The red box in Figure 5 is showing "Master - Slave"), which means that the master is triggered internally and the slave camera is set as shown in Figure 4.
  4. Assigning timer to DigOut (orange box in Figure 3).
Figure 5: Trigger setting of the master camera using "Master - Slave"