If you use a Basler Light or a LED lighting solution by another manufacturer, you need the Basler SLP Strobe Controller to enable the communication between the camera and the light.
If you're using a Basler Light or a third-party light device:
Calculate the maximum allowed current for your device given the current duty cycle and strobe duration. On Basler ace 2, boost R, and dart M cameras, you can read the BslLightDeviceDutyCycle parameter to determine the current duty cycle.
On ace 2, boost R, and dart M cameras, the camera always uses Line 3 for light communication. Accordingly, when the Light Control feature is enabled, the line mode of Line 3 is set to InOut and the line connection is set to LightControl.
BslLightControlMode が On に設定されている場合、シリアル通信機能は無効になります。これは、Light Control 機能もシリアル通信を使用するからです。
Basler Camera Lights use pulse width modulation (PWM), the Basler SLP Strobe Controller doesn't. If you're using very short exposure times (<500 µs) and a brightness value other than 100 %, PWM can lead to brightness fluctuations or to stripes in rolling shutter cameras.
BslLightControlMode パラメーターを On に設定すると、照明器具が実際に点灯するまで最大 1 秒の遅延が発生します。これが原因で、最初の画像が暗くなりすぎる可能性があります。その画像は破棄してください。または、すべての画像を必要とする場合は、適切な遅延後に画像取得を開始してください。
Basler Camera Light をオーバードライブするときは、1 秒あたり 60 フレームを超える速度でカメラを動作させないでください。そうでないと、カメラと照明が予期しない動作を示す可能性があります。
Basler ace 2, boost R, and dart M cameras: When loading the light device settings from a user set, the settings are only applied after executing the BslLightControlEnumerateDevices command.
On ace 2, boost R, and dart M cameras, the BslLightControlOvertriggerCount parameter is available. It allows you to monitor how many trigger signals were sent while at least one of the connected light devices wasn't ready for it.
// Enable the light control modecamera.BslLightControlMode.SetValue(BslLightControlMode_On);//Enumerate the light devicescamera.BslLightControlEnumerateDevices.Execute();//Select light device 1camera.BslLightDeviceSelector.SetValue(BslLightDeviceSelector_Device1);//Set the nominal current of device 1 to 100 mAcamera.BslLightDeviceCurrent.SetValue(100.0);//Set the brightness to 100 %camera.BslLightDeviceBrightness.SetValue(100.0);//Set the operation mode to Strobecamera.BslLightDeviceOperationMode.SetValue(BslLightDeviceOperationMode_Strobe);
INodeMap&nodemap=camera.GetNodeMap();// Enable the light control modeCEnumParameter(nodemap,"BslLightControlMode").SetValue("On");// Enumerate the light devicesCCommandParameter(nodemap,"BslLightControlEnumerateDevices").Execute();// Select light device 1CEnumParameter(nodemap,"BslLightDeviceSelector").SetValue("Device1");// Set the nominal current of device 1 to 100 mACFloatParameter(nodemap,"BslLightDeviceCurrent").SetValue(100.0);// Set the brightness to 100 %CFloatParameter(nodemap,"BslLightDeviceBrightness").SetValue(100.0);// Set the operation mode to StrobeCEnumParameter(nodemap,"BslLightDeviceOperationMode").SetValue("Strobe");
// Enable the light control modecamera.Parameters[PLCamera.BslLightControlMode].SetValue(PLCamera.BslLightControlMode.On);// Enumerate the light devicescamera.Parameters[PLCamera.BslLightControlEnumerateDevices].Execute();// Select light device 1camera.Parameters[PLCamera.BslLightDeviceSelector].SetValue(PLCamera.BslLightDeviceSelector.Device1);// Set the nominal current of device 1 to 100 mAcamera.Parameters[PLCamera.BslLightDeviceCurrent].SetValue(100.0);// Set the brightness to 100 %camera.Parameters[PLCamera.BslLightDeviceBrightness].SetValue(100.0);// Set the operation mode to Strobecamera.Parameters[PLCamera.BslLightDeviceOperationMode].SetValue(PLCamera.BslLightDeviceOperationMode.Strobe);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Enable the light control mode */errRes=PylonDeviceFeatureFromString(hdev,"BslLightControlMode","On");CHECK(errRes);/* Enumerate the light devices */errRes=PylonDeviceExecuteCommandFeature(hdev,"BslLightControlEnumerateDevices");CHECK(errRes);/* Select light device 1 */errRes=PylonDeviceFeatureFromString(hdev,"BslLightDeviceSelector","Device1");CHECK(errRes);/* Set the nominal current of device 1 to 100 mA */errRes=PylonDeviceSetFloatFeature(hdev,"BslLightDeviceCurrent",100.0);CHECK(errRes);/* Set the brightness to 100 % */errRes=PylonDeviceSetFloatFeature(hdev,"BslLightDeviceBrightness",100.0);CHECK(errRes);/* Set the operation mode to Strobe */errRes=PylonDeviceFeatureFromString(hdev,"BslLightDeviceOperationMode","Strobe");CHECK(errRes);
# Enable the light control modecamera.BslLightControlMode.Value="On"# Enumerate the light devicescamera.BslLightControlEnumerateDevices.Execute()# Select light device 1camera.BslLightDeviceSelector.Value="Device1"# Set the nominal current of device 1 to 100 mAcamera.BslLightDeviceCurrent.Value=100.0# Set the brightness to 100 %camera.BslLightDeviceBrightness.Value=100.0# Set the operation mode to Strobecamera.BslLightDeviceOperationMode.Value="Strobe"
// Enable the light control modecamera.BslLightControlMode.SetValue(BslLightControlMode_On);//Enumerate the light devicescamera.BslLightControlEnumerateDevices.Execute();//Select light device 1camera.BslLightDeviceSelector.SetValue(BslLightDeviceSelector_Device1);//Set the nominal current of device 1 to 100 mAcamera.BslLightDeviceMaxCurrent.SetValue(100.0);//Set the brightness to 100 %camera.BslLightDeviceBrightness.SetValue(100.0);//Set the operation mode to Strobecamera.BslLightDeviceOperationMode.SetValue(BslLightDeviceOperationMode_Strobe);
INodeMap&nodemap=camera.GetNodeMap();// Enable the light control modeCEnumParameter(nodemap,"BslLightControlMode").SetValue("On");// Enumerate the light devicesCCommandParameter(nodemap,"BslLightControlEnumerateDevices").Execute();// Select light device 1CEnumParameter(nodemap,"BslLightDeviceSelector").SetValue("Device1");// Set the nominal current of device 1 to 100 mACFloatParameter(nodemap,"BslLightDeviceMaxCurrent").SetValue(100.0);// Set the brightness to 100 %CFloatParameter(nodemap,"BslLightDeviceBrightness").SetValue(100.0);// Set the operation mode to StrobeCEnumParameter(nodemap,"BslLightDeviceOperationMode").SetValue("Strobe");
// Enable the light control modecamera.Parameters[PLCamera.BslLightControlMode].SetValue(PLCamera.BslLightControlMode.On);// Enumerate the light devicescamera.Parameters[PLCamera.BslLightControlEnumerateDevices].Execute();// Select light device 1camera.Parameters[PLCamera.BslLightDeviceSelector].SetValue(PLCamera.BslLightDeviceSelector.Device1);// Set the nominal current of device 1 to 100 mAcamera.Parameters[PLCamera.BslLightDeviceMaxCurrent].SetValue(100.0);// Set the brightness to 100 %camera.Parameters[PLCamera.BslLightDeviceBrightness].SetValue(100.0);// Set the operation mode to Strobecamera.Parameters[PLCamera.BslLightDeviceOperationMode].SetValue(PLCamera.BslLightDeviceOperationMode.Strobe);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Enable the light control mode */errRes=PylonDeviceFeatureFromString(hdev,"BslLightControlMode","On");CHECK(errRes);/* Enumerate the light devices */errRes=PylonDeviceExecuteCommandFeature(hdev,"BslLightControlEnumerateDevices");CHECK(errRes);/* Select light device 1 */errRes=PylonDeviceFeatureFromString(hdev,"BslLightDeviceSelector","Device1");CHECK(errRes);/* Set the nominal current of device 1 to 100 mA */errRes=PylonDeviceSetFloatFeature(hdev,"BslLightDeviceMaxCurrent",100.0);CHECK(errRes);/* Set the brightness to 100 % */errRes=PylonDeviceSetFloatFeature(hdev,"BslLightDeviceBrightness",100.0);CHECK(errRes);/* Set the operation mode to Strobe */errRes=PylonDeviceFeatureFromString(hdev,"BslLightDeviceOperationMode","Strobe");CHECK(errRes);
# Enable the light control modecamera.BslLightControlMode.Value="On"# Enumerate the light devicescamera.BslLightControlEnumerateDevices.Execute()# Select light device 1camera.BslLightDeviceSelector.Value="Device1"# Set the nominal current of device 1 to 100 mAcamera.BslLightDeviceMaxCurrent.Value=100.0# Set the brightness to 100 %camera.BslLightDeviceBrightness.Value=100.0# Set the operation mode to Strobecamera.BslLightDeviceOperationMode.Value="Strobe"