0% found this document useful (0 votes)
40 views56 pages

Module 3

Module 3 covers PLC timers and counters, defining timers as devices that introduce time delays in circuits, with classifications including electromechanical, electronic, and PLC timers. It details various timer types such as ON-delay and OFF-delay timers, retentive and non-retentive timers, and discusses the operation and parameters of PLC counters, including count up (CTU) and count down (CTD) instructions. Additionally, the module includes practical problems for creating ladder diagrams for motor control systems using timers and counters.

Uploaded by

kobop22670
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views56 pages

Module 3

Module 3 covers PLC timers and counters, defining timers as devices that introduce time delays in circuits, with classifications including electromechanical, electronic, and PLC timers. It details various timer types such as ON-delay and OFF-delay timers, retentive and non-retentive timers, and discusses the operation and parameters of PLC counters, including count up (CTU) and count down (CTD) instructions. Additionally, the module includes practical problems for creating ladder diagrams for motor control systems using timers and counters.

Uploaded by

kobop22670
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Module 3

PLC TIMERS AND COUNTERS


Definition and Classification of a
Timer
 A timer is a device that introduces a time delay in a circuit or a system
during its ON or OFF condition.
 Timers can be classified as follows:
(i) Electromechanical timers (ii) Electronic timers (iii) PLC timers.
 An electromechanical timer uses an oil dashpot or a spring to introduce a
time delay as soon as an electrical signal initiates it.
 An electronic timer uses an electronic circuit for incorporating a time delay
and in a PLC timer, the time delay is introduced by programming.
Syllabus

 PLC Timers and Counters: On Delay and OFF delay timers, Timer-on Delay,
 Timer off delay, Retentive and non-retentive timers. Format of a timer
instruction.
 PLC Counter: Operation of PLC Counter, Counter Parameters, Counters
 Instructions Overview Count up (CTU) Countdown (CTD).
 Advanced instructions: Introduction: Comparison instructions, discussions
on comparison instructions, “EQUAL” or “EQU” instruction, “NOT EQUAL” or
“NEQ” instruction, “LESS THAN” or “LESS” instruction, “LESS THANOR
EQUAL’ or “LEQ” instruction, GREATER THAN” OR “GRT” instruction,
 “GREATER THAN OR EQUAL TO” or “GRO” instruction, “MASKED
COMPARISON FOR EQUAL” or “MEQ” instruction, “LIMIT TEST” or “LIM”
instruction.
Characteristics of a PLC Timer
 The contacts on the left side of the timer function block are the timer
enable contacts.
 When they are closed, power passes to the left terminal of the timer, its
clock is enabled and it starts timing.
 When they are open, power stops flowing through this terminal, and the
timer stops functioning.
 Timer function block has three output contacts.
 When the timer is timed out, Done Bit (DN) is set.
 Enable bit follows the input enable contact status.
 If the enable contact is true then output Enable Bit (EN) is true.
 The Timer Timing (TT) bit is set when the timer is operating.
Functions in a Timer
 One outstanding feature of programmable timer is the variety of time
base available. Most PLCs offer two or three time bases. The most
common time bases are 0.01 sec, 0.1 sec and 1 sec. intervals.
 Accumulator value (ACC) - This is the time that has elapsed, since
the timer was last reset.
 When enabled, a timer updates this continually.
 Preset value (PRF) - This specifies the value that the timer must
reach before the controller sets the done bit.
 The programmer determines the preset time.
 When the accumulator value becomes equal to or greater than the
preset value, the timer stops operating and the done bit is set.
 This bit can be used to control an output device.
 Preset and accumulator values for timers range from 0 to
+32, 767.
 If a timer preset on accumulator value is a negative
number, a run time error occurs.
Resetting - Retentive and Non-
retentive
 When the accumulative value of a timer is 0, it is said to be in the reset
condition.
 When the timer’s accumulative values are reset to zero each time the input
enable contact is open, it is said to be a non-retentive timer.
 The timer does not retain or remember the accumulative value when the
enabled contacts are opened.
 Retentive timer does not reset its accumulative value to zero when its
enabled contacts are opened.
 Instead, it remembers or retains its accumulative value. Opening its enable
contacts only stops the timer from running.
 In order to reset the retentive timer a reset —instruction is used.
Classification of a PLC
Timer
ON-Delay and OFF-Delay
Timers
 As shown in Fig. 3.2, there are two types of delay timers i.e. ON
Delay Timer (TON or TDE) and OFF Delay Timer (TOF or
TDD).
 If the timer contact is made ON after lapse of a certain time counted
from the instant of energisation of the timer coil, that timer is called
an ON delay timer.
 If the timer contact is made OFF after lapse of a certain time counted
from the instant of de-energisation of the timer coil, that timer is
called an OFF delay timer.
Timer ON-Delay
 This instruction is used to delay turning an output on or off. The TON
instruction begins to count time base intervals when the rung condition
becomes true.
 As long as the rung condition remains true the timer increments its
accumulator value, over each scan until reaches the preset value.
 The accumulator value is reset when the rung condition becomes false,
regardless of whether the timer has timed out.
 The schematic diagram of such a timer is shown in Fig. 3.3, and the
timer functions are shown in Table 3.1.
Timer OFF-Delay
 This instruction is used to delay turning an output on or off. The
TOF instruction begins to count time base intervals when the rung
condition makes a true-to-false transition.

 As long as the rung condition remains false the timer increments its
accumulator value over each scan until it reaches the preset value.

 The controller resets the accumulated value when the rung condition
becomes true regardless of whether the timer has timed out.

 A schematic diagram of such a timer is, shown in Fig. 3.4, and. the
timer functions are shown in Table 3.2.
Retentive and Non-Retentive
Timers
 The Retentive Time.(RTO) instruction is used to turn an output on or
off after its timer has been on for a preset time interval.
 The RTO instruction is a retentive instruction that lets the timer stop
and start without resetting the accumulated value.
 The RTO instruction retains its accumulated value when any of the
following occurs:
 (i) The rung condition is false
 (ii) The controller loses power
 (iii) A fault occurs
 To reset the retentive timer accumulated value and status bit after the
RTO rung becomes false, a reset (RES) program is carried out.
 RESET (RES) - When the reset instruction is executed, it resets the
data having the same address as the RES instruction.

 By using Reset instruction,

 Accumulator value is reset to 0

 DN bit is reset

 TT bit is reset

 EN bit is reset
Function block
 Each timer address is made up of a 3-word element.
Word ‘0’ is the control word, Word ‘1’ stores the preset
value and Word ‘2’ stores the accumulated value.
 EN - timer enable bit
 TT - timer timing bit
 DN - timer done bit
 EN; TT, DN are bit storage.

 EN is stored in bit 15 Word ‘0’, TT is bit 14 and DN is bit 13 of


Word 0.

 0-7 bits of Word 0 are the internal bits.

 Each preset value (PRE) and accumulated —

 value (ACC) are 16 bit Words stored in Word 1 and Word 2 of


the timer file.
Format of Timer Instructions
 The format of timer instructions along with the
meaning of different terms is shown in Table 3.5.
 Problem 3.1: Draw a ladder diagram for a two-motor system
having the following conditions:
 (1) Starting push button starts motor -1
 (2) After 10 seconds, motor —2 is ON
 (3) Stopping the switch stops motor 1 and 2, Time base = 1 sec.
 Problem 3.2: Draw a ladder diagram for a two-
motor system having the following conditions:
 The start switch Starts motors 1 and 2. The stop
switch stops motor 1 first, after 15 seconds Motor
2 stops.
 Problem 3.3: Draw a ladder diagram for a two-motor system
having the following conditions:
 The start switch Starts motors 1 and 10 second later motor 2
starts. The stop switch stops motor 1 first and 15 seconds later
Motor 2 stops.
 Input Output
 Start = I:0/1 M1 = 0:0/1
 Stop = I:0/2 M1 = 0:0/2
 Problem 3.4: Draw a ladder diagram for a three-motor system
having the following conditions:
 Motor 2 (M2) can start 5 seconds after Motor 1 (M1) starts, when
M2 is running, Motor 3 (M3) can be started.
 When M2 is turned off, M3 is off. When M1 is turned off, both M2
and M3 stop.
 Problem 3.5: Draw a ladder diagram for a three-motor system
having the following conditions: Motor 1 starts as soon as the
start switch is ON, after 10 seconds M1 goes off and Motor (M2)
starts. After 5 seconds M2 goes off and M3 starts. After 10
seconds M3 goes off, M1 starts and the cycle is repeated.
 Problem 3.6: Draw a ladder diagram for a three-motor
system having the following conditions:
 Motor 1 (M1) starts as soon as the start switch is on, after
10 seconds, M1 goes off and M2 starts. After 5 seconds, M2
goes off and M3 comes on. After 10 s ,M3 goes off and M2
comes on; and after 5 seconds, M2 goes off and M1 comes
on, and the cycle is repeated.
 To develop the ladder diagram, the following inputs and
outputs are considered.
 Input
 Start = 1:0/1
 Stop = 1:0/2
 Output
 M1 = O:0/1; M2 = O:0/2; M3 = O:0/3; System=O:0/4
 Problem 3.7: Draw a ladder diagram for an agitator-motor
system having the following conditions:
 Agitator starts; After 5 seconds the pump can be started,
when the pump is switched off, the agitator also stops; when
the agitator goes off, it cannot be started for 3 seconds.
 To develop the ladder diagram, the following inputs and
outputs are considered.
 Input: Start Switch = 1:0/1
 Agitator on = I:0/10 ; Agitator off = I:0/11 , pump on = I:0/12
 pump off = I:0/13
 Output:
 Agitator=O:0/1, pump=O:0/2
 Problem 3.8: Blinking indicator lights are used quite extensively
in industry. Design a circuit in which two lights are flashed
alternately every 5 seconds.
 To develop the ladder diagram, the following inputs and
outputs are considered.
 Input :
 Start = I:0/1
 Output:
 Light 1 = O:0/1; Light 2 = O:0/2
PLC Counter
 In the manufacturing process industry, it is always necessary to count the
number of items produced, and the number of operations performed (either
of one particular operation or a combined number of a few operations).

 In such operations, counters are used.

 An electromechanical counter comprises solenoids, springs, lever


mechanisms etc. for counting an action and recording it.

 This has the disadvantage that, failure of any part of the counter leads to
errors in its readings.

 On the other hand, a counter in a PLC utilises a sensor to count operations,


which is processed by software execution in the PLC.

 Thus, the failure rate is reduced and the accuracy level is increased in a
PLC counter.

 The ‘range of count’ of a PLC counter is much larger than that of an


electromechanical counter.
Operation of a PLC
Counter
The counter instructions operate in a similar manner to those of
the timer instructions in the PLC.

 The major difference between the counter and the timer is that
timer instructions will continually increment its accumulative value
at a rate determined by the time base when the enable contact is
on.

 On the other hand, the counter must see a complete contact


transition from 0 to 1 each time it increments the accumulative
value.

 This means that the contact must return to its zero state before it
can have a transition for a second time.

 In a counter, the contact can stay closed for any amount of time
after a transition has taken place.
Counter Parameters
 In general, a PLC counter has two : parameters:
 (a) The accumulator value (ACC) and (b) The Pre-set value
(PRE).
 (a) The accumulator value (ACC) is the number of false-to-true
transitions that have occurred since the counter was last reset,
 (b) The preset value (PRE) specifies the value that the counter
must reach, before the controller sets the done bit.
 When the accumulator value becomes equal to or greater than
the preset value, the done status bit is set.
 This can be used to control an output device.
 Preset and accumulated values for counters range from -32,768
to +32,767 .
 They are stored as signed integers.
 Negative values are stored as 2’s compliment form.
Overview of Counter
Instructions:
 Each counter address is made up of a 3-word data file
element.
 Word ‘0’ is the control word, continuing the status bits of
the instruction, Word 1 is the preset value and Word 2 is
the accumulated value.
Count Up (CTU)
 The CTU is an instruction that counts false-to-true rung
transitions.
 Rung Transition be caused by events occurring in the program
(from internal logic or by external field):
 When the rung condition for a CTU instruction has made a false
to true transition
 The accumulated value is incremented by one count, provided
that, the rung containing the CTU instruction is evaluated
between these transitions.
 The ability of the counter to detect a false to-true transition
depends on the speed (frequency) of the incoming signal.
 The on and off duration of an incoming signal must not be
faster than the scan time.
Count Down (CTD)
 The CTD is a retentive output instruction that counts false to true
rung transitions.
 When the rung condition for a CTD instruction has made a false-
to-true transition, the accumulated value is decremented by one
count, provided that the rung containing the CTD instruction is
evaluated between these transitions.
 The accumulated counts are retained when the rung condition
again becomes false.
 The accumulated count is retained until cleared by a reset (RES)
instruction that has the same address as the counter reset.
 The function block of a count-down CTD is shown in Fig. 3.15.
 Draw a ladder diagram for a box packaging
system having the following conditions.
 Five boxes are stacked at a time and then bound
with a wrapper.
 The input and output are as follows:
 (i) Box present signal = I:0/1
 (ii) Wrapper machine relay = O:0/1
 (iii) Go to step 1
 Based on the above inputs and outputs, the
ladder diagram has been developed as shown in
Fig. 3.16.
 Problem 3.10: Design a ladder diagram that will control a
stepper motor so that it moves 10 steps forward, waits for 20
seconds, and then cause the motor to move 10 steps in the
reverse direction.
 The inputs and outputs can be arrayed as follows:
 Start Switch = I:0/I; For forward/reverse motion = O:0/2
 For stepper pulse out = O:0/1
 [The stepper input pulse is 0.5 second ON and 0.5 second OFF]
Advanced Instructions
 Wide range of advanced instructions is provided in PLCs, including
the complete set of mathematical functions (addition, subtraction,
multiplication, division and trigonometric functions).

 The numbers used in these applications can also have several


different formats such as integers (whole numbers), floating point
decimals, exponential numbers, binary, hexadecimal and binary
coded decimals.

 Each of the number formats can be converted to other formats.

 Another set of functions provided in these PLCs is the set of


compare functions, including equal to, less than, greater than and
their complements.

 The PLCs also provide a wide range of file instructions


 The various instructions are classified into the following
groups:
 (a) Comparison instructions
 (b) Instructions for addressing data files
 (c) Data movement instructions
 (d) Logical instructions
 (e) Mathematical instructions
 (f) Special mathematical instructions
 (g) Data handling instructions
 (h) Programme flow control instructions
Discussions on
Comparison Instructions
 “EQUAL” or “EQU” Instruction

 “NOT EQUAL” or “NEQ” Instruction


 “LESS THAN” or “LES” Instruction

 LESS THAN OR EQUAL OR LEQ Instruction


 “GREATER THAN” or “GRT” Instruction

 “GREATER THAN OR EQUAL TO” or GRQ Instruction


 MASKED COMPARISION FOR EQUAL or MEQ Instruction

 “LIMIT TEST” or “LIM” Instruction

You might also like