Image acquisition in HALCON
This application note shows how to acquire images with an IDS GigE Vision camera and the HALCON machine vision software. Because the HALCON installation brings its own GigE Vision compliant transport layer, it is not necessary using additional manufacturer specific software. Nevertheless, there are some advantages using the IDS Vision Suite with IDS GigE Vision cameras which the application note will mention.
Install HALCON development environment
Ensure that the HALCON machine vision development environment is installed completely on your system. You can download the newest release versions here: http://www.mvtec.com/login/?referer=download%2Fhalcon%2F
Consider that this software is not for free. Therefore, at least a valid evaluation license is required to run the software. To get such a license, please contact the IDS Support or MVTec.
Camera connection via HDevelop image acquisition assistantConfigurator
Start HDevelop and use the image acquisition assistant to open a connected IDS GigE Vision camera
In the ‘Source’ tab HALCON gives you the choice to connect cameras with different interfaces. When pressing ‘Auto-detect Interfaces’ (see Figure 2, No. 1) HALCON probes and lists only those interfaces in the dropdown list that correspond to your connected camera.
The HALCON installation includes an own GigE Vision interface library. (see Figure 2, No. 2) Using this HALCON GenTL (GenICam Tranport Layer), it’s not necessary to install any specific camera manufacturer software.
Camera IP configuration
If your camera has no valid or compatible IP configuration to connect the camera, HDevelop suggests to force an IP address with the according standard GenTL command ‘ForceIP’ to be able to use the camera for further operations.
Note, that forcing a cameras IP address is only volatile and not a static IP configuration. You are able to give the camera a valid IP configuration after connecting the camera with according GenAPI Parameter ‘GevPersistentIPAddress’ with HALCON operator ‘set_framegrabber_param’.
A detailed documentation of the HALCON Image Acquisition Interface for GigE Vision compliant cameras can be found under the following link: http://www.mvtec.com/products/halcon/interfaces/documentation/view/1302-standard-13-mvtecdoc-gigevision/
Open the IDS GigE Vision camera
With the ‘Connection’ tab you can choose a connected IDS camera. The device is represented with an ID which is composed of cameras MAC address and its device name (see Figure 4, No.2).
The device may be reported as misconfigured. In this case, the device icon will show this symbol:
If you select such a device, the assistant may suggest a generic parameter that potentially resolves the misconfiguration. (for example by using the ‘GtlForceIP’ parameter).
With pressing ‘Connect’, the camera will be opened. Then you are able to set additional camera parameter in the ‘Parameters’ tab or see a ‘Live’ preview of the camera.
Generate HALCON script to acquire images
With the ‘Code Generation’ tab you can generate HALCON script code for using the camera with chosen parameters in HDevelop for your machine vision project.
Generated HALCON code can look like this:
Tip
Another way setting a static IP configuration for IDS cameras is to use the tools included in the IDS Vision Suite, which provides you a complete software support to put your vision camera in operation quickly and easily. The IDS Vision Suite can be downloaded for free: https://de.ids-imaging.com/download-vision-win64.html
When the camera device has a preconfigured IP configuration HALCON doesn’t show a misconfigured camera and you do not have to force a valid IP address each time opening the camera.
With the IDS Vision Suite also the IDS GenTL will be installed. To use the camera with this additional transport layer you can choose the HALCON ‘GenICamTL’ interface (see Figure 7, No. 1).
By using the IDS GenTL you have an optimized image data transfer and the full IDS camera and software support with your application.