IDS peak comfortC v1.12.0
Loading...
Searching...
No Matches

Flash refers to the electrical signal used to trigger an external light source. More...

Topics

 Flash configuration options
 Functions to set the flash timing parameters.
 

Data Structures

struct  peak_flash_mode
 peak Flash mode More...
 

Enumerations

enum  peak_flash_reference {
  PEAK_FLASH_REFERENCE_INVALID , PEAK_FLASH_REFERENCE_LINE_1_SIGNAL , PEAK_FLASH_REFERENCE_EXPOSURE_ACTIVE , PEAK_FLASH_REFERENCE_GLOBAL_START_WINDOW ,
  PEAK_FLASH_REFERENCE_ACQUISITION_ACTIVE
}
 Selects the internal signal that will be the source to start the flash active signal. More...
 

Functions

peak_access_status peak_Flash_GetAccessStatus (peak_camera_handle hCam)
 Query the flash feature access status.
 
peak_status peak_Flash_Enable (peak_camera_handle hCam, peak_bool enabled)
 Enable/Disable the flash.
 
peak_bool peak_Flash_IsEnabled (peak_camera_handle hCam)
 Get the enabled status of the flash.
 
peak_access_status peak_Flash_Mode_GetAccessStatus (peak_camera_handle hCam, peak_flash_mode flashMode)
 Query the flash mode access status.
 
peak_status peak_Flash_Mode_Set (peak_camera_handle hCam, peak_flash_mode flashMode)
 Set the flash mode.
 
peak_status peak_Flash_Mode_Config_Get (peak_camera_handle hCam, peak_flash_mode *flashMode)
 Get the flash mode.
 

Detailed Description

Flash refers to the electrical signal used to trigger an external light source.

This signal is typically synchronized with the camera's exposure, ensuring the flash fires precisely when the camera captures an image. It is often linked to the ExposureActive signal, ensuring the flash is triggered exactly during the exposure, providing consistent and controlled illumination for the captured frame.

The following example code demonstrates how to configure and activate a flash during active exposure on line 1.

if (access != PEAK_ACCESS_READWRITE)
{
// camera does not support trigger
}
access = peak_Flash_Mode_GetAccessStatus(hCam, flash_mode);
if (access != PEAK_ACCESS_READWRITE)
{
// this flash mode is not available, check input channels
}
peak_status status = peak_Flash_Mode_Set(hCam, flash_mode);
if (PEAK_ERROR(status))
{
// handle error
}
status = peak_Flash_Enable(hCam, PEAK_TRUE);
if (PEAK_ERROR(status))
{
// handle error
}

Configuration Options

Additional configuration options for the flash include

the flash start delay, ..., the flash end delay ..., the flash duration ...

Note
The availability of these options depends on the camera model and firmware version. It is highly recommended to verify the access status before executing the corresponding function.

Enumeration Type Documentation

◆ peak_flash_reference

Selects the internal signal that will be the source to start the flash active signal.

Enumerator
PEAK_FLASH_REFERENCE_INVALID 

Invalid flash reference.

Use this value for the initialization of variables of type peak_flash_reference.

PEAK_FLASH_REFERENCE_LINE_1_SIGNAL 

Line 1 signal.

The flash mirrors the signal of Line 1, e.g. "Flash Active".

PEAK_FLASH_REFERENCE_EXPOSURE_ACTIVE 

Exposure active.

The flash is active while the exposure is active.

PEAK_FLASH_REFERENCE_GLOBAL_START_WINDOW 

Global start window.

The flash is active for the length of the global start window.

PEAK_FLASH_REFERENCE_ACQUISITION_ACTIVE 

Acquisition active.

The flash is active while the acquisition is active.

Function Documentation

◆ peak_Flash_Enable()

peak_status peak_Flash_Enable ( peak_camera_handle hCam,
peak_bool enabled )

Enable/Disable the flash.

Sets the flash to enabled or disabled.

A flash can be enabled or disabled if there is no running acquisition only.

Parameters
[in]hCamThe camera handle.
[in]enabledThe desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The flash feature is not accessible for write. Check the access status of the trigger feature via peak_Flash_GetAccessStatus.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.0

◆ peak_Flash_GetAccessStatus()

peak_access_status peak_Flash_GetAccessStatus ( peak_camera_handle hCam)

Query the flash feature access status.

Provides the current access status for the flash feature.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_ACCESS_READWRITE The flash feature is readable and writeable.
PEAK_ACCESS_READONLY The flash feature is readable only.
PEAK_ACCESS_GFA_LOCK The flash feature is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NONE The flash feature is not accessible. Check for a running acquisition.
PEAK_ACCESS_NOT_SUPPORTED The flash feature is not supported.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

Since
1.0

◆ peak_Flash_IsEnabled()

peak_bool peak_Flash_IsEnabled ( peak_camera_handle hCam)

Get the enabled status of the flash.

Queries whether the flash is currently enabled or disabled.

This function implements the Enabled Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_TRUE The flash is currently enabled.
PEAK_FALSE The flash is currently disabled or the query failed.
Since
1.0

◆ peak_Flash_Mode_Config_Get()

peak_status peak_Flash_Mode_Config_Get ( peak_camera_handle hCam,
peak_flash_mode * flashMode )

Get the flash mode.

Reads the current flash mode.

Parameters
[in]hCamThe camera handle.
[out]flashModeThe flash mode.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The flash mode is not available for read access. Check the access status of the flash mode via peak_Flash_Mode_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER flashMode is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.11

◆ peak_Flash_Mode_GetAccessStatus()

peak_access_status peak_Flash_Mode_GetAccessStatus ( peak_camera_handle hCam,
peak_flash_mode flashMode )

Query the flash mode access status.

Provides the access status for the given flash mode.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
[in]flashModeThe flash mode.
Returns
PEAK_ACCESS_READWRITE The flash mode is readable and writeable.
PEAK_ACCESS_READONLY The flash mode is readable only.
PEAK_ACCESS_GFA_LOCK The flash mode is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NONE The flash mode is not accessible.
PEAK_ACCESS_NOT_SUPPORTED The flash mode is not supported.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

Since
1.0

◆ peak_Flash_Mode_Set()

peak_status peak_Flash_Mode_Set ( peak_camera_handle hCam,
peak_flash_mode flashMode )

Set the flash mode.

Changes the flash mode.

The properties of the flash will be reset to the following default values:

  • The flash start delay will be set to 0.
  • The flash end delay will be set to 0.
  • The flash duration will be set to default.
Parameters
[in]hCamThe camera handle.
[in]flashModeThe flash mode.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_OUT_OF_RANGE The flash mode is not available or not known at all.
PEAK_STATUS_ACCESS_DENIED The flash mode is not available for write access or the io channel is not available for write access. Check the access status of the flash mode via peak_Flash_Mode_GetAccessStatus. Check the access status of the io channel via peak_IOChannel_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER flashMode is an invalid flash mode. Check peak_flash_reference and peak_io_channel.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_INVALID_PARAMETER flashMode contains an invalid parameter, which can never be set.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.0