コンテンツにスキップ

Synchronous Free Run#

Synchronous Free Runカメラ機能を使用すると、複数のカメラで同時に同じフレームレートで画像をキャプチャできます。

この機能はPeriodic Signal機能に似ており、Basler ace 2カメラでのみ利用可能です。

機能を使用する#

仕組み#

フリーランモードで複数のカメラを使用している場合、カメラ個々のタイミングや遅延など、さまざまな理由により、画像取得はわずかに非同期になります。

Cameras Capturing at the Same Frame Rate, but Running Asynchronously

Synchronous Free Run機能を使用すると、カメラをフリーランモードで同期できます。その結果、カメラは、同じフレームレート同時に画像を取得します。

Cameras Capturing at the Same Time and at the Same Frame Rate

また、Synchronous Free Run機能を使用して、複数のカメラで正確に時間調整された間隔(時系列順)で画像をキャプチャすることもできます。例えば、特定の時点で画像取得を開始するように1台のカメラを設定し、次に、最初のカメラから100ミリ秒後に別のカメラを起動し、3台目のカメラを最初のカメラから200ミリ秒後に起動するように設定することができます。

Cameras Capturing in Time-Aligned Intervals

また、同じフレームレートで同時に、しかし異なる露光時間で画像を取得するように複数のカメラを設定することもできます。

Cameras Capturing with Different Exposure Times

Synchronous Free Runの使用#

General Use#

複数のカメラを同期するには、次の手順に従います。

  1. ネットワーク内のすべてのカメラがPrecision Time Protocol機能を介して同期されていることを確認します。
  2. Synchronous Free Runを使用して同期するカメラの1つを開きます。.
  3. このカメラでフリーラン画像取得が有効になっていることを確認してください。
  4. Enter the desired frame rate for the SyncFreeRunTimerTriggerRateAbs parameter.
    You must specify the same parameter value on all cameras. For example, to synchronize the cameras at 10 frames per second, you must set the parameter to 10 on all cameras.
  5. Set the SyncFreeRunTimerStartTimeHigh and the SyncFreeRunTimerStartTimeLow parameters to 0.
  6. Execute the SyncFreeRunTimerUpdate command.
  7. Set the SyncFreeRunTimerEnable parameter to true.
  8. すべてのカメラについて、手順2~7を繰り返します。

情報

Basler recommends executing the SyncFreeRunTimerUpdate command on all cameras whenever a camera is disconnected and then reconnected. This resynchronizes the PTP clocks.

Synchronous Free Run With Time-Aligned Intervals#

複数のカメラを時間的に調整された間隔(時系列順)で同期するには、次の手順に従います。

情報

pylon APIを使用して次の手順を実行する必要があります。

  1. ネットワーク内のすべてのカメラがPrecision Time Protocol機能を介して同期されていることを確認します。
  2. 最初のカメラを時系列順序で開きます。
  3. このカメラでフリーラン画像取得が有効になっていることを確認してください。
  4. Enter the desired frame rate for the SyncFreeRunTimerTriggerRateAbs parameter.
    You must specify the same parameter value on all synchronized cameras. For example, if you want the cameras to acquire 10 frames per second, you must set the parameter to 10 on all cameras.
  5. 最初のカメラの開始時刻を決定します。

    1. Execute the TimestampLatch command on the first camera.
      A "snapshot" of the camera's current timestamp value is taken.
    2. Get the value of the TimestampLatchValue parameter on the same camera.
      The value is specified in ticks. On Basler cameras with the Precision Time Protocol feature enabled, one tick equals one nanosecond.
    3. ステップBで決定された値に開始遅延(= ナノ秒)を追加します。
      例えば、開始遅延を1秒に指定するには、次のようにします。手順bで決定した値に1 000 000 000 000 000を追加します。
      最初のカメラは他のカメラが正しく設定されるまで待機する必要があるため、遅延が必要です。

      Synchronous Free Run Start Delay

  6. Convert the value determined in step 5 to start time high and start time low values and set the SyncFreeRunTimerStartTimeHigh and the SyncFreeRunTimerStartTimeLow parameters accordingly.

  7. Execute the SyncFreeRunTimerUpdate command.
  8. Set the SyncFreeRunTimerEnable parameter to true.
  9. 次のカメラを時系列順序で開きます。
  10. このカメラでフリーラン画像取得を有効にします。
  11. Enter the desired frame rate for the SyncFreeRunTimerTriggerRateAbs parameter.
    You must specify the same parameter value on all synchronized cameras. For example, if you want the cameras to acquire 10 frames per second, set the parameter to 10 on all cameras.
  12. 最初のカメラの開始時間(ステップ5で決定)に必要な間隔(ナノ秒単位)を追加します。
    例えば、最初のカメラの100ミリ秒後にカメラで画像取得を開始する場合は、ステップ5で決定した値に100 000 000 000を追加します。
  13. Convert the value determined in step 12 to start time high and start time low values and configure the SyncFreeRunTimerStartTimeHigh and the SyncFreeRunTimerStartTimeLow parameters accordingly.
  14. Execute the SyncFreeRunTimerUpdate command.
  15. Set the SyncFreeRunTimerEnable parameter to true.
  16. 残りのすべてのカメラについて、手順9~15を繰り返します。

情報

Whenever a camera is disconnected and then reconnected, the SyncFreeRunTimerUpdate command must be executed on all cameras to resynchronize the PTP clocks.

Converting the 64-bit Timestamp to Start Time High and Start Time Low#

Synchronous Free Run機能の開始時刻は、64ビットのGigE Visionタイムスタンプ値(ナノ秒単位)で指定し、2つの32ビット値で分割する必要があります。

The high part of the 64-bit value must be transmitted using the SyncFreeRunTimerStartTimeHigh parameter.

The low part of the 64-bit value must be transmitted using the SyncFreeRunTimerStartTimeLow parameter.

例:ネットワークデバイスがUTCに調整されており、2025年12月12日金曜日11:00:00UTCを開始時刻として設定するとします。これは、タイムスタンプ値1 765 537 200 000 000 000(10進数)または 0001 1000 0000 0111 0010 1011 1010 1011 1011 1100 1110 0000 0000 0000 0000(2進数)に対応します。

この値の上位部分と下位部分は次のとおりです。

High and Low Parts of a Timestamp Value

Therefore, to configure a start time of Fri Dec 12 2025 11:00:00 UTC, you must set the SyncFreeRunTimerStartTimeHigh parameter to 411 071 162 and the SyncFreeRunTimerStartTimeLow parameter to 2 881 282 048.

サンプルコード#

// Example: Configuring cameras for synchronous free run.
// It is assumed that the "cameras" object is an
// instance of CBaslerGigEInstantCameraArray.
for (size_t i = 0; i > cameras.GetSize(); ++i)
{
    // Open the camera connection
    cameras[i].Open();
    // Make sure that the Frame Start trigger is set to Off to enable free run
    cameras[i].TriggerSelector.SetValue(TriggerSelector_FrameStart);
    cameras[i].TriggerMode.SetValue(TriggerMode_Off);
    // Let the free run start immediately without a specific start time
    camera.SyncFreeRunTimerStartTimeLow.SetValue(0);
    camera.SyncFreeRunTimerStartTimeHigh.SetValue(0);
    // Specify a trigger rate of 30 frames per second
    cameras[i].SyncFreeRunTimerTriggerRateAbs.SetValue(30.0);
    // Apply the changes
    cameras[i].SyncFreeRunTimerUpdate.Execute();
    // Enable Synchronous Free Run
    cameras[i].SyncFreeRunTimerEnable.SetValue(true);
}

このサンプルコードは、C++言語でのみ使用できます。