Hardware manual

Impact Reference Guide Counted Loop
3-207 Datalogic Automation Inc.
NOTE: The called task should have the Trigger Event Type set to None.
Counted Loop
In the Logic Drawer
The Counted Loop tool loops a user-specified number of times. The starting and step-increment values may
also be defined. Any tool may be used within the loop.
Counter
In the Logic Drawer
Each time the Counter tool runs it adds the Increment value to the Count value. The Increment value can be
negative. If the Count value is equal to the Limit value, the Success value is set to False. When the Count
value equals the Rollover Value, the Count value is set equal to the Reset value.
If the Count value is set to a value less than the Limit with a Reset tool or by other means, the Success value
immediately becomes True. When the Reset button is pressed, the Count value is set to the Reset value.
The table below shows an example using a positive increment value. Starting values: Increment = 1, Reset =
0, Rollover = 10, Limit = 7, and Success = True.
Input Name What it is
repeatCount The number of times the loop should repeat; if zero, it does not loop
startVal The starting value for the loop (may be positive or negative)
stepVal The incremental value of each step in the loop (may be positive or nega-
tive)
Output Name What it is
currentCount The number of times the loop has repeated
currentValue currentCount times stepVal plus startVal
Number of
times tool run
Count Success Operation Performed
0 0 True None
1 1 True Count + Increment
2 2 True Count + Increment
3 3 True Count + Increment
4 4 True Count + Increment
5 5 True Count + Increment
6 6 True Count + Increment