Sensor State#
This can be useful to reduce power consumption, heat generation, and delays when acquiring images.
Using the Feature#
Why Use Sensor State#
The camera sensor has the following power states:
- On
- Standby
- Off
The default sensor state after camera startup or reset is the standby mode. When configuring certain parameters, the sensor automatically switches into standby mode. As soon as image acquisition starts, the sensor is switched on again, but with a certain delay.
The Sensor State feature allows you to manually set the sensor state. This may reduce delays when acquiring images.
Putting the sensor in standby mode can also be useful to reduce power consumption and heat generation. This in turn can have a positive effect on image quality.
Determining the Sensor State#
To determine the current sensor state, get the BslSensorState
parameter value.
Setting the Sensor State#
To set the sensor state, execute one of the following commands:
BslSensorOn
: The sensor is switched on.BslSensorStandby
: The sensor is put in standby mode. Power consumption is reduced.BslSensorOff
: The sensor is switched off.
Sample Code#
INodeMap& nodemap = camera.GetNodeMap();
// Get current sensor state
String_t e = CEnumParameter(nodemap, "BslSensorState").GetValue();
// Switch sensor power on
CCommandParameter(nodemap, "BslSensorOn").Execute();
// Put sensor in standby mode
CCommandParameter(nodemap, "BslSensorStandby").Execute();
// Switch sensor power off
CCommandParameter(nodemap, "BslSensorOff").Execute();
// Get current sensor state
string e = camera.Parameters[PLCamera.BslSensorState].GetValue();
// Switch sensor power on
camera.Parameters[PLCamera.BslSensorOn].Execute();
// Put sensor in standby mode
camera.Parameters[PLCamera.BslSensorStandby].Execute();
// Switch sensor power off
camera.Parameters[PLCamera.BslSensorOff].Execute();
size_t len = 0;
char e_str[64] = {0};
/* Get current sensor state */
len = sizeof(e_str);
errRes = PylonDeviceFeatureToString(hdev, "BslSensorState", e_str, &len);
CHECK(errRes);
/* Switch sensor power on */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorOn");
CHECK(errRes);
/* Put sensor in standby mode */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorStandby");
CHECK(errRes);
/* Switch sensor power off */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorOff");
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.