Baumer industrial camera Baumer industrial camera how to set the hardware trigger mode through BGAPISDK (C#)

Baumer industrial camera

Baumer Industrial Cameras Baumer cameras are high-performance, high-quality industrial cameras that can be used in various application scenarios, such as object detection, counting and recognition, motion analysis and image processing.

Baumer's 10 Gigabit cameras have excellent image processing performance and can transmit high-resolution images in real time. In addition, the camera features fast data transfer, low power consumption, easy integration, and high scalability.
​Baumer
industrial cameras are often used in the field of high-speed synchronous acquisition due to their superior and stable performance and quality, and usually use various image algorithms to improve the quality of the captured images.

Technical background of Baumer industrial camera BGAPISDK and hardware trigger mode

The BGAPI SDK for Baumer industrial cameras is a set of software development kits developed by Baumer for its camera product series. The SDK provides a set of APIs that enable developers to write professional applications to control, capture, process and display images and data from Baumer cameras. BGAPI SDK supports multiple programming languages, including C++, C#, Visual Basic, LabVIEW, Matlab, etc., and provides a large number of sample codes and documents to help users get started easily and quickly complete application development.

BGAPI SDK provides a wealth of functions to control all parameters of the Baumer camera, including exposure time, gain, white balance, trigger mode, etc., and supports various data formats, such as Raw, BMP, JPG, etc., and also provides real-time display, data acquisition, image processing and other functions, providing developers with highly customized solutions. In addition, BGAPI SDK also supports the development of multi-camera systems, and can support various computer operating systems, such as Windows, Linux, Mac OS, etc.

Baumer industrial cameras All Baumer cameras support hardware triggering - triggering via Line0 (optocoupler isolated input and output) and/or Line1 and Line2 (GPIO general input and output). To see which line from the camera can be used for hardware triggering, see the "Process Interface" chapter of the camera's user guide. All functions of Baumer cameras are named according to the EMVA Standard Function Naming Convention (SFNC) version 1.5.1 or newer.

This article introduces the function of setting the hardware trigger mode by integrating the BGAPI SDK.

How to use the Camera Explorer software to carry out the Baumer industrial camera VCX series camera hardware trigger process and settings
are as follows:
Baumer industrial camera VCX series camera hardware trigger process and settings

Baumer industrial camera sets hardware trigger mode function through BGAPISDK

The following describes how to set the hardware trigger mode of Baumer industrial cameras through BGAPISDK in C#.

1. Reference the appropriate class file

The code is as follows (example):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Data;
using System.Globalization;
using System.Diagnostics;
using System.IO;

2. Apply 12V/24V voltage signal on Line0 through BGAPISDK to realize hardware trigger

The core code of Baumer industrial camera setting hardware trigger mode function on Line0 is as follows:

Baumer Industrial Cameras Baumer cameras provide industry-standard optocoupler-isolated inputs, where 0...4.5V represents low voltage and 11...30V represents high voltage. Therefore, the trigger signal needs to be between 11V and 30V. In this example, we assume that there is an optocoupler isolation line on Line0 of the camera.

This example only shows how to configure a Baumer industrial camera, and assumes that the pDevice has established a valid connection with the camera. Set the camera as follows, when the trigger signal on Line0 is "high", the camera will start to capture a single image, which can be retrieved through the common BGAPI::DataStream::GetFilledBuffer() function.

// 设置数字IO控制
mDevice.RemoteNodeList["LineSelector"].Value = "Line0";
mDevice.RemoteNodeList["LineInverter"].Value = false; // high means high

// 设置防抖信号参数
// make sure only intended signals trigger the camera (ignore jitters on the line)
mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0; // in µsec
mDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0; // in µsec

// 设置触发采集控制
mDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line0";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0; // in µsec

3. Apply a 5V voltage signal on GPIO Line1 / Line2 through BGAPISDK to realize hardware trigger

Most Baumer cameras also use GPIO lines, and these non-zero potential general-purpose inputs and outputs require a trigger signal of 2V or higher (FPGA input: 0...0.8V is low level, 2.0...30V is high level).

The core code of Baumer industrial camera setting hardware trigger mode function on GPIO Line1 / Line2 is as follows:

// 设置数字IO控制
mDevice.RemoteNodeList["LineSelector"].Value = "Line1"; // GPIO Line1
mDevice.RemoteNodeList["LineMode"].Value = "Input";
mDevice.RemoteNodeList["LineInverter"].Value = false;

// 设置防抖信号参数
// make sure only intended signals trigger the camera (ignore jitters on the line)
mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0; // in µsec
mDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0; // in µsec

// 设置触发采集控制
mDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line1";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0; // in µsec

Advantages of Baumer industrial camera cycle setting hardware trigger mode function

The hardware trigger mode function of industrial cameras has the following advantages:

Stability: The hardware trigger mode controls camera acquisition through an external trigger signal. Compared with the soft trigger method, it can avoid the influence of system delay and software processing speed during soft trigger, and realize stable and reliable image acquisition.

Accuracy: The hardware trigger mode uses an external trigger to trigger the camera to capture images, which can accurately capture images of objects at specific time points, especially when shooting fast-moving objects.

Real-time: Since the hardware trigger mode relies on an external trigger for image acquisition, the image can be acquired as soon as the trigger arrives, so as to achieve the purpose of real-time acquisition. This is of great value in many high-speed automation applications, such as defect detection and dimensional measurement of products on a production line.

Synchronization: The hardware trigger mode has a trigger synchronization function. When multiple industrial cameras need to collect images at the same time, a common trigger can be used to achieve synchronous collection. This ensures that images acquired by multiple cameras occur at the same point in time, helping to handle data fusion and analysis in multi-camera systems.

Flexibility: The hardware trigger mode can flexibly set the trigger mode according to external conditions and needs, and realize image acquisition under different trigger sources. For example, image acquisition can be triggered by devices such as laser sensors, light barrier sensors or encoders.

Resource saving: The hardware trigger mode only triggers image acquisition when needed, avoiding a large amount of redundant data generated under uninterrupted acquisition. This helps to reduce the amount of data processing, reduce storage and computing resource requirements, and thus improve the operating efficiency of the entire system.

In short, the hardware trigger mode function of industrial cameras has the advantages of stability, accuracy, synchronization, etc. It is suitable for many industrial automation and machine vision application scenarios, and can ensure the efficient and reliable operation of the system under various working conditions.

Industrial application of Baumer industrial camera setting hardware trigger mode function

The hardware trigger mode function of industrial cameras is widely used in various industries, the following are some typical industry applications:

Automatic inspection: The hardware trigger mode can be used in product quality inspection, defect inspection and dimension measurement on the production line, making image acquisition and processing more stable and accurate.

Machine vision: The hardware trigger mode can provide accurate image acquisition for the machine vision system, thereby improving the accuracy of workpiece positioning, identification, tracking and detection functions.

Traffic monitoring and management: With the help of hardware trigger mode, images of passing vehicles can be accurately captured and analyzed for vehicle speed, license plate recognition, etc., thereby optimizing traffic management.

Motion analysis: The hardware trigger mode can be used to capture continuous images of high-speed moving objects for motion analysis and research, such as sports science research and animation production.

Safety monitoring: The hardware trigger mode can provide real-time, high-resolution images for real-time monitoring of equipment, process and environment safety, so as to prevent and detect potential accidents and failures.

Medical research and diagnosis: Use hardware trigger mode to capture high-speed continuous images for applications in biomedical research, blood flow in clinical diagnosis, electrocardiogram, minimally invasive surgery, etc.

Environmental monitoring: The hardware trigger mode can realize real-time monitoring of the environment (such as air quality, water quality, soil pollution, radiation, etc.) through industrial cameras.

Scientific research: Laboratories and research centers can use hardware trigger mode to capture high-speed, high-resolution images to support experiments and analysis in the fields of material science, physics, chemistry, etc.

Energy field: hardware trigger mode can be used for component detection, equipment monitoring and energy management applications, such as solar energy, wind energy, nuclear energy and other fields.

The above only lists some typical applications of hardware trigger mode on industrial cameras. In fact, hardware trigger mode also has broad application prospects in many other industries. These applications meet the advantages of stability, synchronization and accuracy brought by the hardware trigger mode, which can improve the performance and efficiency of the entire system.

Guess you like

Origin blog.csdn.net/xianzuzhicai/article/details/131394084