Register Camera Events
This topic describes how to register a camera event and define the event processing mechanism by using the register_camera_event sample.
The sample includes the following events:
-
Exposure completed (EventExposureEnd)
-
Abnormal projector temperature (EventLaserUnitTemperatureAbnormal)
Only LSR S-GL, LSR L-GL, LSR XL-GL, and DEEP-GL support this event.
-
Abnormal power board voltage (EventVoltageAbnormal)
The exposure completion event refers to the camera finishing the projection of structured light and completing the acquisition of 3D data. After the client program receives the event information, the robot can begin moving, and other cameras at the same workstation can start projecting structured light. Meanwhile, the camera completes the subsequent calculations and data transmission. The exposure completion event can improve the acquisition cycle time.
After registering and enabling the abnormal projector temperature event, the client program can automatically monitor the projector temperature and display a pop-up alert when an anomaly is detected.
After registering and enabling the abnormal power board voltage event, the client program can automatically monitor the power board voltage and display a pop-up alert when an anomaly is detected.
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: MechEyeCamers window pops up.
-
This window displays all the available cameras. Double-click the camera that you want to connect, and copy the name after unique_name: or user_name:.
user_name is the custom camera name. You can customize the camera name in Mech-Eye Viewer. -
Locate the following line, and replace MechEye with the copied unique_name or user_name.
DeviceInfo := 'MechEye'
-
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.