Lec3 PLC
Lec3 PLC
PLC Course
مقرر الحاكمات المنطقية المبرمجة
Lec 3
Relay Logic Diagram
&
PLC Ladder Diagram
What is the difference between relay logic and
ladder logic?
Relay logic is a hard wired control system using instrumentation, switches,
timers, relays, contactors, motors and actuators.
Traditional machine and process automation was accomplished using relay
logic.
Automating a machine using relay logic requires a mass of wiring and
magnitude of devices to perform even the simplest of tasks.
The advent of the microprocessor meant that relay logic control functionality
could be programmed and stored in a computer. In the late 1960’s some
really brainy people realized this and pressed ahead to create a device called
a Programmable Logic Controller (PLC).
So essentially what we are doing is getting a mass of relays and wires and
replacing them with a tiny box that has awesome computing power.
What is the difference between relay logic and
ladder logic?
In hard wired control systems, relays are used.
For example: In Electrical-control, the wiring of control elements such as
sensors, solenoids, counters etc. are through relays control. Such relay
controlled systems are also called as hard-wired control system because any
modification in control program involves rewiring of the circuit.
Therefore, hardwired controls are difficult to modify when production
requirement changes regularly.
Hard-wired control systems are difficult to maintain because any small
problem in design could be a major problem in terms of tracing and
rewiring. Hard wired control systems consists of three division
1. Input section – Consists of push –buttons, switches and sensors. They
transfer signals to the processing section
2. Processing section – Consists of relay coils and contacts. They
determined the relationship between the inputs received and outputs required
3. Output section – Consists of solenoids, lamps, and contactor coils etc. The
processed signals are transferred to this section.
What is the difference between relay logic and
ladder logic?
PLC systems consists of three division
1. Input section – Consists of push –buttons, switches and sensors which are
connected to specific input addresses in the program. They transfer address
information to the processing section
2. Processing section – The microprocessor receives the input signals from
input sections and executes the information (called instructions) in the
software program and sends the processed signals to output section
3. Output section – Takes the signal from processing section and modify the
signal from the processor to operate output devices connected to specific
output addresses
PLC I/O Physical Connection
Current in the below relay logic diagram can flow to the electric motor or motor
starter (turn on the Motor) when all three input switches are closed.
Inputs
Output
Rung 1
When the pushbutton switch (PB) is pressed, the relay coil (CR) is energized and its
contact CR is closed.
Closing the contact CR causes the solenoid (SOL) to be energized. When the
normally closed (NC) limit switch (LS1) is opened, the relay coil (CR) is
de-energized and its contact CR is opened.
Rung 1
Rung 2
Normally open (NO) or normally closed (NC) contacts are used for inputs
while coils of control relays are used for outputs.
The contact symbol is the same for any inputs switches (toggle, push button,
limit, liquid level, relay contact).
The coil symbol is the same for any outputs (Solenoid, Lamp, Motor,
Control relay).
The PLC power supply will be the voltage between the two vertical lines
(rails or bars), labeled L1 and L2. In general, L1 represents the supply
terminal and L2 represents the common (neutral) terminal.
(2) PLC Ladder Diagram (Ladder diagram)
Any number of inputs and only one output appear in a rung of the ladder
diagram.
power flows through any rung from left to right such that there exist a
continuous path (logic continuity = rung is true) through this rung.
Pilot Lamp
EX1:
Rung 1
Rung 1
L1 L2
EX3:
An output of a given rung will be energized if any left to right path has
all contacts closed (continuity path).
4) Input:
The contact symbol can represent input signals sent from connected
inputs (like digital inputs switches), or contacts from internal outputs, or
contacts from connected outputs (like contacts of a control relay CR).
5) Contact addresses:
7) Logic format:
Y1 = A B
Y2 = A B C
(2) Logical OR Operation in Ladder Diagram
For Example:
Y=A+B+C
Rung 1
(3) Logical NOT Operation in Ladder Diagram
For Example:
Y1 = A
Y2 = A' Rung 1
Rung 2
Example1:
Y = (A + C ) B
Solution
L1 L2
Rung 1
Example2:
Y = (A B ) + C
Solution Z = Y'
Rung 1
Rung 2
Example 3:
Y1 = (A B +D' E ) C
Y2 = F (G +K') H
Solution
Y1 = (A B + D' E ) C
Y2 = F (G +K' ) H
Rung 1
Rung 2
Example 4:
Y = A B C' + D + E'
Rung 1
PLC Ladder Diagram
Start/Stop Circuit (Seal-in Circuit)
(Latch / Unlatch Circuit)
A seal-in circuit is a method of maintaining current flow after a momentary switch
has been pressed and released (push button switch) .
The stop button is normally closed and the start button is normally open. There is
one relay in the circuit consisting of both a relay coil and a normally open relay
contact (called seal-in contact or auxiliary contact or latch contact).
When the start button is pushed, it allows current to flow through the relay coil and
forces the relay contact to become closed. Once the relay contact is closed there is
an alternate path around the start button for current to flow so that when the button
returns to its open position the current can flow through the contact and around the
stop switch. When the stop button is pressed it interrupts (disconnects) current
flow to the circuit and must be restarted again with the start button.
Start/Stop Circuit (Seal-in Circuit)
(a) (b)
The start/stop circuit: (a) Relay logic diagram (b) PLC Ladder Diagram
CR 1
Contact
CR 1
Coil
CR 1
CR 1
CR 1
Contact
CR 1
Coil
CR 1
CR 1
CR 1
Contact
CR 1
Coil
CR 1
CR 1
CR 1
Contact
CR 1
Coil
CR 1
CR 1
CR 1
Contact
CR 1
Coil
CR 1
CR 1
Start/Stop Circuit Operation
Start Stop CR
CR
CR CR
CR CR
Start Stop CR
CR
CR CR
CR CR
(3) Start pushbutton switch is released (4) Stop pushbutton switch is pressed
Interlock circuits
Interlocks (overlaps) can prohibit two or more outputs from energizing
at the same time under a certain condition. Example: M1 should not
energize if M2 is energized (and vice versa).
If there exist interlock between two (or more) rungs and the two rungs
are true at the same time then the output of first rung only is energized.
Start/Stop Circuit - Seal Variations
In practice several start and/or several stop buttons can be used in a
process.
The term internal (or auxiliary) relay is used for what can be
considered as internal relay in PLC. It behaves like relays with their
associated contacts, but in reality they are not actual relays as they
are simulated by the software of the PLC (virtual relays).
They are often used when there are programs with multiple input
conditions.
CR , CR1 and CR2 are Internal Relays
Ladder Diagram Programming Restrictions
Not allowed
Rung 1
Rung 2
Not allowed
Programming restrictions
Not allowed
Programming restrictions
allowed
THE END