0% found this document useful (0 votes)
20 views60 pages

Lec3 PLC

The document discusses the differences between relay logic and ladder logic in programmable logic controllers (PLCs). It explains that relay logic is a hardwired control system requiring extensive wiring and is difficult to modify, while ladder logic utilizes microprocessors for programming and offers easier modifications. The document also covers the structure of both systems, including their input, processing, and output sections, along with examples of ladder diagrams and programming guidelines.

Uploaded by

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

Lec3 PLC

The document discusses the differences between relay logic and ladder logic in programmable logic controllers (PLCs). It explains that relay logic is a hardwired control system requiring extensive wiring and is difficult to modify, while ladder logic utilizes microprocessors for programming and offers easier modifications. The document also covers the structure of both systems, including their input, processing, and output sections, along with examples of ladder diagrams and programming guidelines.

Uploaded by

badwymmd15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

‫ميحرلا نمحرلا هللا‬ ‫بسم‬

‫‪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.

 Some of the other problems with implementing relay logic are:


 Requires a lot of switchboard space.

 Installation is very labor intensive.

 Trouble shooting is extremely difficult.

 Modifications to the control functionality are complicated.


What is the difference between relay logic and
ladder logic?

 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).

 Relay logic in a PLC is the method of formulating logical expressions in


order to automate machinery and processes in industrial applications. The
programming language that is used to create relay logic in a PLC is called
Ladder Logic.
What is the difference between relay logic and
ladder logic?
 The big difference between relay logic and ladder logic is that relay logic
needs to hard wire each and every control circuit for every single control
function. Whereas ladder logic uses the assistance of a microprocessor based
device called a Programmable Logic Controller (PLC).

 The difference between a PLC and relay logic is that a PLC is a


programmable device whereas relay logic is a network of hardwired
electrical devices. Both a PLC and relay logic can perform logical
computation, but a PLC does it using a microprocessor and relay logic does
it using electric circuits.

 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

A continuous path is required in a rung to


flow power from left to right (rung is true)

Simple Relay Logic diagram


 The following figure illustrates how a relay coil and contacts of a control relay
(CR) are used in a relay logic diagram to control a solenoid.

 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.

 Opening the CR contact causes the solenoid (SOL) to be de-energized.

Rung 1

Rung 2

Use of a relay coil and contact in


the relay logic diagram
Symbols used in Relay Logic Diagram
Temperature Switch
(NO)
(2) PLC Ladder Diagram (Ladder diagram)
 Ladder diagram is a graphical programming method shows how to control
outputs and perform functional operations based on input conditions.

 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)

 Ladder diagram uses rungs (one or more) to accomplish the control of


outputs based on input conditions.

 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

Relay Logic Ladder Diagram

Rung 1

A continuous path is required in a rung to


flow power from left to right (rung is true)

PLC Ladder Diagram


EX2:

L1 L2
EX3:

Relay Logic Ladder Diagram

PLC Ladder Diagram


Symbols used in Ladder Diagram
Guidelines For Using Symbols
In PLC Ladder Diagram
Guidelines For Using Symbols In PLC Ladder Diagram

1) Normally Open Contact:

When evaluated by the program, this symbol is examined for a 1 to close


the contact; therefore, the signal referenced by the symbol must be ON,
CLOSED, activated, high, …. etc. (it is called examine-ON instruction)

2) Normally Closed Contact:

When evaluated by the program, this symbol is examined for a 0 to keep


the contact closed; thus, the signal referenced by the symbol must be OFF,
OPEN, deactivated, low, ….. etc. (it is called examine-OFF instruction)
3) Output:

 An output of a given rung will be energized if any left to right path has
all contacts closed (continuity path).

 An output can control either a connected device or an internal output


used exclusively within the program.

 An internal output does not control a field device. Rather, it provides


interlocking functions within the PLC.

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:

Each program symbol is referenced by an address. If the symbol refers to


a connected input/output device, then the address is determined by the point
where the input/output device is connected. The same thing is done for the
outputs.

6) Repeated use of contacts:

Contacts of a given input, output, or internal output can be used throughout


the program as many times as required.

7) Logic format:

Contacts can be programmed in series or in parallel, depending on the


required control logic for the output. The number of series contacts or
parallel branches allowed in a rung depends on the PLC type.
Basic Logic Operations in
Ladder Diagram
(1) Logical AND Operation in Ladder Diagram

 The logical AND function is constructed by series combinations (two or


more) of a normally opened or closed contacts. These contacts are used to
represent input signals sent from connected inputs (like digital inputs
switches), or contacts from internal outputs, or contacts from connected
outputs (like contacts of control relay CR).
L1 L2
For Example:

 Y1 = A B

 Y2 = A B C
(2) Logical OR Operation in Ladder Diagram

 The logical OR function is constructed by parallel combinations of a


normally opened or closed contacts.

For Example:

 Y=A+B+C
Rung 1
(3) Logical NOT Operation in Ladder Diagram

 The logical NOT function is constructed by referencing the input signal


with a normally closed contact.

For Example:

 Y1 = A

 Y2 = A' Rung 1

Rung 2
Example1:

 Draw the ladder diagram to implement the following logic expression:

Y = (A + C ) B
Solution
L1 L2

Rung 1
Example2:

 Draw the ladder diagram to implement the following logic expression:

Y = (A B ) + C

Solution Z = Y'

Rung 1

Rung 2
Example 3:

 Draw the ladder diagram to implement the following logic expression:

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:

 Draw the equivalent ladder diagram of the following logic circuit:


Solution

The Boolean logic expression is:

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)

CR contact is called auxiliary contact or seal-in contact or latch contact.

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

(1) Initial state


Start Stop CR Start Stop CR

CR CR

(1) Initial state (2) Start pushbutton switch is pressed


Start Stop CR Start Stop CR

CR CR

(1) Initial state (2) Start pushbutton switch is pressed

Start Stop CR

CR

(3) Start pushbutton switch is released


Start Stop CR Start Stop CR

CR CR

(1) Initial state (2) Start pushbutton switch is pressed

Start Stop CR Start Stop 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.

 Start buttons (normally open) can be used:

 In series if it is required that all start buttons be pressed before a


process starts.

 In parallel if it is required that pressing any start button starts a


process.

 Stop buttons (normally closed) are normally used in series if pressing


any stop button is to stop a process.
The start/stop circuit with several start / stop buttons
Internal relays

 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).

 Internal can be very useful aids in the implementation of switching


sequences.

 They are often used when there are programs with multiple input
conditions.
CR , CR1 and CR2 are Internal Relays
Ladder Diagram Programming Restrictions

1) Vertical contacts are not allowed.

Not allowed

Reprogrammed to obtain the


required logic
Programming restrictions

2) Power can never flow from right to left.

Not allowed Reprogrammed to obtain the


required logic
Programming restrictions

3) An output referencing a specific real output should appear


only once in ladder diagram.

Rung 1

Rung 2

Not allowed
Programming restrictions

4) Only one output should appear in a rung of ladder diagram.

Not allowed
Programming restrictions

5) If more than one output is to be controlled by a certain rung


of ladder diagram, these outputs can be placed in parallel.

allowed
THE END

You might also like