コンテンツにスキップ

Sequencer(ace Classic/U/L GigE)#

Sequencerカメラ機能を使用すると、一連のパラメーター設定を定義し、連続した画像取得に適用できます。

シーケンスセットと呼ばれる最大64セットのパラメーター設定を定義できます。カメラが画像を取得すると、シーケンスセットが1つずつ順番に適用されます。これにより、最大フレームレートを損なうことなく、カメラのパラメーターを迅速に変更できます。

例えば、Sequencer機能を使用して、設定済みの画像ROIまたは露光時間をすばやく変更できます。

機能を使用する#

Enabling or Disabling the Sequencer#

有効にすると、シーケンサーが画像取得を制御します。この状態では設定できません。

無効にすると、シーケンサーを設定できますが、画像取得は制御されません。

シーケンサーを有効にするには、次の手順に従います。

  1. Set all auto functions (e.g., Gain Auto, Exposure Auto) to Off.
  2. Set the SequenceEnable parameter to true.

シーケンサーを無効にするには:

  1. Set the SequenceEnable parameter to false.
  2. If the SequenceConfigurationMode parameter is available on your camera model, set it to On.

What's in a Sequence Set?#

Sequencerセットには、次のパラメーターが含まれます(使用可能な場合)。

  • AcquisitionFrameRate
  • AcquisitionFrameRateEnable
  • BalanceRatio
  • BinningHorizontal
  • BinningVertical
  • BlackLevel
  • CenterX
  • CenterY
  • ChunkEnable
  • ChunkModeActive
  • ColorAdjustmentEnable
  • ColorAdjustmentHue
  • ColorAdjustmentSaturation
  • ColorTransformationMatrixFactor
  • ColorTransformationValue
  • DecimationVertical
  • DigitalShift
  • ExposureTime
  • Gain
  • Height
  • LUTEnable
  • OffsetX
  • OffsetX
  • PixelFormata
  • ProcessedRawEnable
  • ReverseX
  • ReverseYb
  • ScalingHorizontal
  • SequenceSetExecutionsc
  • StackedZoneImagingEnable
  • StackedZoneImagingZoneEnable
  • StackedZoneImagingZoneHeight
  • StackedZoneImagingZoneOffsetY
  • SubsamplingHorizontal
  • SyncUserOutput
  • TestImageSelector
  • TimerDelayd
  • TimerDelayTimebased
  • TimerDurationd
  • TimerDurationTimebased
  • Width

  1. カメラモデルacA640-300gm/gc、acA800-200gm/gc、acA1300-75gm/gc、acA1920-48gm/gc、acA2500-20gm/gcでのみ使用できます。

  2. 次のカメラモデルでは使用できません:acA3088-16gm/gc、acA4024-8gm/gc、acA5472-5gm/gc。

  3. 自動シーケンスアドバンスモードが有効な場合にのみ含まれます。

  4. Timer1で使用できます。

他のすべてのカメラパラメーターは、Sequencer機能を使用して制御できません

情報

シーケンスセットをロードまたは保存すると、変更していないパラメーターも含め、常に上記のすべてのパラメーターがロードまたは保存されます。例えば、露光時間を変更し、他のすべてのパラメーターをデフォルト値のままにした場合、他のすべてのパラメーターの値も保存され、ロード時に上書きされます

Configuring Sequence Sets#

情報

  • シーケンスセットを設定するには、シーケンサーを無効にする必要があります。
  • カメラの電源を切ると、シーケンスセットに加えられたすべての変更が失われます。また、シーケンサーの設定をユーザーセットに保存することもできません。設定を保持するために、Baslerでは、pylon APIを使用して適切なプログラムコードを記述し、カメラの電源がオンになるたびにシーケンスセットを再取得することをお勧めします。

Sequencer機能を使用する前に、シーケンスセットに必要な設定を入力する必要があります。各シーケンスセットには、0~63の範囲の一意のシーケンスセットインデックス番号が付いています。

シーケンスセットを設定するには、次の手順に従います。

  1. Set the SequenceSetTotalNumber parameter to the total number of sequence sets you want to use.
  2. 格納するシーケンスセットパラメーターをシーケンスセット0に設定します。
  3. シーケンスセット0を保存します。
  4. 使用するすべてのシーケンスセットについて、手順2と3を繰り返します。インデックス番号0から始まる連続した一連のインデックス番号を必ず使用するようにしてください。例えば、シーケンスセット0、1、2、3を使用します。

例:2つのシーケンスセットが必要で、それらに異なる画像ROI設定を入力するとします。これを行うには、次の手順に従います。

  1. Set the SequenceSetTotalNumber parameter to 2.
  2. Create the first image ROI by adjusting the Width, Height, OffsetX, and OffsetY parameter values.
  3. シーケンスセット0を保存します。
  4. Create the second image ROI by choosing different values for the Width, Height, OffsetX, and OffsetY parameters.
  5. シーケンスセット1を保存します。

これでシーケンサーを設定して、2つの画像ROIをすばやく切り替えられるようになりました。

Saving a Sequence Set#

シーケンスセットを保存するには、次の手順に従います。

  1. Set the SequenceSetIndex parameter to the desired sequence set.
  2. Execute the SequenceSetStore command.

すべてのシーケンスセットパラメーターの値は、選択したシーケンスセットに保存されます。

Loading a Sequence Set#

シーケンスセットは、シーケンサーの操作中に自動的にロードされます。ただし、シーケンスセットを手動でロードすると、テストやシーケンサーの設定時に役立ちます。

シーケンスセットを手動でロードするには、次の手順に従います。

  1. Set the SequenceSetIndex parameter to the desired sequence set.
  2. Execute the SequenceSetLoad command.

すべてのシーケンスセットパラメーターの値が上書きされ、選択したシーケンスセットに保存されている値に置き換えられます。

Configuring the Sequencer#

シーケンスセットを設定したら、シーケンサーを設定する必要があります。

情報

  • シーケンサーを設定するには、シーケンサーを無効にする必要があります。
  • カメラの電源を切ると、シーケンサーの設定に加えられたすべての変更が失われます。また、シーケンサーの設定をユーザーセットに保存することもできません。Baslerでは、pylon APIを使用して適切なプログラムコードを記述し、カメラの電源をオンにするたびに再取得することをお勧めします。
  • SequenceSetIndexチャンクを使用して、使用されているシーケンスセットを追跡できます。有効にすると、各画像には、画像取得に使用されるシーケンスセットのインデックス番号を含むチャンクデータが含まれます。

シーケンサーは、「アドバンスモード」と呼ばれる3つのモードで操作できます。

すべてのモードで、シーケンスセットは常にシーケンスセットインデックス番号0から昇順に進みます。

Auto Sequence Advance Mode#

このモードは、連続的に繰り返される固定シーケンスを設定する場合に便利です。

You can enable this mode by setting the SequenceAdvanceMode parameter to Auto.

このモードでは、Frame Startトリガー信号を受信すると、シーケンスセットから次のシーケンスへの進行が自動的に行われます。

The SequenceSetTotalNumber parameter specifies the total number of sequence sets to be used. After the sequence set with the highest index number has been used, the cycle starts again at 0.

例:次のシーケンスサイクルを設定するとします。

Sample Sequence Cycle: 0-1-2-3-4-0-1-...

上記のシーケンスサイクルを設定するには、次の手順に従います。

  1. Set the SequenceAdvanceMode parameter to Auto.
  2. Set the SequenceSetTotalNumber parameter to 5.

シーケンスセットを複数回使用する

必要に応じて、各シーケンスセットを複数回連続して使用できます。

各シーケンスセットを使用する回数を指定するには、次の手順に従います。

  1. 目的のシーケンスセットをロードします。
  2. Configure the SequenceSetExecutions parameter for this sequence set. By default, the parameter is set to 1 for all sets which means that each sequence set is used once per cycle.
  3. シーケンスセットを保存します。

例:次のシーケンスサイクルを設定するとします。

Sample Sequence Cycle: 0-1-1-1-2-3-4-5-5-0-1-...

上記のシーケンスサイクルを設定するには、次の手順に従います。

  1. Set the SequenceAdvanceMode parameter to Auto.
  2. Set the SequenceSetTotalNumber parameter to 6.
  3. Configure the SequenceSetExecutions parameter for each sequence set:

    • Sequence sets 0, 2, 3, and 4 are to be used only once per cycle. Therefore, you can skip these sets and leave the SequenceSetExecutions parameter at the default value of 1.
    • Sequence set 1 is to be used three times in a row. Load sequence set 1, set the SequenceSetExecutions parameter to 3, and save sequence set 1.
    • Sequence set 5 is to be used two times in a row. Load sequence set 5, set the SequenceSetExecutions parameter to 2, and save sequence set 5.

Controlled Sequence Advance Mode#

このモードは、ライン1またはソフトウェアコマンドで制御できるダイナミックシーケンスを設定する場合に便利です。

情報

  • リアルタイムアプリケーションの場合、Baslerは、ソフトウェアコマンドを使用してシーケンサーを制御しないことを強く推奨します。ソフトウェアコマンドを送信してから有効になるまでの遅延は、特定のインストールとネットワーク上の現在の負荷によって異なります。そのため、ソフトウェアコマンドの送信から有効になるまでの間に発生する画像取得の数を予測することはできません。
  • ライン1を使用してシーケンサーを制御する場合は、ラインのステータスの設定とフレーム開始トリガー信号の上昇の間に1マイクロ秒かかることに注意してください。また、Frame Startトリガー信号が上昇した後、少なくとも1マイクロ秒はラインのステータスを維持する必要があります。Frame Trigger Wait 信号を監視して、タイミングを最適化します。

You can enable this mode by setting the SequenceAdvanceMode parameter to Controlled.

他のモードと同様に、アドバンスは常にシーケンスセットインデックス番号0から昇順に進みます。

ただし、次の項目は制御できます。

  • シーケンスセットアドバンス:シーケンサーを次のシーケンスセットに進めるタイミングは?
  • シーケンスセットの再起動:シーケンスサイクルをシーケンスセット0からいつ再開?

The SequenceSetTotalNumber parameter specifies the total number of sequence sets you want to use. After the sequence set with the highest index number has been used, the cycle starts again at 0.

Configuring Sequence Set Advance#

シーケンスセットアドバンスを設定するには、次の手順に従います。

  1. Set the SequenceControlSelector parameter to Advance.
  2. パラメーターを SequenceControlSource パラメーターを次のいずれかのオプションに設定します。
    • Line1: Sequence set advance will be controlled via line 1. If line 1 is low (0) while a frame start trigger signal is received, the sequencer does not advance and the current sequence set is used again for image acquisition. If line 1 is high (1) while a Frame Start trigger signal is received, the sequencer advances and the next sequence set in the cycle is used for image acquisition.
    • Disabled: Sequence set advance will be controlled using the SequenceAsyncAdvance software command. When this command is received, the sequencer advances without acquiring an image. When the next Frame Start trigger signal is received, the sequence set indicated by the SequenceCurrentSet parameter value is used for image acquisition.
    • AlwaysActive: The sequencer behaves as if Line1 was selected and line 1 was always high (1). As a result, the sequencer advances every time a frame start trigger signal is received. This way of operating the sequencer is similar to operating it in auto sequence advance mode when each sequence set is used only once per cycle. The only difference is that sequence set 1 is used as the first sequence set instead of sequence set 0.
Configuring Sequence Set Restart#

シーケンスセットの再起動を設定するには、次の手順に従います。

  1. Set the SequenceControlSelector parameter to Restart.
  2. パラメーターを SequenceControlSource パラメーターを次のいずれかのオプションに設定します。
    • Line1: Sequence set restart will be controlled via line 1. If line 1 is low (0) while a frame start trigger signal is received, the next sequence set is used. If line 1 is high (1) while a Frame Start trigger signal is received, the sequence cycle is restarted and sequence set 0 is used.
    • Disabled: Sequence set restart will be controlled using the SequenceAsyncRestart software command. When this command is received, the sequence cycle is restarted without acquiring an image. When the next Frame Start trigger signal is received, sequence set 0 is used.

Free Selection Advance Mode#

このモードは、特定の順序に従わないで、自由に選択可能なシーケンスセットをすばやく切り替える場合に便利です。カメラの入力ラインを使用して、シーケンスを決定します。

情報

ラインのステータスの設定とFrame Startトリガー信号の上昇の間には1マイクロ秒かかることに注意してください。また、Frame Startトリガー信号が上昇した後、少なくとも1マイクロ秒はラインのステータスを維持する必要があります。Frame Trigger Wait信号を監視して、タイミングを最適化します。

自由選択アドバンスモードの設定方法は、カメラで使用できる入力ラインの数によって異なります。

Cameras with One Input Line#

シーケンスセットは、入力ライン1のステータスに従って選択されます。

  • フレーム開始トリガー信号を受信しているときにライン1が低(0)の場合は、シーケンスセット0が画像取得に使用されます。
  • Frame Startトリガー信号を受信しているときにライン1が高(1)の場合は、シーケンスセット1が画像取得に使用されます。

シーケンスセット0と1のみ使用できます。

自由選択アドバンスモードを有効にするには、次の手順に従います。

  1. Set the SequenceAdvanceMode parameter to FreeSelection.
  2. Set the SequenceSetTotalNumber parameter to 2.

The SequenceAddressBitSelector and SequenceAddressBitSource parameters also control the operation of the free selection advance mode. However, these parameters are preset and can't be changed.

Cameras with Two Input Lines#

シーケンスセットは、ライン1(光結合入力ライン)とライン3(GPIOライン、入力として設定する必要があります)のステータスに応じて選択され、4つの可能な組み合わせができます。これにより、4つのシーケンスセットから選択できます。したがって、シーケンスセット0、1、2、3のみが使用可能です。

自由選択アドバンスモードを設定するには、各行に「シーケンスセットアドレスビット」を割り当てる必要があります。これらのアドレスビットの組み合わせによって、シーケンスセットインデックス番号が決まります。次の表に、考えられる組み合わせとそれぞれの結果を示します。

Address Bit 1 Address Bit 0 選択されるシーケンスセット
0 0 Sequence set 0
0 1 Sequence set 1
1 0 Sequence set 2
1 1 Sequence set 3

例えば、ライン1をビット1に、ライン3をビット0に割り当てることができます。これにより、次の設定例が得られます。

  • フレーム開始トリガー信号を受信しているときに、ライン1低(0)でライン3が低(0)の場合、シーケンスセット0が画像取得に使用されます。
  • フレーム開始トリガー信号を受信しているときに、ライン1が低(0)でライン3が高(1)の場合、シーケンスセット1が画像取得に使用されます。
  • フレーム開始トリガー信号を受信しているときに、ライン1が高(1)でライン3が低(0)の場合、シーケンスセット2が画像取得に使用されます。
  • フレーム開始トリガー信号を受信しているときに、ライン1が高(1)でライン3が高(1)の場合、シーケンスセット3が画像取得に使用されます。

ビットを設定し、自由選択アドバンスモードを有効にするには、次の手順に従います。

  1. Set the SequenceAdvanceMode parameter to FreeSelection.
  2. Set the SequenceSetTotalNumber parameter to 4.
  3. Set the SequenceAddressBitSelector parameter to Bit0.
  4. Set the SequenceAddressBitSource parameter to the line that you want to assign to bit 0, e.g., Line3.
  5. Set the SequenceAddressBitSelector parameter to Bit1.
  6. Set the SequenceAddressBitSource parameter to the line that you want to assign to bit 1, e.g., Line1.

情報

You can also use only one input line in free selection advance mode. To do so, set the SequenceSetTotalNumber parameter to 2. Now, only bit 0 is used to choose a sequence set. The free selection advance mode will behave as described under "Cameras with One Input Line".

Timing Diagrams#

Example: Auto Sequence Advance Mode#

Auto Sequence Advance Mode Timing Diagram (Example)

Example: Controlled Sequence Advance Mode (Controlled via Line 1)#

Controlled Sequence Advance Mode Timing Diagram (Example)

Example: Free Selection Advance Mode#

Free Selection Advance Mode Timing Diagram (Example)

サンプルコード#

// ** Configuring sequence sets **
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
// Enable configuration mode (available on selected cameras only)
camera.SequenceConfigurationMode.SetValue(SequenceConfigurationMode_On);
// Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.SetValue(2);
// Configure the parameters that you want to store in the first sequence set
camera.Width.SetValue(500);
camera.Height.SetValue(300);
// Select sequence set 0 and save the parameter values
camera.SequenceSetIndex.SetValue(0);
camera.SequenceSetStore.Execute();
// Configure the parameters that you want to store in the second sequence set
camera.Width.SetValue(800);
camera.Height.SetValue(600);
// Select sequence set 1 and save the parameter values
camera.SequenceSetIndex.SetValue(1);
camera.SequenceSetStore.Execute();
// ** Configuring the sequencer for auto sequence advance mode
// Assuming you want to configure the following sequence cycle:
// 0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...) **
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_Auto);
// Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.SetValue(2);
// Load sequence set 0 and specify that this set is to be used
// 2 times in a row
camera.SequenceSetIndex.SetValue(0);
camera.SequenceSetLoad.Execute();
camera.SequenceSetExecutions.SetValue(2);
camera.SequenceSetStore.Execute();
// Load sequence set 1 and specify that this set is to be used
// 3 times in a row
camera.SequenceSetIndex.SetValue(1);
camera.SequenceSetLoad.Execute();
camera.SequenceSetExecutions.SetValue(3);
camera.SequenceSetStore.Execute();
// Enable the sequencer
camera.SequenceEnable.SetValue(true);
// ** Configuring the sequencer for controlled sequence advance mode **
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_Controlled);
// Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.SetValue(2);
// Specify that sequence set advance is controlled via line 1
camera.SequenceControlSelector.SetValue(SequenceControlSelector_Advance);
camera.SequenceControlSource.SetValue(SequenceControlSource_Line1);
// Specify that sequence set restart is controlled
// via software command
camera.SequenceControlSelector.SetValue(SequenceControlSelector_Restart);
camera.SequenceControlSource.SetValue(SequenceControlSource_Disabled);
// Enable the sequencer
camera.SequenceEnable.SetValue(true);
// Restart the sequencer via software command (for testing purposes)
camera.SequenceAsyncRestart.Execute();
// ** Configuring the sequencer for free selection advance mode
// on cameras with ONE input line **
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_FreeSelection);
// Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.SetValue(2);
// Enable the sequencer
camera.SequenceEnable.SetValue(true);
// ** Configuring the sequencer for free selection advance mode
// on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input) **
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_FreeSelection);
// Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.SetValue(4);
// Assign sequence address bit 0 to line 3
camera.SequenceAddressBitSelector.SetValue(SequenceAddressBitSelector_Bit0);
camera.SequenceAddressBitSource.SetValue(SequenceAddressBitSource_Line3);
// Assign sequence address bit 1 to line 1
camera.SequenceAddressBitSelector.SetValue(SequenceAddressBitSelector_Bit1);
camera.SequenceAddressBitSource.SetValue(SequenceAddressBitSource_Line1);
// Enable the sequencer
camera.SequenceEnable.SetValue(true);
INodeMap& nodemap = camera.GetNodeMap();
// ** Configuring sequence sets **
// Disable the sequencer during configuration
CBooleanParameter(nodemap, "SequenceEnable").SetValue(false);
// Enable configuration mode (available on selected cameras only)
CEnumParameter(nodemap, "SequenceConfigurationMode").SetValue("On");
// Set the total number of sequence sets to 2
CIntegerParameter(nodemap, "SequenceSetTotalNumber").SetValue(2);
// Configure the parameters that you want to store in the first sequence set
CIntegerParameter(nodemap, "Width").SetValue(500);
CIntegerParameter(nodemap, "Height").SetValue(300);
// Select sequence set 0 and save the parameter values
CIntegerParameter(nodemap, "SequenceSetIndex").SetValue(0);
CCommandParameter(nodemap, "SequenceSetStore").Execute();
// Configure the parameters that you want to store in the second sequence set
CIntegerParameter(nodemap, "Width").SetValue(800);
CIntegerParameter(nodemap, "Height").SetValue(600);
// Select sequence set 1 and save the parameter values
CIntegerParameter(nodemap, "SequenceSetIndex").SetValue(1);
CCommandParameter(nodemap, "SequenceSetStore").Execute();
// ** Configuring the sequencer for auto sequence advance mode
// Assuming you want to configure the following sequence cycle:
// 0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...) **
// Disable the sequencer during configuration
CBooleanParameter(nodemap, "SequenceEnable").SetValue(false);
CEnumParameter(nodemap, "SequenceAdvanceMode").SetValue("Auto");
// Set the total number of sequence sets to 2
CIntegerParameter(nodemap, "SequenceSetTotalNumber").SetValue(2);
// Load sequence set 0 and specify that this set is to be used
// 2 times in a row
CIntegerParameter(nodemap, "SequenceSetIndex").SetValue(0);
CCommandParameter(nodemap, "SequenceSetLoad").Execute();
CIntegerParameter(nodemap, "SequenceSetExecutions").SetValue(2);
CCommandParameter(nodemap, "SequenceSetStore").Execute();
// Load sequence set 1 and specify that this set is to be used
// 3 times in a row
CIntegerParameter(nodemap, "SequenceSetIndex").SetValue(1);
CCommandParameter(nodemap, "SequenceSetLoad").Execute();
CIntegerParameter(nodemap, "SequenceSetExecutions").SetValue(3);
CCommandParameter(nodemap, "SequenceSetStore").Execute();
// Enable the sequencer
CBooleanParameter(nodemap, "SequenceEnable").SetValue(true);
// ** Configuring the sequencer for controlled sequence advance mode **
// Disable the sequencer during configuration
CBooleanParameter(nodemap, "SequenceEnable").SetValue(false);
CEnumParameter(nodemap, "SequenceAdvanceMode").SetValue("Controlled");
// Set the total number of sequence sets to 2
CIntegerParameter(nodemap, "SequenceSetTotalNumber").SetValue(2);
// Specify that sequence set advance is controlled via line 1
CEnumParameter(nodemap, "SequenceControlSelector").SetValue("Advance");
CEnumParameter(nodemap, "SequenceControlSource").SetValue("Line1");
// Specify that sequence set restart is controlled
// via software command
CEnumParameter(nodemap, "SequenceControlSelector").SetValue("Restart");
CEnumParameter(nodemap, "SequenceControlSource").SetValue("Disabled");
// Enable the sequencer
CBooleanParameter(nodemap, "SequenceEnable").SetValue(true);
// Restart the sequencer via software command (for testing purposes)
CCommandParameter(nodemap, "SequenceAsyncRestart").Execute();
// ** Configuring the sequencer for free selection advance mode
// on cameras with ONE input line **
// Disable the sequencer during configuration
CBooleanParameter(nodemap, "SequenceEnable").SetValue(false);
CEnumParameter(nodemap, "SequenceAdvanceMode").SetValue("FreeSelection");
// Set the total number of sequence sets to 2
CIntegerParameter(nodemap, "SequenceSetTotalNumber").SetValue(2);
// Enable the sequencer
CBooleanParameter(nodemap, "SequenceEnable").SetValue(true);
// ** Configuring the sequencer for free selection advance mode
// on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input) **
// Disable the sequencer during configuration
CBooleanParameter(nodemap, "SequenceEnable").SetValue(false);
CEnumParameter(nodemap, "SequenceAdvanceMode").SetValue("FreeSelection");
// Set the total number of sequence sets to 2
CIntegerParameter(nodemap, "SequenceSetTotalNumber").SetValue(4);
// Assign sequence address bit 0 to line 3
CEnumParameter(nodemap, "SequenceAddressBitSelector").SetValue("Bit0");
CEnumParameter(nodemap, "SequenceAddressBitSource").SetValue("Line3");
// Assign sequence address bit 1 to line 1
CEnumParameter(nodemap, "SequenceAddressBitSelector").SetValue("Bit1");
CEnumParameter(nodemap, "SequenceAddressBitSource").SetValue("Line1");
// Enable the sequencer
CBooleanParameter(nodemap, "SequenceEnable").SetValue(true);
// ** Configuring sequence sets **
// Disable the sequencer during configuration
camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
// Enable configuration mode (available on selected cameras only)
camera.Parameters[PLCamera.SequenceConfigurationMode].SetValue(PLCamera.SequenceConfigurationMode.On);
// Set the total number of sequence sets to 2
camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);
// Configure the parameters that you want to store in the first sequence set
camera.Parameters[PLCamera.Width].SetValue(500);
camera.Parameters[PLCamera.Height].SetValue(300);
// Select sequence set 0 and save the parameter values
camera.Parameters[PLCamera.SequenceSetIndex].SetValue(0);
camera.Parameters[PLCamera.SequenceSetStore].Execute();
// Configure the parameters that you want to store in the second sequence set
camera.Parameters[PLCamera.Width].SetValue(800);
camera.Parameters[PLCamera.Height].SetValue(600);
// Select sequence set 1 and save the parameter values
camera.Parameters[PLCamera.SequenceSetIndex].SetValue(1);
camera.Parameters[PLCamera.SequenceSetStore].Execute();
// ** Configuring the sequencer for auto sequence advance mode
// Assuming you want to configure the following sequence cycle:
// 0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...) **
// Disable the sequencer during configuration
camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.Auto);
// Set the total number of sequence sets to 2
camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);
// Load sequence set 0 and specify that this set is to be used
// 2 times in a row
camera.Parameters[PLCamera.SequenceSetIndex].SetValue(0);
camera.Parameters[PLCamera.SequenceSetLoad].Execute();
camera.Parameters[PLCamera.SequenceSetExecutions].SetValue(2);
camera.Parameters[PLCamera.SequenceSetStore].Execute();
// Load sequence set 1 and specify that this set is to be used
// 3 times in a row
camera.Parameters[PLCamera.SequenceSetIndex].SetValue(1);
camera.Parameters[PLCamera.SequenceSetLoad].Execute();
camera.Parameters[PLCamera.SequenceSetExecutions].SetValue(3);
camera.Parameters[PLCamera.SequenceSetStore].Execute();
// Enable the sequencer
camera.Parameters[PLCamera.SequenceEnable].SetValue(true);
// ** Configuring the sequencer for controlled sequence advance mode **
// Disable the sequencer during configuration
camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.Controlled);
// Set the total number of sequence sets to 2
camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);
// Specify that sequence set advance is controlled via line 1
camera.Parameters[PLCamera.SequenceControlSelector].SetValue(PLCamera.SequenceControlSelector.Advance);
camera.Parameters[PLCamera.SequenceControlSource].SetValue(PLCamera.SequenceControlSource.Line1);
// Specify that sequence set restart is controlled
// via software command
camera.Parameters[PLCamera.SequenceControlSelector].SetValue(PLCamera.SequenceControlSelector.Restart);
camera.Parameters[PLCamera.SequenceControlSource].SetValue(PLCamera.SequenceControlSource.Disabled);
// Enable the sequencer
camera.Parameters[PLCamera.SequenceEnable].SetValue(true);
// Restart the sequencer via software command (for testing purposes)
camera.Parameters[PLCamera.SequenceAsyncRestart].Execute();
// ** Configuring the sequencer for free selection advance mode
// on cameras with ONE input line **
// Disable the sequencer during configuration
camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.FreeSelection);
// Set the total number of sequence sets to 2
camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);
// Enable the sequencer
camera.Parameters[PLCamera.SequenceEnable].SetValue(true);
// ** Configuring the sequencer for free selection advance mode
// on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input) **
// Disable the sequencer during configuration
camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.FreeSelection);
// Set the total number of sequence sets to 2
camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(4);
// Assign sequence address bit 0 to line 3
camera.Parameters[PLCamera.SequenceAddressBitSelector].SetValue(PLCamera.SequenceAddressBitSelector.Bit0);
camera.Parameters[PLCamera.SequenceAddressBitSource].SetValue(PLCamera.SequenceAddressBitSource.Line3);
// Assign sequence address bit 1 to line 1
camera.Parameters[PLCamera.SequenceAddressBitSelector].SetValue(PLCamera.SequenceAddressBitSelector.Bit1);
camera.Parameters[PLCamera.SequenceAddressBitSource].SetValue(PLCamera.SequenceAddressBitSource.Line1);
// Enable the sequencer
camera.Parameters[PLCamera.SequenceEnable].SetValue(true);
/* 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 */
/* ** Configuring sequence sets ** */
/* Disable the sequencer during configuration */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
CHECK(errRes);
/* Enable configuration mode (available on selected cameras only) */
errRes = PylonDeviceFeatureFromString(hdev, "SequenceConfigurationMode", "On");
CHECK(errRes);
/* Set the total number of sequence sets to 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
CHECK(errRes);
/* Configure the parameters that you want to store in the first sequence set */
errRes = PylonDeviceSetIntegerFeature(hdev, "Width", 500);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "Height", 300);
CHECK(errRes);
/* Select sequence set 0 and save the parameter values */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetIndex", 0);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetStore");
CHECK(errRes);
/* Configure the parameters that you want to store in the second sequence set */
errRes = PylonDeviceSetIntegerFeature(hdev, "Width", 800);
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "Height", 600);
CHECK(errRes);
/* Select sequence set 1 and save the parameter values */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetIndex", 1);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetStore");
CHECK(errRes);
/* ** Configuring the sequencer for auto sequence advance mode */
/* Assuming you want to configure the following sequence cycle: */
/* 0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...) ** */
/* Disable the sequencer during configuration */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAdvanceMode", "Auto");
CHECK(errRes);
/* Set the total number of sequence sets to 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
CHECK(errRes);
/* Load sequence set 0 and specify that this set is to be used */
/* 2 times in a row */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetIndex", 0);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetLoad");
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetExecutions", 2);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetStore");
CHECK(errRes);
/* Load sequence set 1 and specify that this set is to be used */
/* 3 times in a row */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetIndex", 1);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetLoad");
CHECK(errRes);
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetExecutions", 3);
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceSetStore");
CHECK(errRes);
/* Enable the sequencer */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 1);
CHECK(errRes);
/* ** Configuring the sequencer for controlled sequence advance mode ** */
/* Disable the sequencer during configuration */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAdvanceMode", "Controlled");
CHECK(errRes);
/* Set the total number of sequence sets to 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
CHECK(errRes);
/* Specify that sequence set advance is controlled via line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "SequenceControlSelector", "Advance");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceControlSource", "Line1");
CHECK(errRes);
/* Specify that sequence set restart is controlled */
/* via software command */
errRes = PylonDeviceFeatureFromString(hdev, "SequenceControlSelector", "Restart");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceControlSource", "Disabled");
CHECK(errRes);
/* Enable the sequencer */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 1);
CHECK(errRes);
/* Restart the sequencer via software command (for testing purposes) */
errRes = PylonDeviceExecuteCommandFeature(hdev, "SequenceAsyncRestart");
CHECK(errRes);
/* ** Configuring the sequencer for free selection advance mode */
/* on cameras with ONE input line ** */
/* Disable the sequencer during configuration */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAdvanceMode", "FreeSelection");
CHECK(errRes);
/* Set the total number of sequence sets to 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
CHECK(errRes);
/* Enable the sequencer */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 1);
CHECK(errRes);
/* ** Configuring the sequencer for free selection advance mode */
/* on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input) ** */
/* Disable the sequencer during configuration */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAdvanceMode", "FreeSelection");
CHECK(errRes);
/* Set the total number of sequence sets to 2 */
errRes = PylonDeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 4);
CHECK(errRes);
/* Assign sequence address bit 0 to line 3 */
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAddressBitSelector", "Bit0");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAddressBitSource", "Line3");
CHECK(errRes);
/* Assign sequence address bit 1 to line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAddressBitSelector", "Bit1");
CHECK(errRes);
errRes = PylonDeviceFeatureFromString(hdev, "SequenceAddressBitSource", "Line1");
CHECK(errRes);
/* Enable the sequencer */
errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 1);
CHECK(errRes);
# ** Configuring sequence sets **
# Disable the sequencer during configuration
camera.SequenceEnable.Value = False
# Enable configuration mode (available on selected cameras only)
camera.SequenceConfigurationMode.Value = "On"
# Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.Value = 2
# Configure the parameters that you want to store in the first sequence set
camera.Width.Value = 500
camera.Height.Value = 300
# Select sequence set 0 and save the parameter values
camera.SequenceSetIndex.Value = 0
camera.SequenceSetStore.Execute()
# Configure the parameters that you want to store in the second sequence set
camera.Width.Value = 800
camera.Height.Value = 600
# Select sequence set 1 and save the parameter values
camera.SequenceSetIndex.Value = 1
camera.SequenceSetStore.Execute()
# ** Configuring the sequencer for auto sequence advance mode
# Assuming you want to configure the following sequence cycle:
# 0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...) **
# Disable the sequencer during configuration
camera.SequenceEnable.Value = False
camera.SequenceAdvanceMode.Value = "Auto"
# Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.Value = 2
# Load sequence set 0 and specify that this set is to be used
# 2 times in a row
camera.SequenceSetIndex.Value = 0
camera.SequenceSetLoad.Execute()
camera.SequenceSetExecutions.Value = 2
camera.SequenceSetStore.Execute()
# Load sequence set 1 and specify that this set is to be used
# 3 times in a row
camera.SequenceSetIndex.Value = 1
camera.SequenceSetLoad.Execute()
camera.SequenceSetExecutions.Value = 3
camera.SequenceSetStore.Execute()
# Enable the sequencer
camera.SequenceEnable.Value = True
# ** Configuring the sequencer for controlled sequence advance mode **
# Disable the sequencer during configuration
camera.SequenceEnable.Value = False
camera.SequenceAdvanceMode.Value = "Controlled"
# Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.Value = 2
# Specify that sequence set advance is controlled via line 1
camera.SequenceControlSelector.Value = "Advance"
camera.SequenceControlSource.Value = "Line1"
# Specify that sequence set restart is controlled
# via software command
camera.SequenceControlSelector.Value = "Restart"
camera.SequenceControlSource.Value = "Disabled"
# Enable the sequencer
camera.SequenceEnable.Value = True
# Restart the sequencer via software command (for testing purposes)
camera.SequenceAsyncRestart.Execute()
# ** Configuring the sequencer for free selection advance mode
# on cameras with ONE input line **
# Disable the sequencer during configuration
camera.SequenceEnable.Value = False
camera.SequenceAdvanceMode.Value = "FreeSelection"
# Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.Value = 2
# Enable the sequencer
camera.SequenceEnable.Value = True
# ** Configuring the sequencer for free selection advance mode
# on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input) **
# Disable the sequencer during configuration
camera.SequenceEnable.Value = False
camera.SequenceAdvanceMode.Value = "FreeSelection"
# Set the total number of sequence sets to 2
camera.SequenceSetTotalNumber.Value = 4
# Assign sequence address bit 0 to line 3
camera.SequenceAddressBitSelector.Value = "Bit0"
camera.SequenceAddressBitSource.Value = "Line3"
# Assign sequence address bit 1 to line 1
camera.SequenceAddressBitSelector.Value = "Bit1"
camera.SequenceAddressBitSource.Value = "Line1"
# Enable the sequencer
camera.SequenceEnable.Value = True

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