Untitled
Untitled
Untitled
PLC Course
مقرر الحاكمات المنطقية المبرمجة
Lec 3
➢ Motor
➢ Solenoids
➢ Valves
➢ Alarms
➢ Fans
➢ Lights
Output Devices
➢ Solenoids
• A solenoid is an electromechanical device which allows for an electrical
device to control the flow of a gas or liquid (valves).
• The electrical device causes a current to flow through a coil located on the
solenoid valve.
• This current flow in turn results in a magnetic field which causes the
displacement of a metal actuator.
• A relay will usually have only one coil but may have any number of
different contacts.
Output Devices
N.O (Normally
(Common)
Opened Contact)
Electromagnetic Relay
Relay Operation
N.O
N.C
common
A B C ON
0 0
OFF
0 1
1 0
1 1
OFF
C
Solution:
ON
OFF
C = A/ B
OFF
C
Example2: writ the truth table for the following relay circuit
A B C ON
0 0
0 1 OFF
1 0
1 1
ON
C
Solution:
ON
OFF
C =(A . B) /
NAND gate ON
C
Example 3:
For the Relay in the following figure, explain the number of contacts, the type
and pins number for each contact. How many devices can be controlled using this
relay?
1 2 3 4 5 6
10
11
9 8 7
Solution
➢ The number of contacts = 6
1 2 3 4 5 6
10
11
9 8 7
Relay Logic Diagram
&
PLC Ladder Diagram
(1) Relay Logic Diagram
➢ Like ladder diagram, shows the logical relationship between I/O devices
(shows how to control outputs based on input conditions).
➢ Certain symbols were used to represent different input and output devices.
➢ The PLC power supply will be the voltage between the two vertical lines,
labeled L1 and L2. In general, L1 represents the supply terminal and L2
represents the common (neutral) terminal.
➢ Relay logic diagrams use rungs (one or more) to accomplish the control of
outputs based on input conditions.
(1) Relay Logic Diagram
➢ Any number of inputs and only one output appear in a rung of the relay
logic diagram.
➢ The last symbol used in a rung (from left to right) must be for an output.
➢ power flows through any rung from left to right such that there exist
a continuous path (logic continuity = rung is true) through this rung.
➢ 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 input 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.
➢ The last symbol used in a rung (from left to right) must be for an output.
➢ power flows through any rung from left to right such that there exist
a continuous path (logic continuity = rung is true) through this rung.
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), with the exception of power flow going in
reverse before continuing to the right. 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:
7) Logic format:
1
➢ Stores the status of control actions of digital
2
2 output devices that are connected to the
3 PLC’s output interface.
Held
closed
Held
open
➢ 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
Example 1:
➢ Draw the ladder diagram to implement the following logic expression:
Y = (A + C ) B
Solution
L1 L2
Rung 1
Example 2:
➢ Draw the ladder diagram to implement the following logic expression:
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