© 2013 Thorlabs GmbH194
DCx Cameras
Return values
IS_CANT_COMMUNICATE_WITH_DRIVER
Communication with the driver failed because no driver
has been loaded.
An attempt to initialize or select the camera failed (no
camera connected or initialization error).
The function can not be executed in the current camera
operating mode (free run, trigger or standby).
One of the submitted parameters is outside the valid
range or is not supported for this sensor or is not
available in this mode.
An IO request from the uc480 driver failed. Possibly the
versions of the uc480_api.dll (API) and the driver file
(uc480_usb.sys) do not match.
The camera model used here does not support this
function or setting.
No memory could be allocated.
Function executed successfully
Example 1
INT nSupportedFeatures;
INT nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_GET_SUPPORTED_FEATURES,
(void*)&nSupportedFeatures, sizeof(nSupportedFeatures));
if (nRet == IS_SUCCESS)
{
if (nSupportedFeatures & IS_DEVICE_FEATURE_CAP_LINESCAN_MODE_FAST)
{
// Enable line scan mode
INT nMode = IS_DEVICE_FEATURE_CAP_LINESCAN_MODE_FAST;
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_SET_LINESCAN_MODE, (void*)&nMode,
sizeof(nMode));
// Disable line scan mode
nMode = 0;
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_SET_LINESCAN_MODE, (void*)&nMode,
sizeof(nMode));
// Return line scan mode
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_GET_LINESCAN_MODE, (void*)&nMode,
sizeof(nMode));
}
if (nSupportedFeatures & IS_DEVICE_FEATURE_CAP_LINESCAN_NUMBER)
{
// Set line number
INT nLineNumber = 512;
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_SET_LINESCAN_NUMBER,
(void*)&nLineNumber, sizeof(nLineNumber));
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_GET_LINESCAN_NUMBER,
(void*)&nLineNumber, sizeof(nLineNumber));
}
}
Example 2
/* Read and set default Log mode */
UINT nDefaultLogMode = 0;
INT nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_GET_LOG_MODE_DEFAULT,
(void*)&nDefaultLogMode, sizeof(nDefaultLogMode));
if (nRet == IS_SUCCESS) {
nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_SET_LOG_MODE,
(void*)&nDefaultLogMode, sizeof(nDefaultLogMode));
}
Example 3
/* Read current Log pixel mode */
UINT nLogMode = 0;
INT nRet = is_DeviceFeature(hCam, IS_DEVICE_FEATURE_CMD_GET_LOG_MODE,
(void*)&nLogMode, sizeof(nLogMode));