0% found this document useful (0 votes)
126 views30 pages

Programmable Logic Controller (PLC) (جمربملا يقطنملا مكحتملا)

The document discusses Programmable Logic Controllers (PLCs). It provides an overview of PLCs, including their architecture, inputs/outputs, power supply, and central processing unit. Specifically, it notes that PLCs use a programmable memory to store instructions and functions for on/off control, timing, counting, sequencing, arithmetic, and data handling. It also describes the advantages of PLC systems like flexibility, faster response, and ability to handle complex systems.

Uploaded by

Jurf Alnadaf
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)
126 views30 pages

Programmable Logic Controller (PLC) (جمربملا يقطنملا مكحتملا)

The document discusses Programmable Logic Controllers (PLCs). It provides an overview of PLCs, including their architecture, inputs/outputs, power supply, and central processing unit. Specifically, it notes that PLCs use a programmable memory to store instructions and functions for on/off control, timing, counting, sequencing, arithmetic, and data handling. It also describes the advantages of PLC systems like flexibility, faster response, and ability to handle complex systems.

Uploaded by

Jurf Alnadaf
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/ 30

‫وزارة التعليم العالي والبحث العلمي‬

‫الجامعة التقنية الوسطى‬


‫المعهد الطبي التقني‪ /‬المنصور‬
‫قسم االلكترونيك‪ /‬فرع االجهزة الطبية‬
‫المرحلة الثانية (الصباحي والمسائي)‬

‫)‪Programmable Logic Controller (PLC‬‬


‫)المتحكم المنطقي المبرمج(‬

‫اعداد‬
‫م‪.‬م‪ .‬سامر حسين علي‬
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Chapter -1-
1) Introduction:
PLC: is a specialized computer used to control machines and process.

 PLC uses a programmable memory to store instructions and specific functions


that include on/off control, timing, counting, sequencing, arithmetic, and data
handling.

 Advantages of PLC Systems:


 Flexible.
 Faster response time.
 Less and simple wiring.
 Solid-state (no moving parts).
 Modular design (easy to repair and expand).
 handles much more complicated systems.
 Sophisticated instruction sets available.
 Allows for diagnostics (easy to troubleshoot)
 Less expensive.

1
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 Architecture of PLC:
 Open architecture: is a design that allows the system to be connected easily to
devices and programs made by another manufactures.

 Closed architecture (proprietary system): is a design makes it more difficult to


connect devices and programs made by another manufactures.

 When working with PLC systems that are proprietary in nature you must be
sure that any genetic hardware or software you use is compatible with your
particular PLC.

2) PLC’s Inputs and Outputs:


 I/O configurations:
 Fixed I/O.
 Modular I/O.

- Fixed I/O configuration:


 It is typical of small PLCs.
 It comes in one package, with no separate removable units.
 The processor and I/O are packaged together.
 Lower in cost, but lacks flexibility.

- Modular I/O: is divided by compartments into which separate modules can be


plugged.

 This feature greatly increases your options and unit’s flexibility. You can choose
from all the modules available and mix them in any way you desire.

2
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 Inputs and outputs devices and modules:


PLC takes information from inputs and makes decisions to energize or de-energize
outputs. The decisions are made based on the statuses of inputs and outputs and the
ladder logic program that is being executed.

Input devices:
 Pushbuttons.  The input devices can be AC or DC.
 Limit switches.
 The input voltage can be high or low.
 Relay contacts.
 Photo sensors.  The input signal can be digital or analog.
 Proximity sensors.
 Temperature sensors.

3
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Sensor: is a device that measure a physical quantity and convert it into a signal which
can be read by an instrument.

Sensor’s sensitivity: it indicates how much the sensor’s output changes when the
measured quantity changes.

 Factors to consider when choosing a sensor:


 Accuracy.
 Calibration.
 Cost.
 Environmental.
 Range.
 Repeatability.
 Resolution.

Logic 1: it indicates that the signal is present and the switch is on.
Logic 0: it indicates that the signal is absent or the switch is off.

 A normally open pushbutton (NO) is used in below example:


 When the switch is not pressed, no voltage is at the PLC and sets it to OFF
state.
 When the switch is pressed, 24V DC is applied and the current flow to the
PLC and sets it to ON state.

 A normally closed pushbutton (NC) is used in below example acts opposite to


normally open pushbutton (NO):
 When the switch is not pressed, 24V DC is applied and the current flow to the
PLC and sets it to ON state.
 When the switch is pressed, no voltage is at the PLC and sets it to OFF state.

4
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Example of pushbuttons switches

Pushbuttons switches

Switches

Limit switch: is a switch operated by the motion of a machine part or presence of an


object.

5
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 The work of limit switch:


When the target comes in contact with the actuator, it rotates the actuator from
the free position, through the pre-travel area, to the operating position. At this
point the electrical contacts in the switch body change state. A spring returns the
actuator lever and electrical contacts to their free position when the actuator is no
longer in contact with the target.

 Applications used limit switch:


 They are used for control a machine, as to count objects passing a point.
 In automobiles, they turn on light when the door opened.
 In industry, they are used to limit the travel of machine parts.
 Sequence operations or to detect moving items on conveyor system.

Proximity sensor: is a sensors able to detect the presence of nearby objects without
any physical contact.

 A proximity sensor often emits an electromagnetic field or a beam of


electromagnetic radiation (infrared), and looks for changes in the field or return
signal.

Input module: it provides an interface between input devices and PLC’s CPU, which
uses only a low DC voltage.

 The function of input module is convert the input signals to DC voltages that are
acceptable to CPU.

6
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 Standard discrete input and output modules include:


 24V (DC or AC).
 48V (DC or AC).
 120V (DC or AC).
 220V (DC or AC).
 TTL level.

Output devices:  These devices may require


 Relays. different levels of AC or DC
 Alarms.
voltages.
 Solenoids.
 Fans.  The signals processed in PLC are
 Lights.
low DC voltages.
 Motor starters.

Output module: it provides an interface between PLC’s CPU and output devices,
which uses only a low DC voltage.

 The functions of output module to convert PLC control signal to voltage required
by the controlled devices (output devices).

7
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Input devices and input output devices and output


module module

8
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

3) Power Supply:
PLCs are powered by standard commercial AC power lines. However, many PLC
components, such as the CPU and memory, utilizes 5 V or another level of DC power.
 The PLC power supply converts AC power into DC power to support the
components of the PLC.
 In large PLC systems, the power supply does not normally supply power to the
field devices.
 In small and micro PLC systems, the power supply is also used to power the field
devices.

Power Supply

4) Central Processing Unit (CPU):


A PLC’s CPU is controlled by operating system software.

Operating system software: is a group of supervisory programs that are loaded and
stored permanently in the PLC’s memory by the PLC manufacturer.

9
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 CPU is the brain of PLC.


 CPU consists of a microprocessor for implementing the logic, and controlling the
communications among the modules.
 CPU designed so the desired circuit can be entered in relay logic form.
 CPU accepts input data from various sensing devices, executes the stored user
program, and sends appropriate output commands to control devices.

CPU and CPU main of


PLC

 The operations of CPU of PLC:


 Updating inputs and outputs: this function allows a PLC to read the status of
its input terminals and energize or de-energize its output terminals.
 Performing logic and arithmetic operations: A CPU conducts all the
mathematic and logic operations involved in a PLC.
 Communicating with memory: the PLC’s programs and data are stored in
memory when a PLC is operating, its CPU may read or change the contents of
memory locations.
 Scanning applications programs: the scanning function allows the PLC to
execute the application program (ladder logic program) as specified by the
programmer.
 Communicating with a programming terminal: the CPU transfers program and
data between itself and the programming terminal.

10
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Ladder logic program: is the set of instructions written by a PLC programmer.

5) Memory:
Memory: is the component that store information, programs, and data in a PLC.
Writing: the process of putting new information into memory location.
Reading: the process of retrieving information from memory location.
 The common types of memory used in PLC are:
 Read Only Memory (ROM).
 Random Access Memory (RAM).

 The comparison between ROM and RAM:

ROM RAM
1 Read Only Memory. 1 Random Access Memory (RAM).
2 ROM location can be read but not 2 RAM location can be read or written.
written.
3 ROM is used to store program and 3 The information stored in a RAM
data that should not be altered. location can be retrieved and/or altered.
4 PLC’s operating programs are 4 Ladder logic programs are stored in
stored in ROM. RAM.

Byte (B): is a group of 8 bits.

Bit (b): is a memory location that may store one binary number that has the value of
either 0 or 1.

11
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 The memory capacities:

Number of
Name Symbol
bits or bytes
Bit b 1b
Byte B 8b
Kilo Byte KB 1024 B
Mega Byte MB 1024 KB
Giga Byte GB 1024 MB
Terra Byte TB 1024 GB

6) Programming Device:
A PLC required a programming terminal and programming software for operation.

 The details of programming device:

 A personal computer (PC) is the most commonly used programming


device.
 The software allows to create, edit, document, store and troubleshoot
programs.
 The (PC) communicates with PLC processor via a serial or parallel data
communications link.

12
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Download: the sending of a program from the (PC) to the


PLC.
Uploader: the sending of program from the PLC to the
(PC).
Scan: is the completion of one cycle of this sequence.
Scan time: is the time required for one full cycle, provides
a measure of the speed of response of the PLC.

7) PLC Size Classification:

 The criteria of PLC size classification:

 Number of inputs and outputs (I/O count).


 Cost.
 Physical size.

a) Nano PLC
 Smallest sized PLC.
 Handles up to 16 I/O points.

b) Micro PLC
 Handles up to 32 I/O points.

c) Allen-Bradley SLC-500 Family


 Handles up to 960 I/O points.

d) Allen-Bradley PLC-5 Family


 Handles several 1000 I/O points.

13
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Nano PLC
Micro PLC

Allen-Bradley SLC-500 PLC Allen-Bradley PLC-5 PLC

14
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Chapter -2-

1) Basic Requirement:
In PLC programming in order to create or change a program. The following items are
needed:

 PLC.
 Programming device.
 Programming software.
 Connector cable.

2) PLC operations:
 Input scan: scan the state of the input.
 Program scan: execute the program logic.
 Output scan: energize / de-energize the output.
 Housekeeping: communication checking with the software and perform
other request according to their preference.

3) PLC terminology:
The language of PLCs consists of a commonly used set of terms; many of which are
unique to PLCs. In order to understand the ideas and concepts of PLCs, an
understanding of these terms is necessary.

A) Ladder logic:
Ladder logic (LD): is one programming language is used with PLC which it uses
components that resemble elements used in a diagram format to describe hand-wired
control.
Ladder logic editor: it displays the program as a graphical representation similar to
electrical wiring diagram.

15
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 A LD allow the program to emulate the flow of electrical current from a power
source through a series of logical input conditions that in turn enable logical
output condition.
 A LD program includes a left power rail that is energized.
 Contacts that are open block that energy flow.

 The sequences followed by a PLC when carrying out a program:

1- Scan the inputs associated with one rung of the ladder program.
2- Solve the logic operation involving those inputs then set/ reset the output for
that rung.
3- Move on to the next rung and repeat operations 1,2,3 and so on until the end
of program.
4- The PLC then goes back to the beginning of the program and start again.

B) Statement list (STL):


STL: is a statement provides another view of a set of instructions that perform the same
task of LD and it is appropriate for experienced programmers.

 STL sometimes allows you to solve problems that we cannot solve very easily
with LD or FBD editors.

16
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

C) Function block diagrams (FBD):


FBD: are functions provide another view of a set of instructions that perform the same
task of LD and STL that they have names to designed its specific task and they are
indicated by a rectangle.

 Inputs are shown on the left-hand side of rectangle and output shown on the
right-hand of rectangle.

4) Timer function block:


Timer: is a device that count increments of time that is represented by box in ladder
logic.

 The work of timer:

1- When the timer receives an enable.


2- The timer starts to time.
3- The timer compares its current time with the present time.
4- The output of timer is logic 0 as long as the current time is less than the
present time.
5- When the current time is greater than the present time the timer output is
logic1.

 The SR3B261BD uses eleven types of timers.

 The most three important timers are (On-delay timer, Off-delay timer and press
to start/stop timer).

17
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 On-delay timer:

When this timer receives (logic 1) to its enable input, the output of timer
turns on (logic 1) after the current time increase to present time and then
the output turns off (logic 0) when the enable input goes to (logic 0).

 Off-delay timer:

When this timer receives (logic 1) to its enable input, the output of timer
turns on (logic 1) and when the enable input goes to (logic 0) and the
current time increase to present time then the output turns off (logic 0).

 Press to start/stop timer:

When this timer receives a pulse to its enable input, the output of timer
turns on (logic 1) after the current time increase to present time and then
the output turns off (logic 0) when the enable input receives another pulse
again.

On-delay timer Off-delay timer

Press to start/stop timer

18
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

5) Counter function block:


Counter: is a device compares an accumulated value to a present value to control
circuit functions.

 Counters in PLCs serve the same function as mechanical counters.


 PLC uses three types of counters: (up counter (CTU), down counter (CTD), and
up-down counter (CTUD).

 The work of counter:

Counter increment/decrement one count each time the input transitions


from off (logic 0) to on (logic 1). It is reset when a RESET instruction is
executed.

 Up counter:

The up counter counts up from a current value to present value (PV). Input (CU)
is the count input. Each time (CU) transitions from (logic 0) to (logic 1) the
counter increment by a count of 1. Input (R) is the reset. A present count value is
stored in (PV) input. If the current count is equal to or greater than the present
value stored in (PV), the output bit (Q) turns on.

 Down counter:

The down counter counts down from a present value (PV) each time (CD)
transition from (logic 0) to (logic 1). When the current value is equal to zero the
counter output bit (Q) turns on. The counter resets and loads the current value
with present value (PV) when the load input (LD) is enable.

19
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 Up-Down counter:

It counts up and/or down. These are called CTUD, CTU, or CTD. When executed
the CTUD instruction while the counter up instruction variable Up is ON, the
execution is similar with the CTU instruction (up counter). When variable Up is
off, the execution is similar with the CTD (down counter) instruction.
After executing the CTUD instruction:
If the current value is equal to or greater than the present value (PV), variable (Q)
and variable (QU) are turned ON.
If the current value is equal to or less than zero, the variable (Q) and variable
(QD) are turned ON.

20
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Chapter -3-
1) Logic Gates and the truth tables:

21
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Logic gates Ladder diagram

Buffer gate (yes)

Not gate

And gate

Nand gate

Or gate

Nor gate

Ex-Or gate

Ex-Nor gate

22
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

2) Numerical Systems:
There are 4 numerical systems:
Binary [2]: is the numerical system uses 2 symbols 0 and 1.
Octal [8]: is the numerical system uses 8 symbols, are (0,1,2,3,4,5,6,7).
Decimal [10]: is the numerical system uses 10 symbols, are (0,1,2,3,4,5,6,7,8,9).
Hexadecimal [16]: is the numerical system uses 16 symbols, are
(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).

 The basics of any numerical system:

 Any numerical system consists of symbols.


 The number of symbols represents the basis of the system.
 The value of any symbol is equal to the symbol multiplied by the
basis of the system is raised to a force equal to the order of the
symbol minus one.

 The conversions from one system to another:


1) [𝟏𝟎] → [𝟐]:
Base on the dividing by 2. Record the quotients and the reminders, then stop the
dividing if the quotient equal to 0, later take the reminder bottom to top, this would be
the binary number.

 (10)10 = (1010)2

Number Operation Quotient Reminder


10 10 ÷ 2 5 0
5 5÷2 2 1
2 2÷2 1 0
1 1÷2 0 1

23
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 (128)10 = (10000000)2

Number Operation Quotient Reminder


128 128 ÷ 2 64 0
64 64 ÷ 2 32 0
32 32 ÷ 2 16 0
16 16 ÷ 2 8 0
8 8÷2 4 0
4 4÷2 2 0
2 2÷2 1 0
1 1÷2 0 1

2) [𝟐] → [𝟏𝟎]:
Based to the symbols are multiplied by the basis of the system is raised to a force equal
to the order of the symbol minus one the sum the values.

 (10110)2 = (22)10

(10110)2 = 1 ∗ 24 + 0 ∗ 23 + 1 ∗ 22 + 1 ∗ 21 + 0 ∗ 20 = 16 + 4 + 2 + 0 = 22

 (1110)2 = (14)10

(1110)2 = 1 ∗ 23 + 1 ∗ 22 + 1 ∗ 21 + 0 ∗ 20 = 8 + 4 + 2 + 0 = 14

3) [𝟐] → [𝟖]:

Take chunks of 3 digits from right to left (pad with 0’s at the left if there are not enough
binary digits), and write the octal digit that corresponds to each chunks.

24
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 (1110)2 = (16)8

(1110)2 = (001)2 (110)2 = (1)8 (6)8 = (16)8

 (101011)2 = (53)8

(101011)2 = (101)2 (011)2 = (5)8 (3)8 = (53)8

4) [𝟐] → [𝟏𝟔]:
Take chunks of 4 digits from right to left (pad with 0’s at the left if there are not enough
binary digits), and write the octal digit that corresponds to each chunks.

 (1110)2 = (E)16

(1110)2 = (E)16

 (101011)2 = (2B)16

(101011)2 = (0010)2 (1011)2 = (2)16 (B)16 = (2B)16

5) [𝟖] → [𝟏𝟔]:
Must be converse from [8] → [2], then converse [2] → [16].

 (13)8 = (B)16

(13)8 = (1)8 (3)2 = (001)2 (011)2 = (001011)2 = (1011)2 = (B)16 = (B)16

25
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

 (26)8 = (16)16

(26)8 = (2)8 (6)2 = (010)2 (110)2 = (010110)2 = (0001)2 (0110)2 =


(1)16 (6)16 = (16)16

6) [𝟏𝟔] → [𝟖]:
Must be converse from [16] → [2], then converse [2] → [8].

 (1C)16 = (34)8

(1C)16 = (1)16 (C)16 = (0001)2 (1100)2 = (00011100)2 = (011)2 (100)2


= (3)8 (4)8 = (34)8

 (AF)16 = (257)8

(AF)16 = (A)16 (F)16 = (1010)2 (1111)2 = (10101111)2


= (010)2 (101)2 (111)2 = (2)8 (5)8 (7)8 = (257)8

Decimal Binary Octal


0 000 0
1 001 1
2 010 2
3 011 3
4 100 4
5 101 5
6 110 6
7 111 7

26
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Decimal Binary Hexadecimal


0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F

27
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬

Contents
The subject The page
1 Chapter -1- 1
2 1) Introduction 1
3  Advantage of PLC system 1
4  Architecture of PLC 2
5 2) PLC’s Inputs and Outputs 2
6  I/O configurations 2
7  Inputs and outputs devices and modules 3
8  Factors to consider when choosing a sensor 4
9  The work of limit switch: 6
10  Applications used limit switch 6
11 3) Power Supply 9
12 4) Central Processing Unit (CPU) 9
13  The operations of CPU of PLC 10
14 5) Memory 11
15  The comparison between ROM and RAM 11
16  The memory capacities 12
17 6) Programming Device 12
18  The details of programming device: 12
19 7) PLC Size Classification 13
20  The criteria of PLC size classification 13
21 Chapter -2- 15
22 1) Basic Requirement 15
23 2) PLC operations 15
24 3) PLC terminology 15
25 A) Ladder logic 15
 The sequences followed by a PLC when carrying out a
26 16
program
27 B) Statement list (STL): 16
28 C) Function block diagrams (FBD) 17
29 4) Timer function block 17
30  The work of timer 17
31  On-delay timer 18
32  Off-delay timer 18
33  Press to start/stop timer 18
34 5) Counter function block 19
35  The work of counter 18
36  Up counter 19
37  Down counter 19
38  Up-Down counter 20
39 Chapter -3- 21
40 1) Logic Gates and the truth tables 21

28
PLC ‫ سامر حسين علي‬.‫م‬.‫ م‬:‫اعداد‬
41 2) Numerical Systems 23
42  The basics of any numerical system 23
43  The conversions from one system to another 23
44 1) [10] → [2] 23
45 2) [2] → [10] 24
46 3) [2] → [8] 24
47 4) [2] → [16] 25
48 5) [8] → [16] 25
49 6) [16] → [8] 26
50 Contents 28

29

You might also like