|
Balluff - BVS CA-BN Technical Documentation
|
Getting images from several cameras exactly at the same time is a major task in
With Balluff/MATRIX VISION cameras you can solve this task as follows:
Timers can be used to generate pulses at regular intervals. These pulses can be connected to a digital output. The digital output can be connected again to the digital input of one or more cameras to use it as a trigger.
For the master camera, there are 2 possibilities how it is triggered:
You will need two timers and you have to set a trigger.
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
#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" );The timers are defined, now you have to do following steps:
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" );
This signal has to be connected with the digital inputs of the slave cameras as shown in Figure 1 and 2.
"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" );
Now, the two timers will work like the following figure illustrates, which means
By the way, this is a simple "pulse width modulation (PWM)" example.
The following figures show, how you can set the timers and trigger using the GUI tool ImpactControlCenter