![]() |
IDS peak comfortC v1.13.1
|
A trigger is a mechanism that synchronizes image capture with an external event or condition. This feature is crucial in applications where precise timing is needed to capture images at the right moment. More...
Topics | |
| Trigger edge property | |
| The trigger edge refers to the specific transition of a trigger signal that triggers capturing a frame. | |
| Trigger delay property | |
| Trigger delay refers to the time interval between the receipt of a trigger signal and the actual moment the camera captures an image. | |
| Trigger divider property | |
| A trigger divider is a setting that allows you to control the frequency of trigger signals by dividing the incoming trigger signal. | |
| Trigger burst property | |
| A burst trigger is a feature that allows the camera to capture multiple images in quick succession after receiving a single trigger signal. | |
Data Structures | |
| struct | peak_trigger_mode |
| peak Trigger mode More... | |
Macros | |
| #define | PEAK_TRIGGER_MODE_SOFTWARE_TRIGGER |
| peak Trigger mode preset: Frame start by software trigger | |
Enumerations | |
| enum | peak_trigger_target { PEAK_TRIGGER_TARGET_INVALID , PEAK_TRIGGER_TARGET_FRAME_START , PEAK_TRIGGER_TARGET_LEVEL_CONTROLLED_EXPOSURE } |
| peak Trigger target More... | |
Functions | |
| peak_access_status | peak_Trigger_GetAccessStatus (peak_camera_handle hCam) |
| Query the trigger feature access status. | |
| peak_status | peak_Trigger_Enable (peak_camera_handle hCam, peak_bool enabled) |
| Enable/Disable the trigger. | |
| peak_bool | peak_Trigger_IsEnabled (peak_camera_handle hCam) |
| Get the enabled status of the trigger. | |
| peak_bool | peak_Trigger_IsExecutable (peak_camera_handle hCam) |
| Check whether the trigger is executable or not. | |
| peak_status | peak_Trigger_Execute (peak_camera_handle hCam) |
| Execute the trigger. | |
| peak_access_status | peak_Trigger_Mode_GetAccessStatus (peak_camera_handle hCam, peak_trigger_mode triggerMode) |
| Query the trigger mode access status. | |
| peak_status | peak_Trigger_Mode_Set (peak_camera_handle hCam, peak_trigger_mode triggerMode) |
| Set the trigger mode. | |
| peak_status | peak_Trigger_Mode_Config_Get (peak_camera_handle hCam, peak_trigger_mode *triggerMode) |
| Get the trigger mode. | |
A trigger is a mechanism that synchronizes image capture with an external event or condition. This feature is crucial in applications where precise timing is needed to capture images at the right moment.
By using external signals — such as from sensors or actuators — the camera only captures images when necessary, conserving processing power and bandwidth. Triggers are key to optimizing performance, efficiency and precision in these systems.
Types of Triggers:
Hardware Trigger:
The camera captures an image upon receiving an electrical signal (e.g., a pulse) from an external device. Software Trigger:
A trigger initiated by software to command the camera to capture an image at a specified time.
To obtain a list of available input channels, call peak_IOChannel_GetListForDirection with PEAK_IO_DIRECTION_INPUT as the direction parameter (see example).
The example code below demonstrates how to configure and activate a hardware trigger on line 0 for frame start.
Unlike a hardware trigger, which is activated by an external signal, a software trigger is controlled by the application.
The example code below illustrates how to configure and enable a software trigger for FrameStart, start the image acquisition and execute the software trigger three times to capture frames.
Additional configuration options for the trigger include
the trigger edge, that initializes the image capture, the delay between the physical signal and the image capture, the trigger divider to ignore a specific number of trigger signals until the next image capture and the number of captured images on each trigger signal using a burst trigger.
| #define PEAK_TRIGGER_MODE_SOFTWARE_TRIGGER |
peak Trigger mode preset: Frame start by software trigger
Initialize a peak_trigger_mode with this preset and pass it to peak_Trigger_Mode_Set to configure a software trigger for frame start.
See the following example code.
| enum peak_trigger_target |
peak Trigger target
The trigger target specifies which operation a trigger signal initiates or defines.
| Enumerator | |
|---|---|
| PEAK_TRIGGER_TARGET_INVALID | Invalid trigger target. Use this value for the initialization of variables of type peak_trigger_target. |
| PEAK_TRIGGER_TARGET_FRAME_START | Frame start. A trigger signal will initiate the start of a frame acquisition. |
| PEAK_TRIGGER_TARGET_LEVEL_CONTROLLED_EXPOSURE | Level controlled exposure. The trigger signal will define the exposure duration. |
| peak_status peak_Trigger_Enable | ( | peak_camera_handle | hCam, |
| peak_bool | enabled ) |
Enable/Disable the trigger.
Sets the trigger to enabled or disabled.
A trigger can be enabled or disabled if there is no running acquisition only.
| [in] | hCam | The camera handle. |
| [in] | enabled | The desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
hCam is an invalid camera handle. | peak_status peak_Trigger_Execute | ( | peak_camera_handle | hCam | ) |
Execute the trigger.
Executes the trigger.
If a trigger is executed the configured trigger target is issued.
For a hardware trigger this means that an appropriate signal on the configured io channel is simulated.
| [in] | hCam | The camera handle. |
hCam is an invalid camera handle. | peak_access_status peak_Trigger_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the trigger feature access status.
Provides the current access status for the trigger feature.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. | peak_bool peak_Trigger_IsEnabled | ( | peak_camera_handle | hCam | ) |
Get the enabled status of the trigger.
Queries whether the trigger is currently enabled or disabled.
This function implements the Enabled Status Query principle.
| [in] | hCam | The camera handle. |
| peak_bool peak_Trigger_IsExecutable | ( | peak_camera_handle | hCam | ) |
Check whether the trigger is executable or not.
Queries whether the trigger is executable or not.
If a trigger is executable it can be issued via peak_Trigger_Execute.
This function implements the Boolean Status Queries principle.
| [in] | hCam | The camera handle. |
| peak_status peak_Trigger_Mode_Config_Get | ( | peak_camera_handle | hCam, |
| peak_trigger_mode * | triggerMode ) |
Get the trigger mode.
Reads the current trigger mode.
| [in] | hCam | The camera handle. |
| [out] | triggerMode | The trigger mode. |
triggerMode is an invalid pointer. hCam is an invalid camera handle. | peak_access_status peak_Trigger_Mode_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_trigger_mode | triggerMode ) |
Query the trigger mode access status.
Provides the access status for the given trigger mode.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | triggerMode | The trigger mode. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
triggerMode is an invalid trigger mode. Check peak_trigger_target and peak_io_channel. hCam is an invalid camera handle. | peak_status peak_Trigger_Mode_Set | ( | peak_camera_handle | hCam, |
| peak_trigger_mode | triggerMode ) |
Set the trigger mode.
Changes the trigger mode.
The properties of the trigger will be reset to the following default values:
| [in] | hCam | The camera handle. |
| [in] | triggerMode | The trigger mode. |
triggerMode is an invalid trigger mode. Check peak_trigger_target and peak_io_channel. hCam is an invalid camera handle.