Iterate

Starts an inactive iteration or resumes an active iteration. On the first call with bIsActive = FALSE, the iteration is initialized with the passed nIncrement. On subsequent calls, the iteration is advanced by the specified step size. The method stops automatically when the iteration limits are reached.
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 |
![]() | If nIncrement = 0, an error message is generated and the method returns FALSE |
