Using hardware trigger with Baumer GAPI

Software Example: Baumer GAPI v2.8.0

All Baumer cameras offer hardware triggering via opto-isolated Line0 and/or GPIOs Line1 and Line2. To find out which lines are available as hardware triggers, check the process interface section in your specific camera's User Manual. All features of Baumer cameras are named according to the EMVA standard feature name convention (SFNC) version 1.5.1 or later. If you want to know more about what to do with the sequencer or when to use shape and shadow application, you can refer to the application notes below and the user guide for VCXG.I cameras.

Hardware triggering using 12 V / 24 V via line0

Baumer cameras provide opto-coupled inputs that accept 0 … 4.5 V as low and 11 … 30 V as high in accordance with industry standards. Therefore, you will need a trigger signal between 11 V and 30 V. Here we assume that the camera has an opto-isolated line on Line0.

This example only shows how to configure the camera and assumes that the pDevice already holds a valid connection to a camera. Once the camera is installed, as shown below, select the “high” A trigger signal initiates the acquisition of a single image, which can be retrieved via the standard BGAPI::DataStream::GetFilledBuffer() method.

                
// SETUP DIGITAL IO CONTROLpDevice->GetRemoteNode("LineSelector")->SetString("Line0");
pDevice->GetRemoteNode("LineInverter")->SetBool(false);//high means high

// SETUP DEBOUNCER// make sure only intended signals trigger the camera (ignore jitters on the line)
pDevice->GetRemoteNode("LineDebouncerHighTimeAbs")->SetDouble(1.0);// in µsecpDevice->GetRemoteNode("LineDebouncerLowTimeAbs")->SetDouble(1.0);// in µsec

// SETUP ACQUISITION CONTROLpDevice->GetRemoteNode("TriggerMode")->SetString("On");
pDevice->GetRemoteNode("TriggerSource")->SetString("Line0");
pDevice->GetRemoteNode("TriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("TriggerDelay")->SetDouble(0.0);// delay in µsec
                 
            
                
// SETUP DIGITAL IO CONTROLmDevice.RemoteNodeList["LineSelector"].Value = "Line0";
mDevice.RemoteNodeList["LineInverter"].Value = false;// high means high

// SETUP DEBOUNCER
// make sure only intended signals trigger the camera (ignore jitters on the line)mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0;// in µsecmDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0;// in µsec

// SETUP ACQUISITION CONTROLmDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line0";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0;// in µsec
                 
            

Hardware triggering using 5V via GPIO Line1/Line2

Most Baumer cameras have general-purpose input/output lines (GPIO) without potential difference, which require trigger signals of 2 V or higher (FPGA input 0 … 0.8 V low, 2.0 … 30 V high).

                
// SETUP DIGITAL IO CONTROLpDevice->GetRemoteNode("LineSelector")->SetString("Line1");//GPIO Line1pDevice->GetRemoteNode("LineMode")->SetString("Input");
pDevice->GetRemoteNode("LineInverter")->SetBool(false);// SETUP DEBOUNCER
// make sure only intended signals trigger the camera (ignore jitters on the line)pDevice->GetRemoteNode("LineDebouncerHighTimeAbs")->SetDouble(1.0);// in µsecpDevice->GetRemoteNode("LineDebouncerLowTimeAbs")->SetDouble(1.0);// in µsec

// SETUP ACQUISITION CONTROLpDevice->GetRemoteNode("TriggerMode")->SetString("On");
pDevice->GetRemoteNode("TriggerSource")->SetString("Line1");
pDevice->GetRemoteNode("TriggerActivation")->SetString("RisingEdge"); 
pDevice->GetRemoteNode("TriggerDelay")->SetDouble(0.0);// delay in µsec
                 
            
                
// SETUP DIGITAL IO CONTROLmDevice.RemoteNodeList["LineSelector"].Value = "Line1";//GPIO Line1mDevice.RemoteNodeList["LineMode"].Value = "Input";
mDevice.RemoteNodeList["LineInverter"].Value = false;// SETUP DEBOUNCER// make sure only intended signals trigger the camera (ignore jitters on the line)
mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0;// in µsecmDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0;// in µsec

//ACQUISITION CONTROLmDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line1";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0;// in µsec
                 
            

Downloads

Software Examples


Using hardware trigger with Baumer GAPI

C++ (ZIP | 9 KB)

C# (ZIP | 10 KB)