跳转到内容

Sequencer(GigE 相机)#

相机的 Sequencer 功能允许您定义多达 64 组参数设置(称为序列集),并将其应用于图像采集序列。

相机采集图像时,会逐个应用序列集。这使您可以快速更改相机参数,而不会影响最大帧速率。

例如,您可以使用 Sequencer 功能,在预配置的图像 ROI曝光时间之间快速切换。

有关 USB 3.0 相机 Sequencer 功能的说明,请单击此处

该功能的使用#

启用或禁用 Sequencer#

启用时,定序器将控制图像采集。无法在此状态下配置定序器。

禁用时,可以配置定序器,但定序器不控制图像采集。

要启用定序器:

  1. 将所有自动功能(例如,Gain AutoExposure Auto)设置为 Off
  2. SequenceEnable 参数设置为 true

如何禁用定序器取决于您的相机型号

  • 如果 SequenceConfigurationMode parameter is available:
    1. SequenceEnable 参数设置为 false
    2. SequenceConfigurationMode 参数设置为 On
  • 如果 SequenceConfigurationMode 参数可用,请将 SequenceEnable 参数设置为 false

序列集中包含什么?#

定序器集包含以下参数(如果可用):

  • AcquisitionFrameRate
  • AcquisitionFrameRateEnable
  • BalanceRatio
  • BinningHorizontal
  • BinningVertical
  • BlackLevel
  • CenterX
  • CenterY
  • ChunkEnable
  • ChunkModeActive
  • ColorAdjustmentEnable
  • ColorAdjustmentHue
  • ColorAdjustmentSaturation
  • ColorTransformationMatrixFactor
  • ColorTransformationValue
  • DecimationVertical
  • DigitalShift
  • ExposureTime
  • Gain
  • GammaEnablea
  • Height
  • LUTEnableb
  • OffsetX
  • OffsetX
  • PixelFormatc
  • ProcessedRawEnable
  • ReverseX
  • ReverseYd
  • ScalingHorizontal
  • SequenceSetExecutionse
  • StackedZoneImagingEnable
  • StackedZoneImagingZoneEnable
  • StackedZoneImagingZoneHeight
  • StackedZoneImagingZoneOffsetY
  • SubsamplingHorizontal
  • SyncUserOutput
  • TestImageSelector
  • TimerDelayf
  • TimerDelayTimebasef
  • TimerDurationf
  • TimerDurationTimebasef
  • Width

  1. 仅当 LUTEnable 参数设置为 false 时才包含。

  2. 仅当 GammaEnable 参数设置为 false 时才包含。

  3. 仅适用于以下相机型号:acA640-300gm/gc、acA800-200gm/gc、acA1300-75gm/gc、acA1920-48gm/gc、acA2500-20gm/gc。

  4. 不适用于以下相机型号:acA3088-16gm/gc、acA4024-8gm/gc、acA5472-5gm/gc。

  5. 仅在启用自动序列推进模式时包含。

  6. 可用于计时器 1。

其他所有相机参数均无法使用 Sequencer 功能控制。

信息

加载保存序列集将始终加载或保存以上所有参数,包括您未更改的参数在内。例如,如果仅更改曝光时间并保留所有其他参数的默认值,则所有其他参数的值也将被保存(并在加载时被覆盖)。

配置序列集#

信息

  • 要配置序列集,必须禁用定序器。
  • 断开相机电源后,对序列集所做的所有更改都会丢失。另外,定序器集也无法保存在用户设置集中。为了保留您的设置,Basler 建议您使用 pylon API 编写适当的代码,在每次打开相机电源时重新填充序列集。

在使用 Sequencer 功能之前,必须使用所需的设置填充序列集。每个序列集都有一个唯一的序列集索引编号,范围从 0 到 63。

要填充序列集:

  1. SequenceSetTotalNumber 参数设置为要使用的序列集的总数。
  2. 配置要存储在序列集 0 中的序列集参数
  3. 保存序列集 0。
  4. 对要使用的所有序列集重复步骤 2 和 3。确保始终使用从索引号 0 开始的连续索引号序列,例如,使用序列集 0、1、2 和 3。

示例:假设您需要两个序列集,并希望使用不同的图像 ROI 设置来填充它们。为此:

  1. SequenceSetTotalNumber 参数设置为 2。
  2. 通过调整宽度高度OffsetXOffsetY参数值创建第一个图像 ROI。
  3. 保存序列集 0。
  4. 通过选择不同的宽度高度OffsetXOffsetY参数值创建第二个图像 ROI。
  5. 保存序列集 1。

现在,您可以将定序器配置为在两个图像 ROI 之间快速切换。

保存序列集#

要保存序列集:

  1. SequenceSetIndex 参数设置为所需的序列集。
  2. 执行 SequenceSetStore 命令。

所有序列集参数的值都存储在所选序列集中。

加载序列集#

序列集在定序器运行期间自动加载。但是,手动加载序列集对于测试或在配置定序器时可能很有用。

若要手动加载序列集:

  1. SequenceSetIndex 参数设置为所需的序列集。
  2. 执行 SequenceSetLoad 命令。

所有序列集参数的值都将被覆盖,并由存储在所选序列集中的值替换。

配置 Sequencer#

配置序列集后,必须配置定序器。

信息

  • 要配置定序器,必须禁用定序器。
  • 断开相机电源后,对定序器配置所做的所有更改都将丢失。另外,定序器集也无法保存在用户设置集中。Basler 建议您使用 pylon API 编写适当的程序代码,在相机每次开启电源时重新配置相机。
  • 您可以使用 SequenceSetIndex 块来跟踪所使用的序列集。启用后,每个图像都包含块数据,该数据包括用于图像采集的序列集的索引号。

定序器可以三种模式运行,称为“推进模式”:

在所有模式下,序列集始终从序列集索引号 0 开始,以升序排列。

自动序列推进模式#

如果您希望配置连续重复的固定序列,此模式十分有用。

您可以通过将 SequenceAdvanceMode 参数设置为 Auto 来启用此模式。

在此模式下,当接收到帧开始触发信号时,会自动从一个序列集推进到下一个序列。

SequenceSetTotalNumber 参数指定要使用的序列集的总数。使用具有最高索引号的序列集后,循环再次从 0 开始。

示例:假设您要配置以下序列循环:

示例序列循环:0-1-2-3-4-0-1-...

要配置上述序列循环:

  1. SequenceAdvanceMode 参数设置为 Auto
  2. SequenceSetTotalNumber 参数设置为 5。

多次使用序列集

(可选)每个序列集都可以连续使用多次。

要指定每个序列集要使用多少次:

  1. 加载所需的序列集。
  2. 为此序列集配置 SequenceSetExecutions 参数。默认情况下,所有组的参数均设置为 1,这意味着每个序列集在每个循环内使用一次。
  3. 保存序列集。

示例:假设您要配置以下序列循环:

示例序列循环:0-1-1-1-2-3-4-5-5-0-1-...

要配置上述序列循环:

  1. SequenceAdvanceMode 参数设置为 Auto
  2. SequenceSetTotalNumber 参数设置为 6。
  3. 配置 SequenceSetExecutions 参数(针对各序列集):
    • 序列集 0、2、3 和 4 在每个循环中只能使用一次。因此,您可以跳过这些设置,并保留 SequenceSetExecutions 参数的默认值 1。
    • 序列集 1 将连续使用 3 次。加载序列集 1,将 SequenceSetExecutions 参数设置为 3,然后保存序列集 1。
    • 序列集 5 将连续使用两次。加载序列集 5,将 SequenceSetExecutions 参数设置为 2,并保存序列集 5。

受控序列推进模式#

如果您希望配置可以通过Line 1 或软件命令控制的动态序列,此模式非常有用。

信息

  • 对于实时应用,Basler 强烈建议不要通过软件命令来控制定序器。发送软件命令与命令生效之间的延迟时间取决于特定的安装和网络上的当前负载。因此,无法预测在发送软件命令到该命令生效之间可能会发生多少次图像采集。
  • 使用Line 1 控制定序器时,务必牢记,在设置线路状态与帧开始触发信号上升之间需要 1 微秒的时间间隔。在帧开始触发信号上升后,还必须使线路状态保持至少 1 微秒。监视帧触发等待信号以优化时间安排。

可以通过将 SequenceAdvanceMode 参数设置为 Controlled 来启用此模式。

与其他模式一样,推进始终从序列集索引编号 0 开始,按照升序进行。

但是,您可以控制以下内容:

  • 序列集推进:您希望定序器何时推进到下一个序列集?
  • 序列集重新启动:您希望序列循环何时从序列集 0 重新开始?

SequenceSetTotalNumber 参数指定您要使用的序列集的总数。使用具有最高索引号的序列集后,循环再次从 0 开始。

配置序列集推进

若要配置序列集推进:

  1. SequenceControlSelector 参数设置为 Advance
  2. 设置 SequenceControlSource 参数设置为以下选项:
    • Line1:将通过Line 1 控制序列集推进。如果在接收到帧开始触发信号的同时,Line 1 为低电平 (0),则定序器不会推进,并且当前序列集将再次用于图像采集。如果在接收到帧开始触发信号的同时,Line 1 为高电平 (1),则定序器将推进,并将循环中设置的下一个序列用于图像采集。
    • Disabled:将使用 SequenceAsyncAdvance 软件命令来控制序列集推进。收到此命令后,定序器将推进而不采集图像。当接收到下一个帧开始触发信号时,由 SequenceCurrentSet 参数值指示的序列集将用于图像采集。
    • AlwaysActive:定序器的行为与选择 Line1 且 Line 1 始终为高电平 (1) 时相同。因此,每次接收到帧开始触发信号时,定序器就会推进。当每个序列集在每次循环中仅使用一次时,这种操作定序器的方式类似于在自动定序推进模式下进行操作。唯一的区别是,序列集 1 用作第一个序列集,而不是序列集 0 用作第一个。
配置序列集重启

若要配置序列集重启:

  1. SequenceControlSelector 参数设置为 Restart
  2. 设置 SequenceControlSource 参数设置为以下选项:
    • Line1:将通过Line 1 控制序列集重启。如果在接收到帧开始触发信号时,Line 1 为低电平 (0),则使用下一个序列集。如果在接收到帧开始触发信号时,Line 1 为高电平 (1),则重新启动序列循环并使用序列集 0。
    • Disabled:将使用 SequenceAsyncRestart 软件命令来控制序列集重启。收到此命令后,序列循环将重新启动而不采集图像。接收到下一个帧开始触发信号时,将使用序列集 0。

自由选择推进模式#

如果您希望在可自由选择的序列集之间快速切换,而无需遵守任何特定顺序,此模式十分有用。您使用相机的输入线路来决定序列。

信息

切记,在设置线路状态与帧开始触发信号上升之间需要 1 微秒的时间间隔。在帧开始触发信号上升后,您还必须使线路状态保持至少 1 微秒。监视帧触发等待信号以优化时间安排。

如何配置自由选择推进模式取决于相机上有多少输入线路可用:

具有一条输入线路的相机

根据输入Line 1 的状态选择序列集:

  • 如果在接收到帧开始触发信号时Line 1 为低电平 (0),则将序列集 0 用于图像采集。
  • 如果在接收到帧开始触发信号时Line 1 为高电平 (1),则将序列集 1 用于图像采集。

仅序列集 0 和 1 可用。

要启用自由选择推进模式:

  1. SequenceAdvanceMode 参数设置为 FreeSelection
  2. SequenceSetTotalNumber 参数设置为 2。

SequenceAddressBitSelectorSequenceAddressBitSource 参数还控制自由选择推进模式的操作。但是,这些参数是预设的,无法更改。

具有两条输入线路的相机

根据Line 1(光电耦合输入线路)和Line 3(GPIO 线路,必须配置为输入)的状态选择序列集,从而产生四种可能的组合。这使您可以在四个序列集之间进行选择。因此,只有序列集 0、1、2 和 3 可用。

为了配置自由选择推进模式,必须为每个线路分配一个“序列集地址位”。这些地址位的组合确定序列集索引号。下表显示了可能的组合及其各自的结果。

地址位 1 地址位 0 将要选择的序列集
0 0 序列集 0
0 1 序列集 1
1 0 序列集 2
1 1 序列集 3

例如,您可以将Line 1 分配给位 1,将Line 3 分配给位 0。这将得到以下示例配置:

  • 如果在接收到帧开始触发信号时,Line 1 为低电平 (0),Line 3 为低电平 (0),则将序列集 0 用于图像采集。
  • 如果在接收到帧开始触发信号时,Line 1 为低电平 (0),Line 3 为高电平 (1),则将序列集 1 用于图像采集。
  • 如果在接收到帧开始触发信号时,Line 1 为高电平 (1),Line 3 为低电平 (0),则将序列集 2 用于图像采集。
  • 如果在接收到帧开始触发信号时,Line 1 为高电平 (1),Line 3 为高电平 (1),则将序列集 3 用于图像采集。

要配置位并启用自由选择推进模式:

  1. SequenceAdvanceMode 参数设置为 FreeSelection
  2. SequenceSetTotalNumber 参数设置为 4。
  3. SequenceAddressBitSelector 参数设置为 Bit0
  4. SequenceAddressBitSource 参数设置为要分配给位 0 的线路,例如 Line3
  5. SequenceAddressBitSelector 参数设置为 Bit1
  6. SequenceAddressBitSource 参数设置为要分配给位 1 的线路,例如 Line1

信息

在自由选择推进模式下,您也只能使用一条输入线路。为此,将 SequenceSetTotalNumber 参数设置为 2。现在,仅位 0 用于选择序列集。自由选择推进模式的行为如“具有一条输入线路的相机”中所述。

时序图#

示例:自动序列推进模式#

自动序列推进模式时序图(示例)

示例:受控序列推进模式(通过Line 1 控制)#

受控序列推进模式时序图(示例)

示例:自由选择推进模式#

自由选择推进模式时序图(示例)

详情#

显示所有相机型号

相机型号 有 SequenceConfigurationMode 参数可用
a2A1920-51gcBAS 请参阅 Sequencer(USB 3.0 相机)
a2A1920-51gcPRO 请参阅 Sequencer(USB 3.0 相机)
a2A1920-51gmBAS 请参阅 Sequencer(USB 3.0 相机)
a2A1920-51gmPRO 请参阅 Sequencer(USB 3.0 相机)
a2A1920-160ucBAS 请参阅 Sequencer(USB 3.0 相机)
a2A1920-160ucPRO 请参阅 Sequencer(USB 3.0 相机)
a2A1920-160umBAS 请参阅 Sequencer(USB 3.0 相机)
a2A1920-160umPRO 请参阅 Sequencer(USB 3.0 相机)
a2A2590-22gcBAS 请参阅 Sequencer(USB 3.0 相机)
a2A2590-22gcPRO 请参阅 Sequencer(USB 3.0 相机)
a2A2590-22gmBAS 请参阅 Sequencer(USB 3.0 相机)
a2A2590-22gmPRO 请参阅 Sequencer(USB 3.0 相机)
a2A2590-60ucBAS 请参阅 Sequencer(USB 3.0 相机)
a2A2590-60ucPRO 请参阅 Sequencer(USB 3.0 相机)
a2A2590-60umBAS 请参阅 Sequencer(USB 3.0 相机)
a2A2590-60umPRO 请参阅 Sequencer(USB 3.0 相机)
a2A3840-13gcBAS 请参阅 Sequencer(USB 3.0 相机)
a2A3840-13gcPRO 请参阅 Sequencer(USB 3.0 相机)
a2A3840-13gmBAS 请参阅 Sequencer(USB 3.0 相机)
a2A3840-13gmPRO 请参阅 Sequencer(USB 3.0 相机)
a2A3840-45ucBAS 请参阅 Sequencer(USB 3.0 相机)
a2A3840-45ucPRO 请参阅 Sequencer(USB 3.0 相机)
a2A3840-45umBAS 请参阅 Sequencer(USB 3.0 相机)
a2A3840-45umPRO 请参阅 Sequencer(USB 3.0 相机)
acA640-90gc
acA640-90gm
acA640-90uc 请参阅 Sequencer(USB 3.0 相机)
acA640-90um 请参阅 Sequencer(USB 3.0 相机)
acA640-120gc
acA640-120gm
acA640-120uc 请参阅 Sequencer(USB 3.0 相机)
acA640-120um 请参阅 Sequencer(USB 3.0 相机)
acA640-121gm
acA640-300gc
acA640-300gm
acA640-750uc 请参阅 Sequencer(USB 3.0 相机)
acA640-750um 请参阅 Sequencer(USB 3.0 相机)
acA720-290gc
acA720-290gm
acA720-520uc 请参阅 Sequencer(USB 3.0 相机)
acA720-520um 请参阅 Sequencer(USB 3.0 相机)
acA780-75gc
acA780-75gm
acA800-200gc
acA800-200gm
acA800-510uc 请参阅 Sequencer(USB 3.0 相机)
acA800-510um 请参阅 Sequencer(USB 3.0 相机)
acA1280-60gc
acA1280-60gm
acA1300-22gc
acA1300-22gm
acA1300-30gc
acA1300-30gm
acA1300-30uc 请参阅 Sequencer(USB 3.0 相机)
acA1300-30um 请参阅 Sequencer(USB 3.0 相机)
acA1300-60gc
acA1300-60gm
acA1300-60gmNIR
acA1300-75gc
acA1300-75gm
acA1300-200uc 请参阅 Sequencer(USB 3.0 相机)
acA1300-200um 请参阅 Sequencer(USB 3.0 相机)
acA1440-73gc
acA1440-73gm
acA1440-220uc 请参阅 Sequencer(USB 3.0 相机)
acA1440-220um 请参阅 Sequencer(USB 3.0 相机)
acA1600-20gc
acA1600-20gm
acA1600-20uc 请参阅 Sequencer(USB 3.0 相机)
acA1600-20um 请参阅 Sequencer(USB 3.0 相机)
acA1600-60gc
acA1600-60gm
acA1920-25gc
acA1920-25gm
acA1920-25uc 请参阅 Sequencer(USB 3.0 相机)
acA1920-25um 请参阅 Sequencer(USB 3.0 相机)
acA1920-40gc
acA1920-40gm
acA1920-40uc 请参阅 Sequencer(USB 3.0 相机)
acA1920-40ucMED 请参阅 Sequencer(USB 3.0 相机)
acA1920-40um 请参阅 Sequencer(USB 相机)
acA1920-40umMED 请参阅 Sequencer(USB 3.0 相机)
acA1920-48gc
acA1920-48gm
acA1920-50gc
acA1920-50gm
acA1920-150uc 请参阅 Sequencer(USB 3.0 相机)
acA1920-150um 请参阅 Sequencer(USB 3.0 相机)
acA1920-155uc 请参阅 Sequencer(USB 3.0 相机)
acA1920-155ucMED 请参阅 Sequencer(USB 3.0 相机)
acA1920-155um 请参阅 Sequencer(USB 3.0 相机)
acA1920-155umMED 请参阅 Sequencer(USB 3.0 相机)
acA2000-50gc
acA2000-50gm
acA2000-50gmNIR
acA2000-165uc 请参阅 Sequencer(USB 3.0 相机)
acA2000-165um 请参阅 Sequencer(USB 3.0 相机)
acA2000-165umNIR 请参阅 Sequencer(USB 3.0 相机)
acA2040-25gc
acA2040-25gm
acA2040-25gmNIR
acA2040-35gc
acA2040-35gm
acA2040-55uc 请参阅 Sequencer(USB 3.0 相机)
acA2040-55um 请参阅 Sequencer(USB 3.0 相机)
acA2040-90uc 请参阅 Sequencer(USB 3.0 相机)
acA2040-90um 请参阅 Sequencer(USB 3.0 相机)
acA2040-90umNIR 请参阅 Sequencer(USB 3.0 相机)
acA2040-120uc 请参阅 Sequencer(USB 3.0 相机)
acA2040-120um 请参阅 Sequencer(USB 3.0 相机)
acA2440-20gc
acA2440-20gm
acA2440-35uc 请参阅 Sequencer(USB 3.0 相机)
acA2440-35ucMED 请参阅 Sequencer(USB 3.0 相机)
acA2440-35um 请参阅 Sequencer(USB 3.0 相机)
acA2440-35umMED 请参阅 Sequencer(USB 3.0 相机)
acA2440-75uc 请参阅 Sequencer(USB 3.0 相机)
acA2440-75ucMED 请参阅 Sequencer(USB 3.0 相机)
acA2440-75um 请参阅 Sequencer(USB 3.0 相机)
acA2440-75umMED 请参阅 Sequencer(USB 3.0 相机)
acA2500-14gc 否。
注意:如果您为相机使用重叠图像采集,则启用定序器可能会影响帧速率。使用相同的序列集采集多个图像时,可以实现重叠图像采集,并且 Sequencer 功能对相机的帧速率没有影响。使用不同的序列集采集多幅图像时,无法进行重叠图像采集。相机必须完成整个曝光/读取过程,然后才能加载新的序列集。结果,帧速率可能会大大下降。
acA2500-14gm 否。
注意:如果您为相机使用重叠图像采集,则启用定序器可能会影响帧速率。使用相同的序列集采集多个图像时,可以实现重叠图像采集,并且 Sequencer 功能对相机的帧速率没有影响。使用不同的序列集采集多幅图像时,无法进行重叠图像采集。相机必须完成整个曝光/读取过程,然后才能加载新的序列集。结果,帧速率可能会大大下降。
acA2500-14uc 请参阅 Sequencer(USB 3.0 相机)
acA2500-14um 请参阅 Sequencer(USB 3.0 相机)
acA2500-20gc
acA2500-20gcMED
acA2500-20gm
acA2500-20gmMED
acA2500-60uc 请参阅 Sequencer(USB 3.0 相机)
acA2500-60um 请参阅 Sequencer(USB 3.0 相机)
acA3088-16gc
acA3088-16gm
acA3088-57uc 请参阅 Sequencer(USB 3.0 相机)
acA3088-57um 请参阅 Sequencer(USB 3.0 相机)
acA3800-10gc
acA3800-10gm
acA3800-14uc 请参阅 Sequencer(USB 3.0 相机)
acA3800-14um 请参阅 Sequencer(USB 3.0 相机)
acA4024-8gc
acA4024-8gm
acA4024-29uc 请参阅 Sequencer(USB 3.0 相机)
acA4024-29um 请参阅 Sequencer(USB 3.0 相机)
acA4096-11gc
acA4096-11gm
acA4096-30uc 请参阅 Sequencer(USB 3.0 相机)
acA4096-30ucMED 请参阅 Sequencer(USB 3.0 相机)
acA4096-30um 请参阅 Sequencer(USB 3.0 相机)
acA4096-30umMED 请参阅 Sequencer(USB 3.0 相机)
acA4096-40uc 请参阅 Sequencer(USB 3.0 相机)
acA4096-40ucMED 请参阅 Sequencer(USB 3.0 相机)
acA4096-40um 请参阅 Sequencer(USB 3.0 相机)
acA4096-40umMED 请参阅 Sequencer(USB 3.0 相机)
acA4112-8gc
acA4112-8gm
acA4112-20uc 请参阅 Sequencer(USB 3.0 相机)
acA4112-20ucMED 请参阅 Sequencer(USB 3.0 相机)
acA4112-20um 请参阅 Sequencer(USB 3.0 相机)
acA4112-20umMED 请参阅 Sequencer(USB 3.0 相机)
acA4112-30uc 请参阅 Sequencer(USB 3.0 相机)
acA4112-30ucMED 请参阅 Sequencer(USB 3.0 相机)
acA4112-30um 请参阅 Sequencer(USB 3.0 相机)
acA4112-30umMED 请参阅 Sequencer(USB 3.0 相机)
acA4600-7gc
acA4600-10uc 请参阅 Sequencer(USB 3.0 相机)
acA5472-5gc
acA5472-5gm
acA5472-17uc 请参阅 Sequencer(USB 3.0 相机)
acA5472-17ucMED 请参阅 Sequencer(USB 3.0 相机)
acA5472-17um 请参阅 Sequencer(USB 3.0 相机)
boA4096-93cc 不支持 Sequencer 功能
boA4096-93cm 不支持 Sequencer 功能
boA4112-68cc 不支持 Sequencer 功能
boA4112-68cm 不支持 Sequencer 功能
daA1280-54lc 不支持 Sequencer 功能
daA1280-54lm 不支持 Sequencer 功能
daA1280-54uc 不支持 Sequencer 功能
daA1280-54um 不支持 Sequencer 功能
daA1600-60lc 不支持 Sequencer 功能
daA1600-60lm 不支持 Sequencer 功能
daA1600-60uc 不支持 Sequencer 功能
daA1600-60um 不支持 Sequencer 功能
daA1920-15um 不支持 Sequencer 功能
daA1920-30uc 不支持 Sequencer 功能
daA1920-30um 不支持 Sequencer 功能
daA2500-14lc 不支持 Sequencer 功能
daA2500-14lm 不支持 Sequencer 功能
daA2500-14uc 不支持 Sequencer 功能
daA2500-14um 不支持 Sequencer 功能
daA2500-60mc 不支持 Sequencer 功能
daA2500-60mci 不支持 Sequencer 功能
daA4200-30mci 不支持 Sequencer 功能
puA1280-54uc 不支持 Sequencer 功能
puA1280-54um 不支持 Sequencer 功能
puA1600-60uc 不支持 Sequencer 功能
puA1600-60um 不支持 Sequencer 功能
puA1920-30uc 不支持 Sequencer 功能
puA1920-30um 不支持 Sequencer 功能
puA2500-14uc 不支持 Sequencer 功能
puA2500-14um 不支持 Sequencer 功能

示例代码#

// ** 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
CBooleanPtr(nodemap.GetNode("SequenceEnable"))->SetValue(false);
// Enable configuration mode (available on selected cameras only)
CEnumerationPtr(nodemap.GetNode("SequenceConfigurationMode"))->FromString("On");
// 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 - ...) **
// Disable the sequencer during configuration
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 **
// Disable the sequencer during configuration
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 **
// Disable the sequencer during configuration
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) **
// Disable the sequencer during configuration
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);
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);
// ** Configuring sequence sets **
// Disable the sequencer during configuration
Pylon.DeviceSetBooleanFeature(hdev, "SequenceEnable", false);
// Enable configuration mode (available on selected cameras only)
Pylon.DeviceFeatureFromString(hdev, "SequenceConfigurationMode", "On");
// 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 - ...) **
// Disable the sequencer during configuration
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 **
// Disable the sequencer during configuration
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 **
// Disable the sequencer during configuration
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) **
// Disable the sequencer during configuration
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 ** */
/* 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);

您也可以使用 pylon Viewer 轻松设置参数。