コンテンツにスキップ

Triggered Image Acquisition (dart E)#

カメラがトリガーされた画像取得用に設定されている場合は、特定の時点で画像撮影をトリガーできます。

最新の画像処理アプリケーションの多くは、トリガーされた画像取得に対応しています。

機能を使用する#

ハードウェアとソフトウェアのトリガー#

お使いのカメラがハードウェアトリガー用に設定されている場合、カメラの入力ラインの1つに適用された電気信号はトリガー信号として機能します。

カメラがソフトウェアトリガー用に設定されている場合、ソフトウェアコマンドまたは信号はトリガー信号として機能します。ソフトウェアコマンドは、pylon API を使用して実行できます。

設定の観点からは、ハードウェアトリガーとソフトウェアトリガーの唯一の違いは Trigger Source です。ハードウェアトリガーの場合、ハードウェア Trigger Sourceを選択する必要があります。ソフトウェアトリガーの場合、ソフトウェア Trigger Source を選択する必要があります。

また、一部の設定手順(トリガー起動モードの選択など)は、ソフトウェアトリガーには適用されません。

トリガー画像取得の設定#

トリガー画像取得を設定するには、以下のようにします。

  1. Set the TriggerMode parameter to On to enable triggered image acquisition.
  2. トリガーを次のように設定します。
    1. Set the TriggerSource parameter to define which signal triggers the trigger.
    2. If applicable, set the TriggerActivation parameter to define which signal transition triggers the trigger.

情報

  • 次の制限要因のいずれか、または両方を超えるレートでカメラをトリガーしないでください。

    • 現在のカメラ設定の最大許容フレームレート。Frame Startトリガー信号を受信する準備ができていないときにカメラに適用すると、信号は無視されます。
    • ホストコンピューターのデータ転送、ストレージ、またはその両方の容量制限。ホストコンピューターが処理できる量を超えて画像を取得しようとすると、フレームがドロップされることがあります。

Trigger Source#

You can set the trigger source using the TriggerSource parameter.

これは、トリガーどのようにトリガーされるかを定義します。

次のTrigger Sourceを使用できます。

ハードウェア Trigger Source#

  • Line1: The trigger selected can be triggered by applying an electrical signal to I/O line 1.
  • PeriodicSignal1: The trigger selected can be triggered using the Periodic Signal feature.

ソフトウェア Trigger Source#

  • Software: The trigger selected can be triggered by executing a TriggerSoftware command via the pylon API.

Trigger Activationモード#

You can set the activation mode using the TriggerActivation parameter.

この設定は、ハードウェアトリガーにのみ適用されます。選択したトリガーをどの信号遷移がアクティブにするかを定義します。たとえば、トリガー信号が立ち下がったときにトリガーがアクティブになるように指定できます。

次のトリガー起動モードを使用できます。

  • LevelHigh: The trigger is active as long as the trigger signal is high.
  • LevelLow: The trigger is active as long as the trigger signal is low.

サンプルコード#

// Enable triggered image acquisition for the Frame Start trigger
camera.TriggerMode.SetValue(TriggerMode_On);
// Set the trigger source to Line 1
camera.TriggerSource.SetValue(TriggerSource_Line1);
// Set the trigger activation mode to level high
camera.TriggerActivation.SetValue(TriggerActivation_LevelHigh);
INodeMap& nodemap = camera.GetNodeMap();
// Enable triggered image acquisition for the Frame Start trigger
CEnumParameter(nodemap, "TriggerMode").SetValue("On");
// Set the trigger source to Line 1
CEnumParameter(nodemap, "TriggerSource").SetValue("Line1");
// Set the trigger activation mode to level high
CEnumParameter(nodemap, "TriggerActivation").SetValue("LevelHigh");
// Enable triggered image acquisition for the Frame Start trigger
camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);
// Set the trigger source to Line 1
camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line1);
// Set the trigger activation mode to level high
camera.Parameters[PLCamera.TriggerActivation].SetValue(PLCamera.TriggerActivation.LevelHigh);
/* 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 triggered image acquisition for the Frame Start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerMode", "On");
CHECK(errRes);
/* Set the trigger source to Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSource", "Line1");
CHECK(errRes);
/* Set the trigger activation mode to level high */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerActivation", "LevelHigh");
CHECK(errRes);
# Enable triggered image acquisition for the Frame Start trigger
camera.TriggerMode.Value = "On"
# Set the trigger source to Line 1
camera.TriggerSource.Value = "Line1"
# Set the trigger activation mode to level high
camera.TriggerActivation.Value = "LevelHigh"

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