|
Topic: DMD0081 REPEAT - Loop Until Condition is Non-Zero |
|
|
|
|
|
The Loop Until Condition is Non-Zero (REPEAT) instruction begins a Repeat/Until loop in which the rungs ladder logic instructions between the Repeat instruction and the UNTIL instruction will be executed until the ending Condition location is Non-Zero. The terminating condition is specified in the corresponding UNTIL instruction.
Repeat/Until loops can be nested, and there is no limit to how deep the nesting can go.
|
|
|
Note: All of the looping instructions are 'power-rail' instructions. Even though the instructions are displayed in the left-most column of the ladder diagram (the power rail), they are created in the right-most column of the ladder logic diagram (the output column). Creating these instructions in Do-more Designer is a bit counter-intuitive because the first step is to position the edit cursor in the output column of the ladder logic diagram (the far right) instead of positioning it against the power rail (the far left).
Note: The looping instructions are unconditional so they will run any time the code-block in which they reside is enabled. The preferred method for making them conditional is to place the loop in a Task code-block and use the Enable Task (ENTASK) instruction to run the loop whenever required.
|
|
Parameters:There are no parameters for this instruction.
|
|
|
|
|
Status Display:The REPEAT instruction will show the current .TimeSlice value of the Program or Task when status is ON.
|
|
|
|
|
See Also:
|
|
|
|
|
Rung Example:
|
|
|
|
|