Page 155 - Programmable Logic Controllers, Fifth Edition
P. 155
File type
TON
Timer number
TIMER ON DELAY
T4:2 Timer T4:0 EN
Time base
1.0
Preset 15 DN
Accumulated 0
File number 15 14 13
4 Word 0 EN TT DN Figure 7-13 On-delay timer instruction.
Timers
Word 1 Preset value
Word 2 Accumulated value
Figure 7-13 shows an example of the on-delay timer in-
struction used as part of the Allen-Bradley SLC 500 control-
Figure 7-12 SLC 500 timer file.
ler instruction sets. The information to be entered includes:
Timer number—This number must come from the
up to 256 timer elements. Addresses for timer file 4, timer timer file. In the example shown, the timer number is
element number 2 (T4:2), are listed below. T4:0, which represents timer file 4, timer 0 in that file.
T4 = timer file 4 The timer address must be unique for this timer and
:2 = timer element number 2 (0–255 timer elements may not be used for any other timer.
per file) Time base—The time base (which is always expressed
T4:2/DN is the address for the done bit of the timer. in seconds) may be either 1.0 or 0.01 s. In the example
T4:2/TT is the address for the timer-timing bit of the shown, the time base is 1.0 s.
timer. Preset value—In the example shown, the preset value
T4:2/EN is the address for the enable bit of the timer. is 15. The timer preset value can range from 0 through
32,767.
The control word uses the following three control Accumulated value—In the example shown, the ac-
bits: cumulated value is 0. The timer’s accumulated value
Enable (EN) bit—The enable bit is true (has a status normally is entered as 0, although it is possible to
of 1) whenever the timer instruction is true. When the enter a value from 0 through 32,767. Regardless of the
timer instruction is false, the enable bit is false (has a value that is preloaded, the timer value will become 0
status of 0). whenever the timer is reset.
Timer-timing (TT) bit—The timer-timing bit is true The timer instruction for the SLC 500 and ControlLogix
whenever the accumulated value of the timer is chang- 5000 processors operates in exactly the same manner.
ing, which means the timer is timing. When the timer Figure 7-14 shows the timer selection toolbar, on-delay
is not timing, the accumulated value is not changing, timer instruction, and expanded timer structure for a
so the timer-timing bit is false. ControlLogix controller.
Done (DN) bit—The done bit changes state whenever
the accumulated value reaches the preset value. Its
state depends on the type of timer being used. TON TOFRTO CTU CTD RES
The preset value (PRE) word is the set point of the Favorites Add-On Alarms Bit Timer/Counter
timer, that is, the value up to which the timer will time.
The preset word has a range of 0 through 32,767 and is Input side of rung TON
stored in binary form. The preset will not store a negative TIMER ON DELAY ? EN
Timer
number. Timer tag name Preset ? DN
The accumulated value (ACC) word is the value that in- Example: Pump_Timer Accum ?
crements as the timer is timing. The accumulated value will
stop incrementing when its value reaches the preset value. Name Data Type Style Description
–
Timer
Pump_Motor
Delay before starting motor
The timer instruction also requires that you enter a time + Motor_Delay.PRE DINT Decimal
base, which is either 1.0 or 0.01 s. The actual preset time + Motor_Delay.ACC DINT Decimal
interval is the time base multiplied by the value stored Motor_Delay.EN BOOL Decimal
in the timer’s preset word. The actual accumulated time Motor_Delay.TT BOOL Decimal
BOOL
Motor_Delay.DN
Decimal
interval is the time base multiplied by the value stored in
the timer’s accumulated word. Figure 7-14 ControlLogix timer instruction.
136 Chapter 7 Programming Timers
pet73842_ch07_131-155.indd 136 05/11/15 4:21 PM