Lab3 TIMER
Lab3 TIMER
I. OBJECTIVES
Understand Siemens s7-1200 TIMER
Be able to apply to some examples
II. INTRODUCTION
1. Timers
Timers are devices that count increments of time. Timers are represented by boxes in ladder
logic. When a timer receives an enable, the timer starts to time. The timer compares its current
time with the preset time. The output of the timer is a logic 0 as long as the current time is less
than the preset time. When the current time is greater than the preset time the timer output is a
logic 1. For S7-1200, there are 4 basic Timers: TP (Pulse generation), TON (ON Delay), TOFF
(OFF delay), TONR (Accumulating ON delay).
The time functions, which are discussed next slide, are referred to as IEC Time Function to
indicate that they are different from S7 300/400 Time Functions.
2. Time functions
2.1. Timer LAD/ FBD/SCL Categories
Categories
The pulse generation extends or shortens an input signal to the programmed duration. The
transition from 0 to 1 of IN will set the Q output for a programmed duration PT.
When the On-Delay timer (TON) receives an enable (logic 1) at its input (IN), a predetermined
amount of time (preset time - PT) passes before the timer bit (T-bit) turns on. The T-bit is a
logic function internal to the timer and is not shown on the symbol. The timer resets to the
starting time when the enabling input goes to logic 0.
The Off-Delay timer is used to delay an output off for a fixed period of time after the input
turns off. When the enabling bit turns on the timer bit turns on immediately and the value is set
to 0. When the input turns off, the timer counts until the preset time has elapsed before the
timer bit turns off.
The Retentive On-Delay timer (TONR) functions in a similar manner to the On-Delay timer
(TON). There is one difference. The Retentive On-Delay timer times as long as the enabling
input is on, but does not reset when the input goes off. This timer must be reset with a RESET
(R) instruction.
TON Change at IN to “FALSE” while functioning will reset and stop the
timer
Change at PT does not affect the operation of this timer
TOF Change at IN to “TRUE” while functioning will reset and stop the
timer
Change at PT does not affect the operation of this timer while
functioning but it does have effect when the timer is restored.
TONR Change at IN to “FALSE” while functioning will stop but not resetting
the timer. Then, change at IN to “TRUE” will let the timer recalculate
the time value from the accumulated time value
The light will turn on 5 seconds after the switch has been closed the second time;
Reset R can be added to reset the timer. If after 10 seconds the switch has been opened,
the timer can be reset by momentarily triggering this reset. As a result, the timer will be
reset to 0 and begin timing from 0 when the switch is closed again.
Figure 5
Figure 6
Experiment 6. 3 Motors
Consider the following 3 motors: Oil Motor, Auxiliary Motor, and Main Motor. Known that,
the 3 Motors run sequentially with delay. In particular,
Oil motor is started immediately when START is pressed.
The Main motor will be started after a 10 seconds delay and then the Auxiliary Motor
after a 5 seconds delay.
Stopping all motors immediately when STOP is pressed.
Figure 7
Write a PLC program to describe the operation of the 3 motors.
Figure 8