Balluff - BVS CA-BN Technical Documentation
|
To dim a laser line generator, for example, you have to generate a pulse width modulation (PWM).
For this, you will need
The following figures show, how you can set the timers using the GUI tool ImpactControlCenter
You will need two timers and you have to set a trigger.
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" );
Now, the two timers will work like the following figure illustrates, which means
The timers are defined, now you have to set the digital output, e.g. "Line 0":
// 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 application.