THORLABS DCU223x Operation Manual And Sdk page 286

Cdd and cmos cameras
Hide thumbs Also See for DCU223x:
Table of Contents

Advertisement

DCx Cameras
Example 1
INT nRet = IS_SUCCESS;
UINT nSupportedIOs = 0;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_GET_SUPPORTED,
(void*)&nSupportedIOs, sizeof(nSupportedIOs));
UINT nSupportedInputs = 0;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_GET_SUPPORTED_INPUTS,
(void*)&nSupportedInputs, sizeof(nSupportedInputs));
UINT nSupportedOutputs = 0;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_GET_SUPPORTED_OUTPUTS,
(void*)&nSupportedOutputs, sizeof(nSupportedOutputs));
Example 2
INT nRet = IS_SUCCESS;
UINT nDirection = 0;
// Get direction
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_GET_DIRECTION,
(void*)&nDirection, sizeof(nDirection));
// Set GPIO1 and GPIO2 to output
nDirection = IO_GPIO_1 | IO_GPIO_2;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_SET_DIRECTION,
(void*)&nDirection, sizeof(nDirection));
// Get the current state of the GPIOs
UINT nCurrentState = 0;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_GET_STATE,
(void*)&nCurrentState, sizeof(nCurrentState));
// Set GPIO1 to high, GPIO2 to low
nCurrentState = IO_GPIO_1;
nRet = is_IO(m_hCam, IS_IO_CMD_GPIOS_SET_STATE,
(void*)&nCurrentState, sizeof(nCurrentState));
Example 3
INT nRet = IS_SUCCESS;
UINT nLED = 0;
// Get the current state of the LED
nCurrentState = 0;
nRet = is_IO(m_hCam, IS_IO_CMD_LED_GET_STATE,
(void*)&nCurrentState, sizeof(nCurrentState));
// Set LED to state 1 (red)
nCurrentState = IO_LED_STATE_1;
nRet = is_IO(m_hCam, IS_IO_CMD_LED_SET_STATE,
(void*)&nCurrentState, sizeof(nCurrentState));
// Toggle LED state to green
nRet = is_IO(m_hCam, IS_IO_CMD_LED_TOGGLE_STATE, NULL, 0);
Example 4
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;
}
// Read the global flash params and set the flash params to these values
INT nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_APPLY_GLOBAL_PARAMS, NULL, 0);
284
© 2013 Thorlabs GmbH

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents