Register Events
This topic describes how to register a profiler event and define the event processing mechanism by using the register_profiler_event sample.
The sample includes the following events:
-
Data acquisition start (EventFrameStart)
-
Line trigger missed (EventLineTriggerMissed)
-
Input signal terminal level change events (Line[X]RisingEdge, Line[X]FallingEdge)
[X] refers to the terminal number. Range: 1–6.
Please refer to Usage Guide for HALCON Samples to obtain the samples and check the prerequisites for using the samples. |
Run the Sample
Follow these steps to run the sample:
-
Open the sample in HDevelop: Open HDevelop, and drag the sample into HDevelop.
-
Step over the program (click the
button in the toolbar repeatedly), until the Variable Inspect: MechEyeProfilerInfos window pops up.
-
This window displays all the available laser profilers. Double-click the laser profiler that you want to connect, and copy the name after unique_name: or user_name:.
user_name is the custom laser profiler name. You can customize the camera name in Mech-Eye Viewer. -
Locate the following line, and replace LNX with the copied unique_name or user_name.
DeviceInfo := 'LNX'
-
Run the sample by clicking
in the toolbar or pressing the F5 key.
-
The obtained point cloud is displayed in the Graphics Window. At the same time, a window pops up in the upper left corner of the software, displaying event details.