Summary
In this tutorial, we show, using a HALCON example installed with C4Utility, how a Heliotis Gen4 device is integrated into HALCON HDevelop. We configure the basic measurement parameters, start a 3D measurement via software trigger, and transfer the resulting 3D data to HALCON.
Acquiring 3D Data with HALCON
C4Utility contains a simple HALCON example that demonstrates the basic steps for integrating a Heliotis Gen4 device – from establishing a connection to acquiring and displaying 3D data.
1. Open HALCON Example
If the HALCON examples were selected during the C4Utility installation, they are located in the C4Utility installation directory (C:\Program Files\C4Utility\examples\HALCON).
Open the simple “h8SurfSimple.hdev” in HALCON HDevelop.
2. Configure Device Connection
At the beginning of the script, the IP address of the Heliotis device is set. It must match the device address displayed in the Heliotis Update Tool.
The factory default IP address of a Heliotis Gen4 device is:
192.168.2.71
Diafus is selected as the GenTL Producer. Diafus provides the communication interface between HALCON and the Heliotis device. The script then opens the frame grabber and establishes the connection to the device.
3. Set Measurement Parameters
The example contains an initialization procedure with the most important parameters for an initial measurement.
Scan Position defines the vertical position of the measurement.
Scan Range defines the vertical measurement range.
Scan Speed can be adjusted depending on the surface and required signal quality.
After executing the initialization procedure, the device is configured and ready for measurement.
4. Start 3D Measurement
The HALCON command grab_image_start puts the device into acquisition mode.
In the example, a 3D measurement is then started via a software trigger. After the measurement is complete, the acquired 3D data is transferred to HALCON with grab_data_async.
5. Display and Further Process 3D Data
The resulting height data can be visualized directly in HALCON as a 3D surface. The data is then available for further image processing and analysis functions in HALCON or in custom routines.
Further measurements can be performed by re-triggering and reading out the data.
After completing the measurements, close_framegrabber closes the connection and releases the Heliotis device for other applications.
Next Step
In Part 4 – Updating Device Firmware, we show how to update the firmware of a Heliotis Gen4 device using the Heliotis Update Tool.