9 -7 T IMER I NSTRUCTIONS

9 -7 T IMER I NSTRUCTIONS

PLCs provide several types of timer instructions. However, PLC manufac- turers may provide different definitions for each type of timer function offered. Table 9-4 presents a list of typical timer instructions.

Table 9-4. Timer instructions.

The function of the various timer instructions is essentially the same, differing only in the type of output provided. Figure 9-42 illustrates the two formats used for timers. A block format timer has one or two inputs, depending on the programmable controller. These inputs are called the control line and the

TMR Output 1

Control

Preset Register

Control

TMR

Time Base

Preset Reg

Output 2

Accumulated Reg

Enable/Reset

Accumulated

Time Base

Figure 9-42. (a) Block format and (b) ladder format timer instructions.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC Programming C HAPTER 3 Programming

Languages 9

enable/reset line . If the control line is TRUE (i.e., it has continuity) and the enable line is also TRUE, the block function will start timing. A ladder format timer generally has only one input, which is the control line. If the control line is ON, the timer will start timing.

Common to both timer formats is the use of a preset register to hold the preset value and an accumulated register to store the accumulated value. Some PLCs allow the user to enter a constant value directly into the timer to set the preset value. This particular value, however, must be entered into a predefined register for that specific timer address.

A timer’s time base is selectable depending on the PLC used (e.g., 0.01 sec,

0.1 sec, 1.0 sec, etc.). When the accumulated tick count equals the preset count, the timer executes its timing function and sets the output condition, which depends on the type of timer used (e.g., ON-delay energize, etc.).

It is important to note that when PLC timers replace hardwired timers, they replace the time-delay contacts associated with the timers, but not the instantaneous contacts that may be available from a hardwired timer. Figure 9-43 illustrates an example showing both time-delay and instantaneous

TMR1-1

TMR1-2

TMR2-1

Figure 9-43. Hardwired circuit with time-delay and instantaneous contacts.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC Programming C HAPTER 3 Programming

Languages 9

hardwired timer contacts. Timer TMR1 in line 1 has an instantaneous contact in line 2 (TMR1-1), which is used to seal PB1, and a time-delay contact (TMR1-2) in line 5. For this type of ladder logic translation into a PLC program, the user must “trap” the timer through interlocking, so that the instantaneous timer seal can be accomplished. Chapter 11 presents this type of programming example.

O N -D TON

E L AY E NERGIZE T IMER

An ON-delay energize timer (TON) output instruction either provides time- delayed action or measures the duration for which some event occurs. Once the rung has continuity, the timer begins counting time-based intervals (ticks) and counts down until the accumulated time equals the preset time. When these two values are equal, the timer energizes the output and closes the timed- out contact associated with the output (see Figure 9-44). The timed contact can be used throughout the program as either a normally open or normally closed contact. If logic continuity is lost before the timer times out, the timer resets the accumulated register to zero.

10 TON 100

Preset Register: Reg 1000 = 50 Accumulated Register: Reg 1001 = xx

Time Base:

Timer output 100 is energized 5 seconds after contact 10 closes.

Figure 9-44. ON-delay energize timer instruction.

TON