0% found this document useful (1 vote)
170 views18 pages

PLC Programming Ladder Logic

The document discusses ladder logic and relay logic used in programmable logic controllers, including the functions of controllers, different types of control devices and switches, examples of ladder diagrams and programming, and an example programming logic for a conveyor system with a microswitch, bar code reader, stopper, robot, and machine.

Uploaded by

Packiyaraj BMS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (1 vote)
170 views18 pages

PLC Programming Ladder Logic

The document discusses ladder logic and relay logic used in programmable logic controllers, including the functions of controllers, different types of control devices and switches, examples of ladder diagrams and programming, and an example programming logic for a conveyor system with a microswitch, bar code reader, stopper, robot, and machine.

Uploaded by

Packiyaraj BMS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

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

No rma lly Ope n No rma lly Clo s e d

SPDT
P1
DPST
P2

Multiple Thro w Multiple P o le

Bre a k-be fo re -ma ke Ma ke -be fo re -bre a k


TYPES OF
SWITCHES
 Selector switches RATING:
 Pushbutton switches •24 Volts AC/DC
•48 Volts AC/DC
 Photoelectric •120 Volts AC/DC
switches •230 Volts AC/DC
•TTL level
 Limit Switches (Transistor-to-transistor
±5V)
 Proximity switches •Isolated Input
 Level switches
 Thumbwheel
switches
 Slide switches
RELAY
S
A switch whose operation is activated by an electromagnet is called a "relay"

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

Input PLC Output


A
01 01 02 20 11 C
B 02 12
20
03
20 11

External
switches

Stored program
PLC
Programming

 Ladder Diagram - most common


 Structure Text Programming (ST)
 Functional Block Programming (FB)
 Instruction List (IL)
 Sequential Function Chart (SFC)
AND and OR
LOGIC
PB1 PB2 R1

R1 = PB1.AND.PB2

AND PB3 PB4


R2
R2 = PB2.AND.~PB4

PB1 R1

R1 = PB1 .OR. PB2

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

RTO counting stop counting


a. Retentive on delay -(RTO)- resume
b. Retentive off delay -(RTF)-
RTF stop counting stop
c. Reset -(RST)-

Counter: RTO reach PR value, output ON


RTF reach PR value, output OFF

a. Counter up -(CTU)- PR value in 0.1 second


b. Counter down -(CTD)-
c. Counter reset -(CTR)-
SEQUENCE
R
Sequencers are used with machines or processes involving
repeating operating cycles which can be segmented into
steps.

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

id description state explanation


MSI microswitch 1 part arrive
R1 output to bar code reader 1 scan the part
C1 input from bar code reader 1 right part
R2 output robot 1 loading cycle
R3 output robot 1 unloading cycle
C2 input from robot 1 robot busy
R4 output to stopper 1 stopper up
C3 input from machine 1 machine busy
C4 input from machine 1 task complete
SOLUTION
Input
Outpu t
MS1 R1
01 11
C1 R2
02 12
C2 R3
03 13
C3 R4
04 14
C4 Pro grammable
05 Controlle r 15
PLC
Rung 1. If part arrives and no
part is stopped, trigger the
bar code reader.
Rung 2. If it is a right part,
11
01 14 activate the stopper.
Rung 3. If the stopper is up, the
02 14 machine is not busy and the
robot is not busy, load the
12
part onto the machine.
14 04 03
Rung 4. If the task is completed
and the robot is not busy,
05 03 13
unload the machine.

You might also like