Retrieving and Setting Recording Conditions¶
After opening the device, check the device status and configure settings as needed.
Retrieving the frame rate and shutter speed¶
PUCRESULT result;
UINT32 nFramerate, nShutterFps;
result = PUC_GetFramerateShutter(hDevice, &nFramerate, &nShutterFps);
if (PUC_CHK_FAILED(result))
{
return;
}
Configuring the frame rate and shutter speed¶
Set the frame rate to 1,000 fps and the shutter speed to 1/2,000 fps.
PUCRESULT result;
result = PUC_SetFramerateShutter(hDevice, 1000, 2000);
if (PUC_CHK_FAILED(result))
{
return;
}
Note
Changing the frame rate will change the resolution to the maximum resolution for the set frame rate.
Configuring the resolution¶
Set the resolution to 1246 px × 800 px.
result = PUC_SetResolution(hDevice, 1246, 800);
if (PUC_CHK_FAILED(result))
{
return;
}
Note
You can retrieve resolution settings that can be set for the current frame rate with PUC_GetMaxResolution.
The vertical and the horizontal resolution has each mimimum limitation unit (not by 1 pixel) for setting value. These units can be retrieved with PUC_GetResolutionLimit.
Configuring the exposure¶
Acquires the minimum exposure / non-exposure time that can be set in nsec units.
UINT32 nMinExpOnTime, nMinExpOffTime;
result = PUC_GetMinExpsoeTime(hDevice, &nMinExpOnTime, &nMinExpOffTime)
if (PUC_CHK_FAILED(result))
{
return;
}
Set open shutter (equivalent to about 1,000,000nsec) at 1,000fps, do as follows.
UINT32 nExpOpen = 1000000 - nMinExpOffTime;
result = PUC_SetExposeTime(hDevice, nExpOpen, nMinExpOffTime)
if (PUC_CHK_FAILED(result))
{
return;
}
Note
Due to internal calculation, an error of up to 12nsec will occur.
Note that the return value of PUC_GetFramerateShutter function will be invalid if the exposure/non-exposure time is set directly with this function.