S5-115U Manual
Starting a Timer
In the PLC, timers run asynchronously to program scanning. The time that has been set can run out
during a program scanning cycle. It is evaluated by the next time scan. In the worst case, an entire
program scanning cycle can go by before this evaluation. Consequently, timers should not
activate themselves.
Example:
Schematic Representation
Program
L
KT 100.0
SP T
17
1sec. - n · t
A
T
17
=
Q 8.4
n:
number of program scanning cycles
t
:
program scan time
p
Except for "Reset timer," all timer operations are started only on an edge of the RLO. (The RLO
alternates between "0" and "1".)
After being started, the loaded time is decremented in units corresponding to the time base until
it reaches zero.
If there is an edge change while the timer is running, the timer is reset to its initial value and
restarted.
The signal state of a timer can be interrogated with boolean logic operations.
EWA 4NEB 811 6130-02b
Signal from
The schematic shows the "n
timer 17
processing cycle since timer T 17
started. Although the timer ran out
0
1
shortly after the statement "=Q 8.4",
output Q 8.4 remains set. The change is not
considered until the next program
scanning cycle.
p
*
KT 100.0 is equal to 1 sec.
STEP 5 Operations
Explanation
th
+ 1"
was
*
8-19