Sequencer (GigE Cameras)

The Sequencer camera feature allows you to define up to 64 sets of parameter settings, called sequence sets, and apply them to a sequence of image acquisitions.

As the camera acquires images, it applies one sequence set after the other. This enables you to quickly change camera parameters without compromising the maximum frame rate.

For example, you can use the Sequencer feature to quickly change between preconfigured image ROIs or exposure times.

For a description of the Sequencer feature for USB 3.0 cameras, click here.

In this topic Hide

Using the Feature

Prerequisites

All auto functions (e.g., Gain Auto, Exposure Auto) must be set to Off.

Enabling or Disabling the Sequencer

When enabled, the sequencer controls image acquisitions. It can't be configured in this state.

When disabled, the sequencer can be configured but is not controlling image acquisitions.

To enable the sequencer, set the SequenceEnable parameter to true.

How to disable the sequencer depends on your camera model:

What's in a Sequence Set?

Sequencer sets contain the following parameters, if available:

AcquisitionFrameRate  

BalanceRatio

BinningHorizontal

BinningVertical

BlackLevel

CenterX

CenterY

ColorAdjustmentEnable

ColorAdjustmentHue

ColorAdjustmentSaturation

ColorTransformationValue

ColorTransformationMatrixFactor

ChunkModeActive

ChunkEnable

DecimationVertical

DigitalShift

EnableAcquisitionFrameRate

EnabledStackedZoneImaging

ExposureTime

Gain

GammaEnablea

Height

LUTEnableb

OffsetX

OffsetY

PixelFormat

ProcessedRawEnable

ReverseX

ReverseY

ScalingHorizontal

SequenceSetExecutionsc

StackedZoneImagingZoneEnable

StackedZoneImagingZoneOffsetY

StackedZoneImagingZoneHeight

SubsamplingHorizontal

SyncUserOutput

TestImageSelector

TimerDelayd

TimerDurationd

TimerDelayTimebased

TimerDurationTimebased

Width

aOnly contained if the LUTEnable parameter is set to false.

bOnly contained if the GammaEnable parameter is set to false.

cOnly contained if the auto sequence advance mode is enabled.

dAvailable for Timer 1.

All other camera parameters can't be controlled using the Sequencer feature.

Loading or saving a sequence set will always load or save all of the above parameters, even those you haven't changed. For example, if you only changed the exposure time and left all other parameters at their default values, the values of all other parameters will also be stored (and overwritten on load).

Configuring Sequence Sets

Before you can use the Sequencer feature, you must populate the sequence sets with your desired settings. Each sequence set has a unique sequence set index number, ranging from 0 to 63.

To populate the sequence sets:

  1. Set the SequenceSetTotalNumber parameter to the total number of sequence sets you want to use.
  2. Configure the sequence set parameters that you want to store in sequence set 0.
  3. Save sequence set 0.
  4. Repeat steps 2 and 3 for all sequence sets you want to use.
    Make sure to always use a continuous series of index numbers starting with index number 0, e.g., use sequence sets 0, 1, 2, and 3.

Example: Assume you need two sequence sets and want to populate them with different image ROI settings. To do so:

  1. Set the SequenceSetTotalNumber parameter to 2.
  2. Create the first image ROI by adjusting the Width, Height, OffsetX, and OffsetY parameter values.
  3. Save sequence set 0.
  4. Create the second image ROI by choosing different values for the Width, Height, OffsetX, and OffsetY parameters.
  5. Save sequence set 1.

You can now configure the sequencer to quickly change between the two image ROIs.

Saving a Sequence Set

To save a sequence set:

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

The values of all sequence set parameters are stored in the selected sequence set.

Loading a Sequence Set

Sequence sets are loaded automatically during sequencer operation. However, loading a sequence set manually can be useful for testing purposes or when configuring the sequencer.

To manually load a sequence set:

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

The values of all sequence set parameters are overwritten and replaced by the values stored in the selected sequence set.

Configuring the Sequencer

After you have configured the sequence sets, you must configure the sequencer.

The sequencer can be operated in three modes, called "advance modes":

In all modes, sequence sets always advance in ascending order, starting from sequence set index number 0.

Auto Sequence Advance Mode

This mode is useful if you want to configure a fixed sequence which is repeated continuously.

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

In this mode, the advance from one sequence set to the next occurs automatically as Frame Start trigger signals are received.

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.

Example: Assume you want to configure the following sequence cycle:

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

To configure the above sequence cycle:

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

Using Sequence Sets Multiple Times

Optionally, each sequence set can be used several times in a row.

To specify how many times you want to use each sequence set:

  1. Load the desired sequence set.
  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. Save the sequence set.

Example: Assume you want to configure the following sequence cycle:

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

To configure the above sequence cycle:

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

Controlled Sequence Advance Mode

This mode is useful if you want to configure a dynamic sequence which can be controlled via line 1 or software commands.

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

As in the other modes, the advance always proceeds in ascending order, starting from sequence set index number 0.

You can, however, control the following:

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

To configure sequence set advance:

  1. Set the SequenceControlSelector parameter to Advance.
  2. Set the SequenceControlSource parameter to one of the following options:

Configuring Sequence Set Restart

To configure sequence set restart:

  1. Set the SequenceControlSelector parameter to Restart.
  2. Set the SequenceControlSource parameter to one of the following options:

Free Selection Advance Mode

This mode is useful if you want to quickly change between freely selectable sequence sets without having to observe any particular order. You use the input lines of your camera to determine the sequence.

Bear in mind that it takes one microsecond between setting the status of the line and the rise of the Frame Start trigger signal. You also have to maintain the status of the line for at least one microsecond after the Frame Start trigger signal has risen. Monitor the Frame Trigger Wait signal to optimize the timing.

How to configure free selection advance mode depends on how many input lines are available on your camera:

Cameras with One Input Line

Sequence sets are chosen according to the status of input line 1:

Only sequence sets 0 and 1 are available.

To enable free selection advance mode:

  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

Sequence sets are chosen according to the status of line 1 (opto-coupled input line) and line 3 (GPIO line, must be configured as input), resulting in four possible combinations. This allows you to choose between four sequence sets. Consequently, only sequence sets 0, 1, 2, and 3 are available.

In order to configure the free selection advance mode, you must assign a "sequence set address bit" to each line. The combinations of these address bits determine the sequence set index number. The following table shows the possible combinations and their respective outcomes.

Address Bit 1 Address Bit 0 Sequence Set That Will Be Selected
0 0 Sequence set 0
0 1 Sequence set 1
1 0 Sequence set 2
1 1 Sequence set 3

For example, you can assign line 1 to bit 1 and line 3 to bit 0. This results in the following sample configuration:

To configure the bits and enable free selection advance mode:

  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)

Specifics

Camera Model SequenceConfigurationMode Parameter Available
All ace 2 GigE camera models Sequencer feature not supported
All ace 2 USB 3.0 camera models See Sequencer (USB 3.0 Cameras)
acA640-90gm No
acA640-90gc No
acA640-120gm No
acA640-120gc No
acA640-121gm Yes
acA640-300gm Yes
acA640-300gc Yes
acA720-290gm Yes
acA720-290gc Yes
acA780-75gm No
acA780-75gc No
acA800-200gm Yes
acA800-200gc Yes
acA1280-60gm No
acA1280-60gc No
acA1300-22gm No
acA1300-22gc No
acA1300-30gm No
acA1300-30gc No
acA1300-60gm No
acA1300-60gmNIR No
acA1300-60gc No
acA1300-75gm Yes
acA1300-75gc Yes
acA1440-73gm Yes
acA1440-73gc Yes
acA1600-20gm No
acA1600-20gc No
acA1600-60gm No
acA1600-60gc No
acA1920-25gm Noa
acA1920-25gc Noa
acA1920-40gm Yes
acA1920-40gc Yes
acA1920-48gm Yes
acA1920-48gc Yes
acA1920-50gm Yes
acA1920-50gc Yes
acA2000-50gm No
acA2000-50gmNIR No
acA2000-50gc No
acA2040-25gm No
acA2040-25gmNIR No
acA2040-25gc No
acA2040-35gm Yes
acA2040-35gc Yes
acA2440-20gm Yes
acA2440-20gc Yes
acA2500-14gm Noa
acA2500-14gc Noa
acA2500-20gm Yes
acA2500-20gc Yes
acA2500-20gmMED Yes
acA2500-20gcMED Yes
acA3088-16gm Yes
acA3088-16gc Yes
acA3800-10gm No
acA3800-10gc No
acA4024-8gm Yes
acA4024-8gc Yes
acA4096-11gm Yes
acA4096-11gc Yes
acA4112-8gm Yes
acA4112-8gc Yes
acA4600-7gc No
acA5472-5gm Yes
acA5472-5gc Yes
All ace USB 3.0 camera models See Sequencer (USB 3.0 Cameras)
All boost CXP-12 camera models Sequencer feature not supported
All dart BCON for LVDS camera models Sequencer feature not supported
All dart BCON for MIPI camera models Sequencer feature not supported
All dart USB 3.0 camera models Sequencer feature not supported
All pulse USB 3.0 camera models Sequencer feature not supported

aIf you use the camera with overlapping image acquisition, enabling the sequencer may affect the frame rate: When acquiring multiple images using the same sequence set, overlapping image acquisition is possible and the Sequencer feature has no effect on the camera’s frame rate. When acquiring multiple images using different sequence sets, overlapping image acquisition is not possible. The camera must complete the entire exposure/readout process before a new sequence set can be loaded. As a consequence, the frame rate may drop significantly.

Sample Code

/* Configuring sequence sets */
// Disable the sequencer during configuration
camera.SequenceEnable.SetValue(false);
// 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*/

CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
// Set the total number of sequence sets to 2
CIntegerPtr(nodemap.GetNode("SequenceSetTotalNumber"))->SetValue(2);
// Configure the parameters that you want to store in the first sequence set
CIntegerPtr(nodemap.GetNode("Width"))->SetValue(500);
CIntegerPtr(nodemap.GetNode("Height"))->SetValue(300);
// Select sequence set 0 and save the parameter values
CIntegerPtr(nodemap.GetNode("SequenceSetIndex"))->SetValue(0);
CCommandPtr(nodemap.GetNode("SequenceSetStore"))->Execute();
// Configure the parameters that you want to store in the second sequence set
CIntegerPtr(nodemap.GetNode("Width"))->SetValue(800);
CIntegerPtr(nodemap.GetNode("Height"))->SetValue(600);
// Select sequence set 1 and save the parameter values
CIntegerPtr(nodemap.GetNode("SequenceSetIndex"))->SetValue(1);
CCommandPtr(nodemap.GetNode("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 - ...)*/

CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
CEnumerationPtr(nodemap.GetNode("SequenceAdvanceMode"))->FromString("Auto");
// Set the total number of sequence sets to 2
CIntegerPtr(nodemap.GetNode("SequenceSetTotalNumber"))->SetValue(2);
// Load sequence set 0 and specify that this set is to be used
// 2 times in a row
CIntegerPtr(nodemap.GetNode("SequenceSetIndex"))->SetValue(0);
CCommandPtr(nodemap.GetNode("SequenceSetLoad"))->Execute();
CIntegerPtr(nodemap.GetNode("SequenceSetExecutions"))->SetValue(2);
CCommandPtr(nodemap.GetNode("SequenceSetStore"))->Execute();
// Load sequence set 1 and specify that this set is to be used
// 3 times in a row
CIntegerPtr(nodemap.GetNode("SequenceSetIndex"))->SetValue(1);
CCommandPtr(nodemap.GetNode("SequenceSetLoad"))->Execute();
CIntegerPtr(nodemap.GetNode("SequenceSetExecutions"))->SetValue(3);
CCommandPtr(nodemap.GetNode("SequenceSetStore"))->Execute();
// Enable the sequencer
CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(true);
/*Configuring the sequencer for controlled sequence advance mode*/

CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
CEnumerationPtr(nodemap.GetNode("SequenceAdvanceMode"))->FromString("Controlled");
// Set the total number of sequence sets to 2
CIntegerPtr(nodemap.GetNode("SequenceSetTotalNumber"))->SetValue(2);
// Specify that sequence set advance is controlled via line 1
CEnumerationPtr(nodemap.GetNode("SequenceControlSelector"))->FromString("Advance");
CEnumerationPtr(nodemap.GetNode("SequenceControlSource"))->FromString("Line1");
// Specify that sequence set restart is controlled
// via software command
CEnumerationPtr(nodemap.GetNode("SequenceControlSelector"))->FromString("Restart");
CEnumerationPtr(nodemap.GetNode("SequenceControlSource"))->FromString("Disabled");
// Enable the sequencer
CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(true);
// Restart the sequencer via software command (for testing purposes)
CCommandPtr(nodemap.GetNode("SequenceAsyncRestart"))->Execute();
/*Configuring the sequencer for free selection advance mode
on cameras with ONE input line*/

CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
CEnumerationPtr(nodemap.GetNode("SequenceAdvanceMode"))->FromString("FreeSelection");
// Set the total number of sequence sets to 2
CIntegerPtr(nodemap.GetNode("SequenceSetTotalNumber"))->SetValue(2);
// Enable the sequencer
CBooleanPtr(nodemap.GetNode("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)*/

CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
CEnumerationPtr(nodemap.GetNode("SequenceAdvanceMode"))->FromString("FreeSelection");
// Set the total number of sequence sets to 2
CIntegerPtr(nodemap.GetNode("SequenceSetTotalNumber"))->SetValue(4);
// Assign sequence address bit 0 to line 3
CEnumerationPtr(nodemap.GetNode("SequenceAddressBitSelector"))->FromString("Bit0");
CEnumerationPtr(nodemap.GetNode("SequenceAddressBitSource"))->FromString("Line3");
// Assign sequence address bit 1 to line 1
CEnumerationPtr(nodemap.GetNode("SequenceAddressBitSelector"))->FromString("Bit1");
CEnumerationPtr(nodemap.GetNode("SequenceAddressBitSource"))->FromString("Line1");
// Enable the sequencer
CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(true);
/*Configuring sequence sets*/

camera.Parameters[PLCamera.SequenceEnable].SetValue(false);
// 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 - ...)*/

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*/

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*/

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)*/

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);
/*Configuring sequence sets*/

Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
// Set the total number of sequence sets to 2
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
// Configure the parameters that you want to store in the first sequence set
Pylon.DeviceSetIntegerFeature(hdev, "Width", 500);
Pylon.DeviceSetIntegerFeature(hdev, "Height", 300);
// Select sequence set 0 and save the parameter values
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetIndex", 0);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetStore");
// Configure the parameters that you want to store in the second sequence set
Pylon.DeviceSetIntegerFeature(hdev, "Width", 800);
Pylon.DeviceSetIntegerFeature(hdev, "Height", 600);
// Select sequence set 1 and save the parameter values
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetIndex", 1);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetStore");
/*Configuring the sequencer for auto sequence advance mode
Assuming you want to configure the following sequence cycle:
0 - 0 - 1 - 1 - 1 (- 0 - 0 - ...)*/

Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
Pylon.DeviceFeatureFromString(hdev, "SequenceAdvanceMode", "Auto");
// Set the total number of sequence sets to 2
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
// Load sequence set 0 and specify that this set is to be used
// 2 times in a row
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetIndex", 0);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetLoad");
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetExecutions", 2);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetStore");
// Load sequence set 1 and specify that this set is to be used
// 3 times in a row
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetIndex", 1);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetLoad");
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetExecutions", 3);
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceSetStore");
// Enable the sequencer
Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", true);
/*Configuring the sequencer for controlled sequence advance mode*/

Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
Pylon.DeviceFeatureFromString(hdev, "SequenceAdvanceMode", "Controlled");
// Set the total number of sequence sets to 2
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
// Specify that sequence set advance is controlled via line 1
Pylon.DeviceFeatureFromString(hdev, "SequenceControlSelector", "Advance");
Pylon.DeviceFeatureFromString(hdev, "SequenceControlSource", "Line1");
// Specify that sequence set restart is controlled
// via software command
Pylon.DeviceFeatureFromString(hdev, "SequenceControlSelector", "Restart");
Pylon.DeviceFeatureFromString(hdev, "SequenceControlSource", "Disabled");
// Enable the sequencer
Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", true);
// Restart the sequencer via software command (for testing purposes)
Pylon.DeviceExecuteCommandFeature(hdev, "SequenceAsyncRestart");
/*Configuring the sequencer for free selection advance mode
on cameras with ONE input line*/

Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
Pylon.DeviceFeatureFromString(hdev, "SequenceAdvanceMode", "FreeSelection");
// Set the total number of sequence sets to 2
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 2);
// Enable the sequencer
Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", true);
/*Configuring the sequencer for free selection advance mode
on cameras with TWO input lines (1x opto-coupled, 1x GPIO set for input)*/

Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
Pylon.DeviceFeatureFromString(hdev, "SequenceAdvanceMode", "FreeSelection");
// Set the total number of sequence sets to 2
Pylon.DeviceSetIntegerFeature(hdev, "SequenceSetTotalNumber", 4);
// Assign sequence address bit 0 to line 3
Pylon.DeviceFeatureFromString(hdev, "SequenceAddressBitSelector", "Bit0");
Pylon.DeviceFeatureFromString(hdev, "SequenceAddressBitSource", "Line3");
// Assign sequence address bit 1 to line 1
Pylon.DeviceFeatureFromString(hdev, "SequenceAddressBitSelector", "Bit1");
Pylon.DeviceFeatureFromString(hdev, "SequenceAddressBitSource", "Line1");
// Enable the sequencer
Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", 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*/

errRes = PylonDeviceSetBooleanFeature(hdev, "SequenceEnable", 0);
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 - ...)*/

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*/

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*/

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)*/

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);

You can also use the pylon Viewer to easily set the parameters.