Iterate

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:
- If buffer is full (_IsFull_ = TRUE): physical index with wrapping
- Otherwise: direct access to the virtual index
Syntax
METHOD Iterate : BOOL
VAR_INPUT
nIncrement : DINT := 1;
END_VAR
Inputs
Name | Type | Description |
|---|---|---|
nIncrement | DINT | Iteration step size (positive = forward, negative = backward). Default: 1 |
![]() |
|
