Sequencer programming for VCXG cameras – Multiple shots with a single incoming trigger

Software example Baumer GAPI v2.9.0

This example explains how to set up a sequencer to obtain 3 images from a single trigger signal. To achieve this, a sequencer counter is used to trigger exposures.

If you want to learn more details about what can be done with the sequencer, you can refer to the application notes below, where the concepts and features are explained in much more detail.

Using a sequence may require some planning to visualize what needs to happen and when. In our example, the process is quite simple:

  • The first image is “Line 0” It is triggered by the hardware trigger coming from the input, which also triggers the sequencer to start.
  • The sequence set “Set0” configures and triggers the second image.
  • The sequence set “Set1” configures and triggers the third image.
The figure shows the timing of events set by the sequencer.
                
// STOP ACQUISITION AND LOAD DEFAULT PARAMETERSpDevice->GetRemoteNode("AcquisitionStop")->Execute();
pDevice->GetRemoteNode("UserSetSelector")->SetString("Default");
pDevice->GetRemoteNode("UserSetLoad")->Execute();//CONFIGURING THE TRIGGER INPUTpDevice->GetRemoteNode("TriggerMode")->SetString("On");
pDevice->GetRemoteNode("TriggerSource")->SetString("Line0");
pDevice->GetRemoteNode("TriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("TriggerDelay")->SetDouble(0.0);
pDevice->GetRemoteNode("LineSelector")->SetString("Line0");
pDevice->GetRemoteNode("LineInverter")->SetBool(false);
pDevice->GetRemoteNode("LineDebouncerHighTimeAbs")->SetDouble(1.0);
pDevice->GetRemoteNode("LineDebouncerLowTimeAbs")->SetDouble(1.0);//CONFIGURE GPIO “Line3” as an OUTPUTpDevice->GetRemoteNode("LineSelector")->SetString("Line3");
pDevice->GetRemoteNode("LineInverter")->SetBool(false);
pDevice->GetRemoteNode("UserOutputSelector")->SetString("UserOutput1");
pDevice->GetRemoteNode("UserOutputValue")->SetBool(false);
pDevice->GetRemoteNode("LineSource")->SetString("UserOutput1");// SWITCH TO SEQUENCER CONFIG MODEpDevice->GetRemoteNode("SequencerConfigurationMode")->SetString("On");// SET 0 (FIRST STEP OF THE SEQUENCE)pDevice->GetRemoteNode("SequencerSetSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerSetLoad")->Execute();
pDevice->GetRemoteNode("TriggerMode")->SetString("On");
pDevice->GetRemoteNode("CounterSelector")->SetString("Counter1");
pDevice->GetRemoteNode("CounterEventSource")->SetString("Off");//Set ExposureTime for Set0pDevice->GetRemoteNode("ExposureTime")->SetDouble(15000.0);
pDevice->GetRemoteNode("SequencerPathSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerTriggerSource")->SetString("ExposureActive");
pDevice->GetRemoteNode("SequencerTriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("SequencerSetNext")->SetInt(1);
pDevice->GetRemoteNode("SequencerSetSave")->Execute();// SET 1 (SECOND STEP OF THE SEQUENCE)pDevice->GetRemoteNode("SequencerSetSelector")->SetInt(1);
pDevice->GetRemoteNode("SequencerSetLoad")->Execute();
pDevice->GetRemoteNode("TriggerMode")->SetString("Off");
pDevice->GetRemoteNode("CounterSelector")->SetString("Counter1");
pDevice->GetRemoteNode("CounterEventSource")->SetString("ExposureActive");
pDevice->GetRemoteNode("CounterEventActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("CounterDuration")->SetInt(2);
pDevice->GetRemoteNode("CounterResetSource")->SetString("Counter1End");
pDevice->GetRemoteNode("CounterResetActivation")->SetString("RisingEdge");//Set ExposureTime for Set1pDevice->GetRemoteNode("ExposureTime")->SetDouble(10000.0);
pDevice->GetRemoteNode("SequencerPathSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerTriggerSource")->SetString("Counter1End");
pDevice->GetRemoteNode("SequencerTriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("SequencerSetNext")->SetInt(0);
pDevice->GetRemoteNode("SequencerSetSave")->Execute();
pDevice->GetRemoteNode("SequencerSetStart")->SetInt(0);// SEQUENCER CONFIG ENDpDevice->GetRemoteNode("SequencerConfigurationMode")->SetString("Off");// START CAMERA SEQUENCERpDevice->GetRemoteNode("SequencerMode")->SetString("On");
pDataStream->StartAcquisitionContinuous();
pDevice->GetRemoteNode("AcquisitionStart")->Execute();// WAIT FOR TRIGGER TO CAPTURE THREE IMAGES

// STOP CAMERA SEQUENCERpDevice->GetRemoteNode("AcquisitionStop")->Execute();
pDataStream->StopAcquisition();
pDevice->GetRemoteNode("SequencerMode")->SetString("Off"); 
            
                
// STOP ACQUISITION AND LOAD DEFAULT PARAMETERSmDevice.RemoteNodeList["AcquisitionStop"].Execute();
mDevice.RemoteNodeList["UserSetSelector"].Value = "Default";
mDevice.RemoteNodeList["UserSetLoad"].Execute();//CONFIGURING THE TRIGGER INPUTmDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line0";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0;
mDevice.RemoteNodeList["LineSelector"].Value = "Line0";
mDevice.RemoteNodeList["LineInverter"].Value = false;
mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0;
mDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0;//CONFIGURE GPIO “Line3” as an OUTPUTmDevice.RemoteNodeList["LineSelector"].Value = "Line3";
mDevice.RemoteNodeList["LineInverter"].Value = false;
mDevice.RemoteNodeList["UserOutputSelector"].Value = "UserOutput1";
mDevice.RemoteNodeList["UserOutputValue"].Value = false;
mDevice.RemoteNodeList["LineSource"].Value = "UserOutput1";// SWITCH TO SEQUENCER CONFIG MODEmDevice.RemoteNodeList["SequencerConfigurationMode"].Value = "On";// SET 0 (FIRST STEP OF THE SEQUENCE)mDevice.RemoteNodeList["SequencerSetSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerSetLoad"].Execute();
mDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["CounterSelector"].Value = "Counter1";
mDevice.RemoteNodeList["CounterEventSource"].Value = "Off";

//Set ExposureTime for Set0
mDevice.RemoteNodeList["ExposureTime"].Value = (double)15000.0; 
mDevice.RemoteNodeList["SequencerPathSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerTriggerSource"].Value = "ExposureActive";
mDevice.RemoteNodeList["SequencerTriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["SequencerSetNext"].Value = (long)1;
mDevice.RemoteNodeList["SequencerSetSave"].Execute();// SET 1 (SECOND STEP OF THE SEQUENCE)mDevice.RemoteNodeList["SequencerSetSelector"].Value = (long)1;
mDevice.RemoteNodeList["SequencerSetLoad"].Execute();
mDevice.RemoteNodeList["TriggerMode"].Value = "Off";
mDevice.RemoteNodeList["CounterSelector"].Value = "Counter1";
mDevice.RemoteNodeList["CounterEventSource"].Value = "ExposureActive";
mDevice.RemoteNodeList["CounterEventActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["CounterDuration"].Value = (long)2;
mDevice.RemoteNodeList["CounterResetSource"].Value = "Counter1End";
mDevice.RemoteNodeList["CounterResetActivation"].Value = "RisingEdge";

//Set ExposureTime for Set1
mDevice.RemoteNodeList["ExposureTime"].Value = (double)10000.0;
mDevice.RemoteNodeList["SequencerPathSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerTriggerSource"].Value = "Counter1End";
mDevice.RemoteNodeList["SequencerTriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["SequencerSetNext"].Value = (long)0;
mDevice.RemoteNodeList["SequencerSetSave"].Execute();
mDevice.RemoteNodeList["SequencerSetStart"].Value = (long)0;// SEQUENCER CONFIG ENDmDevice.RemoteNodeList["SequencerConfigurationMode"].Value = "Off";// START CAMERA SEQUENCERmDevice.RemoteNodeList["SequencerMode"].Value = "On";
mDataStream.StartAcquisition();
mDevice.RemoteNodeList["AcquisitionStart"].Execute();// WAIT FOR TRIGGER TO CAPTURE THREE IMAGES

// STOP CAMERA SEQUENCERmDevice.RemoteNodeList["AcquisitionStop"].Execute();
mDataStream.StopAcquisition();
mDevice.RemoteNodeList["SequencerMode"].Value = "Off";
            

Downloads

Software Examples


Capture 3 images with a single trigger

C++ (ZIP | 9 KB)

C# (ZIP | 10 KB)