The Sequencer camera feature allows you to define sets of parameter settings and apply them to a sequence of image acquisitions.
You can define up to 64 sets of parameter settings, called sequence sets. 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.
All other camera parameters can't be controlled using the Sequencer feature.
Info
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.
To configure sequence sets, the sequencer must be disabled.
All changes made to sequence sets are lost when the camera is disconnected from power. Also, sequencer settings can't be saved in a user set. In order to preserve your settings, Basler recommends that you write suitable program code using the pylon API to re-populate the sequence sets every time the camera is powered on.
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:
Set the SequenceSetTotalNumber parameter to the total number of sequence sets you want to use.
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:
Set the SequenceSetTotalNumber parameter to 2.
Create the first image ROI by adjusting the Width, Height, OffsetX, and OffsetY parameter values.
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:
Set the SequenceSetIndex parameter to the desired sequence set.
Execute the SequenceSetLoad command.
The values of all sequence set parameters are overwritten and replaced by the values stored in the selected sequence set.
After you have configured the sequence sets, you must configure the sequencer.
Info
To configure the sequencer, the sequencer must be disabled.
All changes made to the sequencer configuration are lost when the camera is disconnected from power. Also, sequencer settings can't be saved in a user set. Basler recommends that you write suitable program code using the pylon API to reconfigure the camera every time it is powered on.
You can use the SequenceSetIndex chunk to keep track of the sequence sets used. When enabled, each image contains chunk data including the index number of the sequence set used for image acquisition.
The sequencer can be operated in three modes, called "advance modes":
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:
To configure the above sequence cycle:
Set the SequenceAdvanceMode parameter to Auto.
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:
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.
Example: Assume you want to configure the following sequence cycle:
To configure the above sequence cycle:
Set the SequenceAdvanceMode parameter to Auto.
Set the SequenceSetTotalNumber parameter to 6.
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.
This mode is useful if you want to configure a dynamic sequence which can be controlled via line 1 or software commands.
Info
For real-time applications, Basler strongly recommends not to control the sequencer via software commands. The delay between sending a software command and it becoming effective depends on the specific installation and the current load on the network. Therefore, it's impossible to predict how many image acquisitions may occur between sending the software command and it becoming effective.
When you're controlling the sequencer using line 1, you have to 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.
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:
Sequence set advance: When do you want the sequencer to advance to the next sequence set?
Sequence set restart: When do you want the sequence cycle to start again from sequence set 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.
Set the SequenceControlSelector parameter to Advance.
Set the SequenceControlSource parameter to one of the following options:
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.
Set the SequenceControlSelector parameter to Restart.
Set the SequenceControlSource parameter to one of the following options:
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.
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.
Info
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:
Sequence sets are chosen according to the status of input line 1:
If line 1 is low (0) while a frame start trigger signal is received, sequence set 0 is used for image acquisition.
If line 1 is high (1) while a Frame Start trigger signal is received, sequence set 1 is used for image acquisition.
Only sequence sets 0 and 1 are available.
To enable free selection advance mode:
Set the SequenceAdvanceMode parameter to FreeSelection.
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.
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:
If line 1 is low (0) and line 3 is low (0) while a frame start trigger signal is received, sequence set 0 is used for image acquisition.
If line 1 is low (0) and line 3 is high (1) while a frame start trigger signal is received, sequence set 1 is used for image acquisition.
If line 1 is high (1) and line 3 is low (0) while a frame start trigger signal is received, sequence set 2 is used for image acquisition.
If line 1 is high (1) and line 3 is high (1) while a frame start trigger signal is received, sequence set 3 is used for image acquisition.
To configure the bits and enable free selection advance mode:
Set the SequenceAdvanceMode parameter to FreeSelection.
Set the SequenceSetTotalNumber parameter to 4.
Set the SequenceAddressBitSelector parameter to Bit0.
Set the SequenceAddressBitSource parameter to the line that you want to assign to bit 0, e.g., Line3.
Set the SequenceAddressBitSelector parameter to Bit1.
Set the SequenceAddressBitSource parameter to the line that you want to assign to bit 1, e.g., Line1.
Info
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".
// ** Configuring sequence sets **// Disable the sequencer during configurationcamera.SequenceEnable.SetValue(false);// Enable configuration mode (available on selected cameras only)camera.SequenceConfigurationMode.SetValue(SequenceConfigurationMode_On);// Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.SetValue(2);// Configure the parameters that you want to store in the first sequence setcamera.Width.SetValue(500);camera.Height.SetValue(300);// Select sequence set 0 and save the parameter valuescamera.SequenceSetIndex.SetValue(0);camera.SequenceSetStore.Execute();// Configure the parameters that you want to store in the second sequence setcamera.Width.SetValue(800);camera.Height.SetValue(600);// Select sequence set 1 and save the parameter valuescamera.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 configurationcamera.SequenceEnable.SetValue(false);camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_Auto);// Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.SetValue(2);// Load sequence set 0 and specify that this set is to be used// 2 times in a rowcamera.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 rowcamera.SequenceSetIndex.SetValue(1);camera.SequenceSetLoad.Execute();camera.SequenceSetExecutions.SetValue(3);camera.SequenceSetStore.Execute();// Enable the sequencercamera.SequenceEnable.SetValue(true);// ** Configuring the sequencer for controlled sequence advance mode **// Disable the sequencer during configurationcamera.SequenceEnable.SetValue(false);camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_Controlled);// Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.SetValue(2);// Specify that sequence set advance is controlled via line 1camera.SequenceControlSelector.SetValue(SequenceControlSelector_Advance);camera.SequenceControlSource.SetValue(SequenceControlSource_Line1);// Specify that sequence set restart is controlled// via software commandcamera.SequenceControlSelector.SetValue(SequenceControlSelector_Restart);camera.SequenceControlSource.SetValue(SequenceControlSource_Disabled);// Enable the sequencercamera.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 configurationcamera.SequenceEnable.SetValue(false);camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_FreeSelection);// Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.SetValue(2);// Enable the sequencercamera.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 configurationcamera.SequenceEnable.SetValue(false);camera.SequenceAdvanceMode.SetValue(SequenceAdvanceMode_FreeSelection);// Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.SetValue(4);// Assign sequence address bit 0 to line 3camera.SequenceAddressBitSelector.SetValue(SequenceAddressBitSelector_Bit0);camera.SequenceAddressBitSource.SetValue(SequenceAddressBitSource_Line3);// Assign sequence address bit 1 to line 1camera.SequenceAddressBitSelector.SetValue(SequenceAddressBitSelector_Bit1);camera.SequenceAddressBitSource.SetValue(SequenceAddressBitSource_Line1);// Enable the sequencercamera.SequenceEnable.SetValue(true);
INodeMap&nodemap=camera.GetNodeMap();// ** Configuring sequence sets **// Disable the sequencer during configurationCBooleanParameter(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 2CIntegerParameter(nodemap,"SequenceSetTotalNumber").SetValue(2);// Configure the parameters that you want to store in the first sequence setCIntegerParameter(nodemap,"Width").SetValue(500);CIntegerParameter(nodemap,"Height").SetValue(300);// Select sequence set 0 and save the parameter valuesCIntegerParameter(nodemap,"SequenceSetIndex").SetValue(0);CCommandParameter(nodemap,"SequenceSetStore").Execute();// Configure the parameters that you want to store in the second sequence setCIntegerParameter(nodemap,"Width").SetValue(800);CIntegerParameter(nodemap,"Height").SetValue(600);// Select sequence set 1 and save the parameter valuesCIntegerParameter(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 configurationCBooleanParameter(nodemap,"SequenceEnable").SetValue(false);CEnumParameter(nodemap,"SequenceAdvanceMode").SetValue("Auto");// Set the total number of sequence sets to 2CIntegerParameter(nodemap,"SequenceSetTotalNumber").SetValue(2);// Load sequence set 0 and specify that this set is to be used// 2 times in a rowCIntegerParameter(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 rowCIntegerParameter(nodemap,"SequenceSetIndex").SetValue(1);CCommandParameter(nodemap,"SequenceSetLoad").Execute();CIntegerParameter(nodemap,"SequenceSetExecutions").SetValue(3);CCommandParameter(nodemap,"SequenceSetStore").Execute();// Enable the sequencerCBooleanParameter(nodemap,"SequenceEnable").SetValue(true);// ** Configuring the sequencer for controlled sequence advance mode **// Disable the sequencer during configurationCBooleanParameter(nodemap,"SequenceEnable").SetValue(false);CEnumParameter(nodemap,"SequenceAdvanceMode").SetValue("Controlled");// Set the total number of sequence sets to 2CIntegerParameter(nodemap,"SequenceSetTotalNumber").SetValue(2);// Specify that sequence set advance is controlled via line 1CEnumParameter(nodemap,"SequenceControlSelector").SetValue("Advance");CEnumParameter(nodemap,"SequenceControlSource").SetValue("Line1");// Specify that sequence set restart is controlled// via software commandCEnumParameter(nodemap,"SequenceControlSelector").SetValue("Restart");CEnumParameter(nodemap,"SequenceControlSource").SetValue("Disabled");// Enable the sequencerCBooleanParameter(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 configurationCBooleanParameter(nodemap,"SequenceEnable").SetValue(false);CEnumParameter(nodemap,"SequenceAdvanceMode").SetValue("FreeSelection");// Set the total number of sequence sets to 2CIntegerParameter(nodemap,"SequenceSetTotalNumber").SetValue(2);// Enable the sequencerCBooleanParameter(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 configurationCBooleanParameter(nodemap,"SequenceEnable").SetValue(false);CEnumParameter(nodemap,"SequenceAdvanceMode").SetValue("FreeSelection");// Set the total number of sequence sets to 2CIntegerParameter(nodemap,"SequenceSetTotalNumber").SetValue(4);// Assign sequence address bit 0 to line 3CEnumParameter(nodemap,"SequenceAddressBitSelector").SetValue("Bit0");CEnumParameter(nodemap,"SequenceAddressBitSource").SetValue("Line3");// Assign sequence address bit 1 to line 1CEnumParameter(nodemap,"SequenceAddressBitSelector").SetValue("Bit1");CEnumParameter(nodemap,"SequenceAddressBitSource").SetValue("Line1");// Enable the sequencerCBooleanParameter(nodemap,"SequenceEnable").SetValue(true);
// ** Configuring sequence sets **// Disable the sequencer during configurationcamera.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 2camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);// Configure the parameters that you want to store in the first sequence setcamera.Parameters[PLCamera.Width].SetValue(500);camera.Parameters[PLCamera.Height].SetValue(300);// Select sequence set 0 and save the parameter valuescamera.Parameters[PLCamera.SequenceSetIndex].SetValue(0);camera.Parameters[PLCamera.SequenceSetStore].Execute();// Configure the parameters that you want to store in the second sequence setcamera.Parameters[PLCamera.Width].SetValue(800);camera.Parameters[PLCamera.Height].SetValue(600);// Select sequence set 1 and save the parameter valuescamera.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 configurationcamera.Parameters[PLCamera.SequenceEnable].SetValue(false);camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.Auto);// Set the total number of sequence sets to 2camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);// Load sequence set 0 and specify that this set is to be used// 2 times in a rowcamera.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 rowcamera.Parameters[PLCamera.SequenceSetIndex].SetValue(1);camera.Parameters[PLCamera.SequenceSetLoad].Execute();camera.Parameters[PLCamera.SequenceSetExecutions].SetValue(3);camera.Parameters[PLCamera.SequenceSetStore].Execute();// Enable the sequencercamera.Parameters[PLCamera.SequenceEnable].SetValue(true);// ** Configuring the sequencer for controlled sequence advance mode **// Disable the sequencer during configurationcamera.Parameters[PLCamera.SequenceEnable].SetValue(false);camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.Controlled);// Set the total number of sequence sets to 2camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);// Specify that sequence set advance is controlled via line 1camera.Parameters[PLCamera.SequenceControlSelector].SetValue(PLCamera.SequenceControlSelector.Advance);camera.Parameters[PLCamera.SequenceControlSource].SetValue(PLCamera.SequenceControlSource.Line1);// Specify that sequence set restart is controlled// via software commandcamera.Parameters[PLCamera.SequenceControlSelector].SetValue(PLCamera.SequenceControlSelector.Restart);camera.Parameters[PLCamera.SequenceControlSource].SetValue(PLCamera.SequenceControlSource.Disabled);// Enable the sequencercamera.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 configurationcamera.Parameters[PLCamera.SequenceEnable].SetValue(false);camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.FreeSelection);// Set the total number of sequence sets to 2camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(2);// Enable the sequencercamera.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 configurationcamera.Parameters[PLCamera.SequenceEnable].SetValue(false);camera.Parameters[PLCamera.SequenceAdvanceMode].SetValue(PLCamera.SequenceAdvanceMode.FreeSelection);// Set the total number of sequence sets to 2camera.Parameters[PLCamera.SequenceSetTotalNumber].SetValue(4);// Assign sequence address bit 0 to line 3camera.Parameters[PLCamera.SequenceAddressBitSelector].SetValue(PLCamera.SequenceAddressBitSelector.Bit0);camera.Parameters[PLCamera.SequenceAddressBitSource].SetValue(PLCamera.SequenceAddressBitSource.Line3);// Assign sequence address bit 1 to line 1camera.Parameters[PLCamera.SequenceAddressBitSelector].SetValue(PLCamera.SequenceAddressBitSelector.Bit1);camera.Parameters[PLCamera.SequenceAddressBitSource].SetValue(PLCamera.SequenceAddressBitSource.Line1);// Enable the sequencercamera.Parameters[PLCamera.SequenceEnable].SetValue(true);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=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 configurationcamera.SequenceEnable.Value=False# Enable configuration mode (available on selected cameras only)camera.SequenceConfigurationMode.Value="On"# Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.Value=2# Configure the parameters that you want to store in the first sequence setcamera.Width.Value=500camera.Height.Value=300# Select sequence set 0 and save the parameter valuescamera.SequenceSetIndex.Value=0camera.SequenceSetStore.Execute()# Configure the parameters that you want to store in the second sequence setcamera.Width.Value=800camera.Height.Value=600# Select sequence set 1 and save the parameter valuescamera.SequenceSetIndex.Value=1camera.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 configurationcamera.SequenceEnable.Value=Falsecamera.SequenceAdvanceMode.Value="Auto"# Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.Value=2# Load sequence set 0 and specify that this set is to be used# 2 times in a rowcamera.SequenceSetIndex.Value=0camera.SequenceSetLoad.Execute()camera.SequenceSetExecutions.Value=2camera.SequenceSetStore.Execute()# Load sequence set 1 and specify that this set is to be used# 3 times in a rowcamera.SequenceSetIndex.Value=1camera.SequenceSetLoad.Execute()camera.SequenceSetExecutions.Value=3camera.SequenceSetStore.Execute()# Enable the sequencercamera.SequenceEnable.Value=True# ** Configuring the sequencer for controlled sequence advance mode **# Disable the sequencer during configurationcamera.SequenceEnable.Value=Falsecamera.SequenceAdvanceMode.Value="Controlled"# Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.Value=2# Specify that sequence set advance is controlled via line 1camera.SequenceControlSelector.Value="Advance"camera.SequenceControlSource.Value="Line1"# Specify that sequence set restart is controlled# via software commandcamera.SequenceControlSelector.Value="Restart"camera.SequenceControlSource.Value="Disabled"# Enable the sequencercamera.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 configurationcamera.SequenceEnable.Value=Falsecamera.SequenceAdvanceMode.Value="FreeSelection"# Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.Value=2# Enable the sequencercamera.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 configurationcamera.SequenceEnable.Value=Falsecamera.SequenceAdvanceMode.Value="FreeSelection"# Set the total number of sequence sets to 2camera.SequenceSetTotalNumber.Value=4# Assign sequence address bit 0 to line 3camera.SequenceAddressBitSelector.Value="Bit0"camera.SequenceAddressBitSource.Value="Line3"# Assign sequence address bit 1 to line 1camera.SequenceAddressBitSelector.Value="Bit1"camera.SequenceAddressBitSource.Value="Line1"# Enable the sequencercamera.SequenceEnable.Value=True