Iterate

Iterate 1:

Starts an inactive iteration or resumes an active iteration with automatic ring buffer wrapping. The method calls the base method and then calculates the physical nIndex based on nVirtualIndex using a modulo operation:

Syntax

METHOD Iterate : BOOL
VAR_INPUT
  nIncrement : DINT := 1;
END_VAR

Iterate 2: Inputs

Name

Type

Description

nIncrement

DINT

Iteration step size (positive = forward, negative = backward). Default: 1

Iterate 3:
  • nEntryCount must be greater than 0; otherwise, FALSE is returned.
  • On the first call, iteration starts with ring buffer wraparound enabled.
  • The method stops automatically once all entries have been iterated through.