Please enable JavaScript to view this site.

IDS Software Suite 4.96.1

Windows_Logo
Linux_Logo

USB 2.0

USB 3.x

GigE

USB 2.0

USB 3.x

GigE

Syntax

INT is_IO(HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)

Description

With the is_IO() function you control all flash functions (see uEye Cockpit: Input/output).

Rolling shutter cameras:
Using is_IO(), you can determine the times required to implement a global flash function for rolling shutter cameras. This way, a rolling shutter camera can also be used as a global shutter camera provided that no ambient light falls on the sensor outside the flash period. If the exposure time is set too short so that no global flash operation is possible, the function returns IS_NO_SUCCESS.

Rolling shutter cameras with global start function:
To use a rolling shutter camera with the global start function, first call the is_DeviceFeature() function. Otherwise, incorrect values will be returned for s32Delay and u32Duration.

Global shutter cameras:
In freerun mode, the exposure of global shutter cameras is delayed if the exposure time is not set to the maximum value. is_IO() determines the required delay in order to synchronize exposure and flash operation. In triggered mode, the return values for delay and flash duration are 0, since no delay is necessary before exposure starts.

From driver version 4.40 on it is possible to determine automatically the exposure window in freerun mode. For further information, please refer to the chapters Camera basics: Shutter methods, Digital inputs/outputs and Operating modes.

If you operate the camera in burst trigger mode, the flash settings can only be changed after the burst is completed.

hint_info

Note: The uEye LE USB 3.1 Gen 1 camera family supports flash only in triggered mode and not in freerun mode.

Note on the accuracy of flash synchronization

The following parameters have an influence on the camera's internal timing:

Image geometry

Pixel clock

Exposure time

If you change any of these parameters, you will have to set the flash duration and flash delay parameters once again.

hint_info

Note on the delay time and optocouplers

Depending on the set edge delays are possible in the lower µs range with built-in optocouplers. So, for example the set flash duration varies from the measured flash duration. This delay should be considered for very small exposure times because the flash is fired with delay.

The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the cbSizeOfParam input parameter.

Input parameters

hCam

Camera handle

pParam

Pointer to a function parameter, whose function depends on nCommand.

cbSizeOfParam

Size (in bytes) of the memory area to which pParam refers.

Contents of the IO_FLASH_PARAMS structure

INT

s32Delay

Flash delay (in μs)

UINT

u32Duration

Flash duration (in μs)

If 0 is passed, the flash output will be active until the end of the exposure time. For sensors with Global Start Shutter this is the time until the end of exposure of the first sensor row.

Example 1

INT nRet = IS_SUCCESS;
 
// Read the global flash params
IO_FLASH_PARAMS flashParams;
INT nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_GLOBAL_PARAMS,
                (void*)&flashParams, sizeof(flashParams));
if (nRet == IS_SUCCESS)
{
  INT nDelay   = flashParams.s32Delay;
  UINT nDuration = flashParams.u32Duration;
}
 
// Apply the global flash params and set the flash params to these values
IO_FLASH_PARAMS flashParams;
INT nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_APPLY_GLOBAL_PARAMS, (void*)&flashParams, sizeof(flashParams));

Example 2

INT nRet = IS_SUCCESS;
 
IO_FLASH_PARAMS flashParams;
 
// Get the minimum values for flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_PARAMS_MIN,
            (void*)&flashParams, sizeof(flashParams));
if (nRet == IS_SUCCESS)
{
  INT nFlashDelayMin   = flashParams.s32Delay;
  UINT nFlashDurationMin = flashParams.u32Duration;
}
 
// Get the maximum values for flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_PARAMS_MAX,
            (void*)&flashParams, sizeof(flashParams));
if (nRet == IS_SUCCESS)
{
  INT nFlashDelayMax   = flashParams.s32Delay;
  UINT nFlashDurationMax = flashParams.u32Duration;
}
 
// Get the increment for flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_PARAMS_INC,
            (void*)&flashParams, sizeof(flashParams));
if (nRet == IS_SUCCESS)
{
  INT nFlashDelayInc   = flashParams.s32Delay;
  UINT nFlashDurationInc = flashParams.u32Duration;
}
 
// Get the current values for flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_PARAMS,
            (void*)&flashParams, sizeof(flashParams));
if (nRet == IS_SUCCESS)
{
  INT nCurrentFlashDelay   = flashParams.s32Delay;
  UINT nCurrentFlashDuration = flashParams.u32Duration;
}
 
// Set the current values for flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_PARAMS,
            (void*)&flashParams, sizeof(flashParams));

Example 3

INT nRet = IS_SUCCESS;
 
// Get all GPIOs that can be used as flash output
UINT nGPIOs_Flash = 0;
INT nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_SUPPORTED_GPIOS,
                (void*)&nGPIOs_Flash, sizeof(nGPIOs_Flash));
 
// Get all GPIOs that can be used for the PWM
UINT nGPIOs_PWM = 0;
INT nRet = is_IO(m_hCam, IS_IO_CMD_PWM_GET_SUPPORTED_GPIOS,
                (void*)&nGPIOs_PWM, sizeof(nGPIOs_PWM));

Example 4

INT nRet = IS_SUCCESS;
 
// Disable flash
UINT nMode = IO_FLASH_MODE_OFF;
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_MODE, (void*)&nMode, sizeof(nMode));
 
// Set the flash to a constant low output
nMode = IO_FLASH_MODE_CONSTANT_LOW;
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_MODE, (void*)&nMode, sizeof(nMode));
 
// Set the flash to a high active pulse for each image in the trigger mode
nMode = IO_FLASH_MODE_TRIGGER_HI_ACTIVE;
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_MODE, (void*)&nMode, sizeof(nMode));
 
// Get the current flash mode
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_MODE, (void*)&nMode, sizeof(nMode));

Example 5

INT nRet = IS_SUCCESS;
 
IO_FLASH_PARAMS flashParams;
// Get the minimum values for the GPIO flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_GPIO_PARAMS_MIN, (void*)&flashParams,
            sizeof(flashParams));
 
// Set the minimum values for flash delay and flash duration. Be careful: The normal flash does not work with values < 20 us
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_GPIO_PARAMS, (void*)&flashParams,
            sizeof(flashParams));

Example 6

INT nRet = IS_SUCCESS;
 
UINT nValue;
 
// Get the default value for the flash auto freerun
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_AUTO_FREERUN_DEFAULT, (void*)&nValue, sizeof(nValue));
 
// Get the current value for the flash auto freerun
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_AUTO_FREERUN, (void*)&nValue, sizeof(nValue));
 
// Enable flash auto freerun
nValue = IS_FLASH_AUTO_FREERUN_ON;
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_AUTO_FREERUN, (void*)&nValue, sizeof(nValue));

© 2022 IDS Imaging Development Systems GmbH