PLC Programming Ladder Logic
PLC Programming Ladder Logic
Prepared by
Gagandeep
FUNCTIONS OF
CONTROLLERS
1) on-off control,
2) sequential control,
3) feedback control, and
4) motion control.
CONTROL
DEVICES
1) mechanical control - cam, governor, etc.,
2) pneumatic control - compressed air, valves,etc.
3) electromechanical control - switches, relays, a
timer, counters, etc,
4) electronics control - similar to
electromechanical control, except uses
electronic switches.
5) computer control.
SWITCHE
S
No n-lo c king Lo c king
SPDT
P1
DPST
P2
contact
coil
input
Relay coil
R1
Output contact R1
AN EXAMPLE OF RELAY
For aLOGIC
process control, it is desired to have the process start (by turning on a
motor) five seconds after a part touched a limit switch. The process is
terminated automatically when the finished part touches a second limit switch.
An emergency switch will stop the process any time when it is pushed.
L1
LS1 PB1 LS2 R1
R1
TIMER
R1 R2
PB1
LS1 LS2
PR=5
TIMER
5
Motor
R2
R1
LADDER
DIAGRAM
A ladder diagram (also called contact symbology) is a means of graphically
representing the logic required in a relay logic system.
Rail
start emergency stop
PB1 PB2
R1
Rung R1
R1
A
PLC WIRING
DIAGRAM
External
switches
Stored program
PLC
Programming
R1 = PB1.AND.PB2
PB1 R1
OR PB2
COMBINED AND &
OR
R1 = PB1 .OR. (PB2 .AND. PB3)
PB1 R1
PB2 pb3
RELAY
A Relay consists of two parts, the coil and the contact(s).
Contacts:
a. Normally open -| |-
b. Normally closed -|/|-
c. Positive transition sensing -|P|-
d. Negative transition sensing -|N|-
()
Coil:
a. Coil -( )-
b. negative coil -(/)-
c. Set Coil -(S)-
d. Reset Coil -(R)-
Relay
(continue)
Coil:
e. Retentive memory Coil -(M)-
f. Set retentive memory Coil -(SM)-
g. Reset retentive memory Coil -(RM)-
h. Positive Transition-sensing Coil -(P)-
h. Negative Transition-sensing Coil -(N)-
(set coil latches the state, reset coil deenergize the set coil.
retentive coil retain the state after power failure.)
TIMERS AND
COUNTERS Input
Timers: True False True
Output
Step A B C Dwell time
1 ON OFF OFF 5 sec.
2 ON ON OFF 10 sec.
3 OFF OFF ON 3 sec.
4 OFF ON OFF 9 sec.
PROGRAMMING
EXAMPLE 1 microswitch
Bar code re ader
Stopper
Part Conveyor
Robot
Machine