コンテンツにスキップ

Light Control#

Light Control 機能では、最大 4 台の照明器具を制御できます。

この機能は、SLP プロトコルに基づき、カメラと照明器具が互いに直接通信できるようにします。

Basler Standard Light または別のメーカーの LED ライトソリューションを使用する場合、カメラとライト間の通信を可能にするために Basler SLP Strobe Controller が必要です。

Basler Camera Light を使用する場合は、コントローラー機能がすでに含まれているため、別のコントローラーは必要ありません。

機能を使用する#

照明器具の設定#

照明器具を設定するには、次のようにします。

  1. pylon Viewer を使用する場合は、[機能]ペインの[ポーリング]オプションが選択されていることを確認してください。

    pylon Viewer のポーリングオプション

  2. カメラがアイドル状態であること、つまり画像をキャプチャしていないことを確認します。

  3. まだ接続していない場合は、照明器具とコントローラーを接続します。
  4. Set the BslLightControlMode parameter to On.
  5. Execute the BslLightControlEnumerateDevices command.
    This enables light device communication via GPIO line and assigns a light device ID.
  6. If you have multiple light devices in your environment, set the BslLightDeviceSelector parameter to the device that you want to configure.
    Make sure the device is properly connected, i.e., the BslLightDeviceErrorStatus parameter returns NoError.
  7. Basler SLP Strobe Controller を使用する場合は、次のようにします。

    1. Set the BslLightDeviceControlMode parameter to specify how you want to control the light device.
      Every light can be controlled via current control (Current). For lights designed for a 12 VDC or 24 VDC connection, it is recommended to use voltage control (Voltage12V or Voltage24V).
    2. Set the BslLightDeviceOperationMode parameter to Off.
    3. Set the BslLightDeviceMaxCurrent parameter to the nominal current rating of your light in continuous operation (in mA).

      注意 – 高すぎる公称電流定格を指定すると、照明が損傷する可能性があります。

      電流制御を使用する場合は、ライトが耐えられる公称電流定格を必ず指定してください。

      そうしないと、動作中にライトが損傷します。

  8. Set the BslLightDeviceBrightness parameter to the desired brightness.
    A value of 100.0 corresponds to 100 % of the nominal current rating of your light device. 50 % reduces the current by a factor of 2. You can also set the brightness to more than 100 %. This is called overdriving.

  9. パラメーターを BslLightDeviceOperationMode 目的のモードへのパラメーター:
    • On: Makes the light shine continuously.
    • Strobe: Sets the light to strobe mode.
  10. 必要な場合は、ユーザーセットに設定を保存します。

情報

  • If you use a Basler Camera Light, the BslLightDeviceControlMode and BslLightDeviceMaxCurrent parameters are set automatically.
  • 電流から電圧へ、またはその逆に切り替えるたびに、短時間のコントローラー初期化フェーズが発生し、その間は接続されている照明が点灯することに注意してください。これは最大 15 秒間持続する場合がありますが、通常の動作です。

ストロボモード#

ストロボモードを使用すると、照明器具を連続的に点灯しておくのではなく、必要なときにフラッシュのように動作させることができます。

ストロボモードを使用すると、次のような利点があります。

  • 照明の寿命を延ばすのに役立ちます。必要なときだけ照明を動作させることで、LED の発熱を抑えます。これにより、照明の劣化プロセスを遅らせることができます。
  • ストロボモードでは、照明をオーバードライブできます。つまり、供給電流を最大 500 %(照明コントローラーの場合)まで増大させることで、照明の明るさを上げます。

To enable strobe mode, select a light device and set the BslLightDeviceOperationMode parameter to Strobe.

トリガー信号とストロボ持続期間の設定#

一般に、照明器具のトリガーは次のように動作します。

  • 最初はライトが消灯しています。
  • トリガー信号によりライトが点灯します。
  • ライトは一定時間点灯し続けます。これがストロボ持続時間です。
  • ストロボ持続時間が終了すると、ライトは再び消灯します。
ace 2, boost, and dart M Cameras#

ace 2 および boost カメラでトリガー信号とストロボ持続時間を設定するには、次のようにします。

  1. Set the BslLightControlTriggerSource parameter to the source that you want to use to turn on the connected lights, e.g., FlashWindow.
  2. If applicable, set the BslLightControlTriggerActivation パラメーターを次のいずれかの値に設定します。
    • RisingEdge (default): All connected lights are turned on when the signal rises, i.e., when the signal status changes from low to high.
    • FallingEdge: All connected lights are turned on when the signal falls, i.e., when the signal status changes from high to low.
    • AnyEdge: All connected lights are turned on when the signal falls or rises.
  3. パラメーターを BslLightDeviceStrobeMode パラメーターを次のいずれかの値に設定します。
    • Automatic: The strobe duration is controlled by the camera's flash window duration (BslFlashWindowDuration parameter). The BslLightDeviceStrobeDuration parameter becomes read-only and displays the calculated strobe duration.
    • Manual: You can define the strobe duration yourself using the BslLightDeviceStrobeDuration parameter.
  4. If you chose the Manual strobe mode, set the BslLightDeviceStrobeDuration parameter to the desired strobe duration (in microseconds).

情報

  • トリガー Width Exposure Mode またはExposure Autoオートファンクションを使用している場合は、自動ストロボモードを使用しないでください。そうでないと、カメラと照明が予期しない動作を示す可能性があります。
  • Sequencer 機能を使用している場合、自動ストロボモードは利用できません。
  • 自動ストロボモードでは、計算されたストロボ持続時間はフラッシュウィンドウ持続時間よりも短くなる可能性があります。これは、ライトが点灯するまでにかかる時間、つまり点灯遅延を補正するために行われます。
  • カメラがその能力の上限で動作している場合、オーバートリガーが発生する可能性があります。
ace U/Lカメラ#

ace U/L カメラでトリガー信号とストロボ持続時間を設定するには、次のようにします。

  1. If you're using a rolling shutter camera, set the BslLightControlTriggerMode parameter to one of the following values:

    • ExposureActive: All connected lights are turned on when exposure starts. Use this mode only if you're not overlapping image acquisitions.
    • FlashWindow: All connected lights are turned on when the camera's Flash Window signal rises. If you use this mode, make sure that the Flash Window signal is available for your camera model.

    グローバルシャッターカメラでは、露光が開始すると、接続されているすべての照明が常に点灯します。

  2. Set the BslLightDeviceStrobeMode parameter to one of the following values:

    • Automatic: The strobe duration is controlled by the ExposureTime parameter of the camera.
    • Manual: You can define the strobe duration yourself using the BslLightDeviceStrobeDuration parameter.
  3. If you chose the Manual strobe mode, set the BslLightDeviceStrobeDuration parameter to the desired strobe duration.

情報

照明器具のオーバードライブ#

注意 – オーバードライブは照明を損傷する可能性があります。

このセクションの手順をよく読んで、接続されているライトの損傷を回避し、ライトが早期劣化しないようにしてください。

ライトをオーバードライブすると、ライトがストロボモードのときに、電流を増加させて、より高い光輝度を得ることができます。

照明器具をオーバードライブするには、次のようにします。

  1. Basler Standard Light またはサードパーティ製の照明器具を使用している場合:

    1. Calculate the maximum allowed current for your device given the current duty cycle and strobe duration. On Basler ace 2 and boost cameras, you can read the BslLightDeviceDutyCycle parameter to determine the current duty cycle.
    2. Set the BslLightDeviceOverdriveLimit parameter accordingly. For example, if your light can withstand 200 % of its nominal current rating, set the overdrive limit to 200.0.

    If you're using a Basler Camera Light, the overdrive limit is calculated automatically, and the BslLightDeviceOverdriveLimit parameter is not available.

  2. Set the BslLightDeviceBrightness to a value greater than 100.0.

オーバードライブする場合は、ライトの損傷を避けるために次の点を考慮してください。

  • ストロボモードでライトが耐えられる最大電流が不明な場合は、ライトのメーカーに問い合わせてください。
  • 電流が増加すると LED がより加熱するため、個々のストロボパルス間にライトが再び冷却するまでの十分な時間を確保する必要があります。一般的な経験則として、パルスの輝度を高くするほど、パルス間の間隔を長く空ける必要があります。
  • 露光時間が、pulseの長さとデューティサイクルに影響を与える点を考慮してください。

安全機能#

Basler 照明器具には、ハードウェアの損傷を避けるため、次の安全機能が実装されています。

SLP 照明コントローラーの安全機能#

2 A を超える電流と長い露光時間および高いデューティーサイクルの組み合わせにより、コントローラーのハードウェアが損傷する可能性があります。

To avoid this, you can't set the nominal current (BslLightDeviceMaxCurrent parameter) of Basler SLP Light Controllers to more than 2000 mA.

ただし、デバイスをオーバードライブしている場合は、電流が 2 A を超える可能性があります。

この場合、カメラは特定の照明器具設定の最大値を自動的に調整します。次の表を参照してください。

出力電流(公称電流 x 明るさ(%)) 最大ストロボ持続時間 最大デューティサイクル
2A未満 - 100 %
2 A to <3 A 5ms 15 %
3 A to <4 A 5ms 8 %
4 A to <5 A 5ms 6 %
5 A to <6 A 5ms 4 %
6 A to <8 A 1ms 4 %
8 A to <9 A 1ms 3 %
9 A to <10 A 1ms 2 %
Camera Lights の安全機能#

Basler Camera Lights で、選択した明るさがストロボ持続時間およびデューティーサイクルに対して高すぎる場合、ストロボ持続時間が短くなるか、トリガーが無視されます。次の表を参照してください。

必要な明るさ 最大ストロボ持続時間 最大デューティサイクル
0~100% - 100 %
101~200% 30ms 30 %
201~300% 10ms 20 %
301~500% 2ms 10 %
501~1000% 1ms 5 %

GPIO ライン設定#

カメラは、カメラの GPIO ラインの 1 つを介して照明器具と通信します。

  • On ace 2, boost, 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.

情報

For dart M cameras, the Light Control feature is currently only available if you use a Basler dart M interface board (either Interface Board ⁠dart M GigE RJ45 PoE or ⁠Interface Board dart M GigE RJ45 AUX).

  • On ace U/L cameras, the BslLightControlSource parameter shows which GPIO line the camera uses for light communication.

照明器具 ID#

SLP プロトコルを介して接続されたすべての照明器具には、照明器具 ID があります。ID は器具に保存されています。

有効な照明器具 ID は、1、2、3、4、7 です。すべての照明器具は、ID が 7(工場出荷時設定)に設定されて出荷されています。

When enumerating devices using the BslLightControlEnumerateDevices command, the camera automatically searches for a device with its ID set to 7 and assigns the next available ID between 1 and 4 to it.

複数の照明器具を使用する場合は、それらの ID をすべて異なるものにする必要があります。ID が同じ器具を使用すると、通信エラーが発生します。

  • 例 1:新しい 1 つの照明器具を接続し、複数の器具を列挙するとします。カメラはその新しい器具に ID 1 を割り当てます。次に、その器具を取り外し、別の照明器具を接続し、器具を再度列挙します。カメラはこの器具に再び ID 1 を割り当てます。
  • 例 2: 2 つの新しい照明器具を接続し、複数の器具を列挙するとします。カメラは、ID が 7 に設定されている 2 つの器具を検出し、割り当て可能な次の ID である 1 をそれぞれに割り当てます。

どちらの例でも、両方の照明器具をカメラに接続すると、通信エラーが発生します。競合を解決するには、ID の 1 つを変更する必要があります。

ヒント

競合を防ぐ最善の方法は、デバイスを 1 つずつ接続し、デバイスを接続した後は常に新しい一意の ID を割り当てることです。

Light Device IDの変更#

ライトのIDを変更するには、次の手順に従います。

  1. Set the BslLightControlMode parameter to On.
  2. Set the BslLightDeviceOperationMode parameter to Off.
  3. Set the BslLightDeviceSelector parameter to the Basler light device whose ID you want to change.
  4. Set the BslLightDeviceChangeID parameter to the desired ID, e.g., Device1.
    On ace U/L cameras, the ID is changed immediately.
  5. On ace 2 and boost cameras, execute the BslLightDeviceNewIDSave command.

Light Control 機能使用時の考慮事項#

  • When the BslLightControlMode is set to On, the Serial Communication feature is disabled. This is because the Light Control feature also uses serial communication.
  • 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.
  • 非常に短い Flash Window 信号の使用は避けてください。そうしないと、生成された画像内で一部の線が明るすぎ、それ以外の線が暗すぎるということになる可能性があります。
  • When setting the BslLightControlMode parameter to On, there is a delay of up to 1 second until the light device is actually turned on. Because of this, the first image may be too dark. Either discard this image, or, if you need all images, start image acquisition after a suitable delay.
  • Basler Camera Light をオーバードライブするときは、1 秒あたり 60 フレームを超える速度でカメラを動作させないでください。そうでないと、カメラと照明が予期しない動作を示す可能性があります。
  • Basler ace 2 and boost cameras: When loading the light device settings from a user set, the settings are only applied after executing the BslLightControlEnumerateDevices command.

オーバートリガー#

カメラがその能力の上限で動作している場合、照明器具のオーバートリガーが発生する可能性があります。オーバートリガーとは、照明器具がまだ照明をオフに切り替えている途中など、準備ができていない間にトリガーを受信することを意味します。これは、トリガーが無視され、次の露光時に照明が点灯しないことを意味します。

この問題をよりよく理解するには、次の例を検討します。

100 fps が可能なカメラは、露光時間を 50 ms に設定して動作しています。よって、カメラは露出間に一時停止せずに、1 秒あたり 20 フレームをすばやく連続して取得します。これは、照明器具のトリガーが 2 つの露光間の両端に正確に実行される必要があることを意味します。

しかし実際には、これはほとんど不可能です。なぜなら、固有のジッターにより、ライトがオフになりそうなときにトリガーが着信することがあり、そのような場合、トリガーは無視され、生成された画像は暗すぎるものとなるからです。

ジッターは不規則なため、これが起きるのを回避する正確な方法はありません。一部の画像が他の画像より暗いことに気付いた場合は、ライトを連続モードで動作させることを検討してください。また、Acquisition Frame Rate 機能を使用してフレームレートを調整することもできます。

オーバートリガーの監視#

On ace 2, boost, 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.

Example: Assume 4 light devices are connected to your camera. You send a trigger signal while 3 of the devices aren't ready for it. As a result, the BslLightControlOvertriggerCount parameter increases by 1.

パラメーターは最大値として 65 535 までカウントします。到達すると、カウントを停止します。

To reset the overtrigger counter, execute the BslLightControlOvertriggerCountReset command.

エラーのチェックとクリア#

ace 2, boost, and dart M Cameras#

Basler ace 2, boost, and dart M cameras can read the following error data from connected light devices:

  • エラーステータスは、エラーを自分で修正するのに役立ちます。
  • Error Code により、エラーの種類に関する追加情報を取得できます。またこれは、Basler サポートでの評価にも使用します。

エラーを確認してクリアするには、次の手順に従います。

  1. 複数のデバイスが接続されている場合は、次のようにします。
    1. Check the BslLightControlErrorSummary parameter to find out which device is experiencing problems, e.g., Device2.
    2. Set the BslLightDeviceSelector parameter to the device that is experiencing problems.
  2. Get the value of the BslLightDeviceErrorStatus parameter and look up its meaning in the Error Statuses table below.
  3. エラーステータスが「ハードウェアエラー」の場合は、次のようにします。
    1. Execute the BslLightDeviceErrorStatusReadAndClear command.
    2. Get the value of the BslLightDeviceErrorCode parameter and look up its meaning in the Error Codes table below.
    3. 可能であれば、エラーを修正します。
  4. If the error status is not "Hardware Error":
    1. 可能であれば、エラーを修正します。
    2. Execute the BslLightDeviceErrorStatusReadAndClear command to reset the error status to NoError.
エラーステータス#

The BslLightDeviceErrorStatus parameter can take the following values:

意味
Communication Error 照明器具とカメラ間のデータ伝送に障害があると、通信エラーが発生します。これは、使用するケーブルが長すぎる、または回線上のノイズが多すぎるなどの原因で生じる可能性があります。
接続ロスト 以前に接続していた照明器具への接続が失われました。これは、ケーブルが緩んだ場合などに発生する可能性があります。
Hardware Error The light device is experiencing a technical fault. For more information about the kind of hardware error, execute the BslLightDeviceErrorStatusReadAndClear command to retrieve an error code.a
照明器具エラー 照明器具に内部エラーが発生しています。a
No Error エラーは検出されませんでした。
未接続 The light device is not connected to the camera or has not been enumerated yet. Execute the BslLightControlEnumerateDevices command to enumerate the device.
サポートされていない器具のバージョン 照明器具は現在ご利用のカメラと互換性がありません。ファームウェアのアップデートが利用可能かどうかについて、サポートにお問い合わせください
Error Codes#

The BslLightDeviceErrorCode parameter can take the following values:

意味
0x30024 照明コントローラーのライティングコネクターに短絡があります。原因は照明器具の不良の可能性があります。
0x3002A The light controller is unable to supply the requested current. Try lowering the BslLightDeviceCurrent parameter value.
(その他) この Error Code については、Baslerサポートにお問い合わせください。

ace U/Lカメラ#

Basler ace U/L カメラは、接続された照明器具からエラーのリストを読み取ることができます。

最大25個のエラーを保存できます。26番目のエラーが発生すると、最も古いエラーが上書きされます。以後同様です。

エラーのチェックとクリアは、発生したエラーの数に応じた反復的なプロセスです。

エラーを確認してクリアするには、次の手順に従います。

  1. 複数のデバイスが接続されている場合は、次のようにします。
    1. Check the BslLightControlErrorStatus parameter to find out which device is experiencing problems, e.g., Device2.
    2. Set the BslLightDeviceSelector parameter to the device that is experiencing problems.
  2. Get the value of the BslLightDeviceLastError parameter and look up its meaning in the table below.
  3. 対応するエラーを修正します。
  4. To delete the last error from the list of errors, execute the BslLightDeviceClearLastError command.
  5. Continue getting and deleting the last error until the BslLightDeviceLastError parameter shows NoError.
意味
Communication Error 照明器具とカメラ間のデータ伝送に障害があると、通信エラーが発生します。これは、使用するケーブルが長すぎる、または回線上のノイズが多すぎるなどの原因で生じる可能性があります。
Connection Error 接続エラーは、照明器具とカメラ間の接続が切断されている場合、またはすでに通信エラーが発生している場合に発生します。他の原因としては、接続が緩んでいたり、コントローラーが完全に切断されていたりする可能性があります。
Hardware Error 照明器具に技術的な障害が発生しています。a
電流不足 The light controller is unable to supply the requested current. Try lowering the LightDeviceMaxCurrent parameter value.
No Error 最後にエラーメモリがクリアされてから、照明器具はエラーを検出していません。
短絡 照明コントローラーのライティングコネクターに短絡があります。原因は照明器具の不良の可能性があります。

  1. 電源を切断して再接続すると問題が解決する場合があります。確実に電源を入れ直すには、コントローラーを 5 分間電源から切断する必要があります。これは正常な動作です。複数のコントローラーを使用している場合は、他のコントローラーで障害が発生していなくても、それらの電源を入れ直す必要があります。

サンプルコード#

ace 2, boost, dart M Cameras#

// Enable the light control mode
camera.BslLightControlMode.SetValue(BslLightControlMode_On);
//Enumerate the light devices
camera.BslLightControlEnumerateDevices.Execute();
//Select light device 1
camera.BslLightDeviceSelector.SetValue(BslLightDeviceSelector_Device1);
//Set the nominal current of device 1 to 100 mA
camera.BslLightDeviceCurrent.SetValue(100.0);
//Set the brightness to 100 %
camera.BslLightDeviceBrightness.SetValue(100.0);
//Set the operation mode to Strobe
camera.BslLightDeviceOperationMode.SetValue(BslLightDeviceOperationMode_Strobe);
INodeMap& nodemap = camera.GetNodeMap();
// Enable the light control mode
CEnumParameter(nodemap, "BslLightControlMode").SetValue("On");
// Enumerate the light devices
CCommandParameter(nodemap, "BslLightControlEnumerateDevices").Execute();
// Select light device 1
CEnumParameter(nodemap, "BslLightDeviceSelector").SetValue("Device1");
// Set the nominal current of device 1 to 100 mA
CFloatParameter(nodemap, "BslLightDeviceCurrent").SetValue(100.0);
// Set the brightness to 100 %
CFloatParameter(nodemap, "BslLightDeviceBrightness").SetValue(100.0);
// Set the operation mode to Strobe
CEnumParameter(nodemap, "BslLightDeviceOperationMode").SetValue("Strobe");
// Enable the light control mode
camera.Parameters[PLCamera.BslLightControlMode].SetValue(PLCamera.BslLightControlMode.On);
// Enumerate the light devices
camera.Parameters[PLCamera.BslLightControlEnumerateDevices].Execute();
// Select light device 1
camera.Parameters[PLCamera.BslLightDeviceSelector].SetValue(PLCamera.BslLightDeviceSelector.Device1);
// Set the nominal current of device 1 to 100 mA
camera.Parameters[PLCamera.BslLightDeviceCurrent].SetValue(100.0);
// Set the brightness to 100 %
camera.Parameters[PLCamera.BslLightDeviceBrightness].SetValue(100.0);
// Set the operation mode to Strobe
camera.Parameters[PLCamera.BslLightDeviceOperationMode].SetValue(PLCamera.BslLightDeviceOperationMode.Strobe);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = 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 mode
camera.BslLightControlMode.Value = "On"
# Enumerate the light devices
camera.BslLightControlEnumerateDevices.Execute()
# Select light device 1
camera.BslLightDeviceSelector.Value = "Device1"
# Set the nominal current of device 1 to 100 mA
camera.BslLightDeviceCurrent.Value = 100.0
# Set the brightness to 100 %
camera.BslLightDeviceBrightness.Value = 100.0
# Set the operation mode to Strobe
camera.BslLightDeviceOperationMode.Value = "Strobe"

pylon Viewerを使用して、パラメーターを簡単に設定することもできます。

ace U/Lカメラ#

// Enable the light control mode
camera.BslLightControlMode.SetValue(BslLightControlMode_On);
//Enumerate the light devices
camera.BslLightControlEnumerateDevices.Execute();
//Select light device 1
camera.BslLightDeviceSelector.SetValue(BslLightDeviceSelector_Device1);
//Set the nominal current of device 1 to 100 mA
camera.BslLightDeviceMaxCurrent.SetValue(100.0);
//Set the brightness to 100 %
camera.BslLightDeviceBrightness.SetValue(100.0);
//Set the operation mode to Strobe
camera.BslLightDeviceOperationMode.SetValue(BslLightDeviceOperationMode_Strobe);
INodeMap& nodemap = camera.GetNodeMap();
// Enable the light control mode
CEnumParameter(nodemap, "BslLightControlMode").SetValue("On");
// Enumerate the light devices
CCommandParameter(nodemap, "BslLightControlEnumerateDevices").Execute();
// Select light device 1
CEnumParameter(nodemap, "BslLightDeviceSelector").SetValue("Device1");
// Set the nominal current of device 1 to 100 mA
CFloatParameter(nodemap, "BslLightDeviceMaxCurrent").SetValue(100.0);
// Set the brightness to 100 %
CFloatParameter(nodemap, "BslLightDeviceBrightness").SetValue(100.0);
// Set the operation mode to Strobe
CEnumParameter(nodemap, "BslLightDeviceOperationMode").SetValue("Strobe");
// Enable the light control mode
camera.Parameters[PLCamera.BslLightControlMode].SetValue(PLCamera.BslLightControlMode.On);
// Enumerate the light devices
camera.Parameters[PLCamera.BslLightControlEnumerateDevices].Execute();
// Select light device 1
camera.Parameters[PLCamera.BslLightDeviceSelector].SetValue(PLCamera.BslLightDeviceSelector.Device1);
// Set the nominal current of device 1 to 100 mA
camera.Parameters[PLCamera.BslLightDeviceMaxCurrent].SetValue(100.0);
// Set the brightness to 100 %
camera.Parameters[PLCamera.BslLightDeviceBrightness].SetValue(100.0);
// Set the operation mode to Strobe
camera.Parameters[PLCamera.BslLightDeviceOperationMode].SetValue(PLCamera.BslLightDeviceOperationMode.Strobe);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = 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 mode
camera.BslLightControlMode.Value = "On"
# Enumerate the light devices
camera.BslLightControlEnumerateDevices.Execute()
# Select light device 1
camera.BslLightDeviceSelector.Value = "Device1"
# Set the nominal current of device 1 to 100 mA
camera.BslLightDeviceMaxCurrent.Value = 100.0
# Set the brightness to 100 %
camera.BslLightDeviceBrightness.Value = 100.0
# Set the operation mode to Strobe
camera.BslLightDeviceOperationMode.Value = "Strobe"