Skip to content

Sensor State#

The Sensor State camera feature allows you to set the power state of the sensor.

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#

// Get current sensor state
BslSensorStateEnums e = camera.BslSensorState.GetValue();
// Switch sensor power on
 // Put sensor in standby mode
// Switch sensor power off
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
// Put sensor in standby mode
// Switch sensor power off
size_t len = 0;
char e_str[64] = {0};
/* Get current sensor state */
len = sizeof(e_str);
errRes = PylonDeviceFeatureToString(hdev, "BslSensorState", e_str, &len);
/* Switch sensor power on */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorOn");
/* Put sensor in standby mode */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorStandby");
/* Switch sensor power off */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslSensorOff");
# Get current sensor state
e = camera.BslSensorState.Value
# Switch sensor power on
# Put sensor in standby mode
# Switch sensor power off

You can also use the pylon Viewer to easily set the parameters.