GIGE VISION EVENTS
GigE Vision Events are typically used to synchronize the host application with some events happening in the device. A typical usecase in machine vision applications is for example a host that waits to be notified in real time of the sensor’s exposure end to move the inspected part on a conveyer belt.
This post describes how to register a callback function to monitor an event of an AT-3D Camera with CVB.
For AT cameras there are a number of different events available:
Event Name | Event ID | Description |
---|---|---|
AcquisitionStart | 36882 | Frame Acquisition is started |
AcquisitionEnd | 36883 | Frame Acquisition is terminated |
TransferStart | 36884 | Frame transfer is started from the camera |
TransferEnd | 36885 | Frame transfer is terminated |
AOITrackingOn | 36886 | The AOI tracking process is started and the laser line image is valid for AOI alignment |
AOITrackingOff | 36887 | The AOI tracking process is stopped and the AOI position is not updated anymore |
AOISearchFailed | 36888 | AOI-Search failed to detect the laser line |
AutoStarted | 36889 | Frame Acquisition is initiated through AutoStart |
The number of events might increase for newer firmware versions. Please refer to the current sensor manual for all supported events.
Implementation
As @parsd already pointed out in this posting, there are two ways to register events with CVB. Either by using the preferred way over the GenApi with NRegisterUpdate()
or by using the INotify
interface. Which one you take depends on whether the camera supports the event handling via the GenApi or not.
In general, the 3D cameras of AT support the standardized way of the event handling. However, this requires a current firmware version to be running on the sensor, that includes timestamps for each event. Please refer to the Firmware Release Notes to check if your camera supports the „EventNotification via GenICam node access“.
For the object oriented CVB-APIs there is another (and even easier!) example to register an Event Callback (CVB++) to a node. It can be found in this post.