1. Industrial Control
Behzad Samadi
Department of Electrical Engineering
Amirkabir University of Technology
Winter 2011
Tehran, Iran
Behzad Samadi (Amirkabir University) Industrial Control 1 / 1
10. Programmable Logic Controllers
Definition:
A digitally operating electronic system, designed for use in an
industrial environment, which uses memory for the internal storage of
user-oriented instructions for implementing specific functions such as
logic, sequencing, timing, counting and arithmetic to control, through
digital or analog inputs and outputs, various types of machines or
processes.
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 3 / 1
11. Programmable Logic Controllers
What is a PLC?
A programmable logic controller (PLC) is a specialized computer to
perform logic functions for machine control.
PLCs are used to implement logic functions such as not allowing a
drill press to start unless the operator has one hand on each of the
two start switches.
Such control functions used to be implemented using relays. PLCs
revolutionized this by allowing the control logic to be implemented
using software.
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 4 / 1
12. Programmable Logic Controllers
PLC Origin:
Developed to replace relays in the late 1960s
Costs dropped and became popular by 1980s
Now used in many industrial designs
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 5 / 1
14. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
15. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
16. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
17. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
18. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
19. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
20. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
21. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
22. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
23. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
networking
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
24. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
networking
Low space requirement
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
25. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
networking
Low space requirement
Low power consumption
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
26. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
networking
Low space requirement
Low power consumption
High processing speed
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
27. Programmable Logic Controllers
Advantages of using PLCs:
Highly reliable
Highly versatile (universal applicability)
Simple troubleshooting
Simple installation
Quick modification of the program (highly flexible)
Capable of tasks not possible with relays before:
calculation
information exchange
text and graphic display
data processing
networking
Low space requirement
Low power consumption
High processing speed
No moving parts, hence no wearing parts
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 6 / 1
28. Programmable Logic Controllers
Disadvantages of using PLCs:
High initial cost ( for a simple process )
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 7 / 1
29. Programmable Logic Controllers
Disadvantages of using PLCs:
High initial cost ( for a simple process )
Sensitive to dust, high temperature and high humidity
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 7 / 1
30. Programmable Logic Controllers
Disadvantages of using PLCs:
High initial cost ( for a simple process )
Sensitive to dust, high temperature and high humidity
Repair must be made by a qualified personnel
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 7 / 1
31. Programmable Logic Controllers
Disadvantages of using PLCs:
High initial cost ( for a simple process )
Sensitive to dust, high temperature and high humidity
Repair must be made by a qualified personnel
Not very widespread
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 7 / 1
32. Programmable Logic Controllers
Disadvantages of using PLCs:
High initial cost ( for a simple process )
Sensitive to dust, high temperature and high humidity
Repair must be made by a qualified personnel
Not very widespread
No uniform programming language
[Fes, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 7 / 1
33. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
34. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
35. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
36. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
37. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
38. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
39. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
40. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
IEC 61131-5 Communications
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
41. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
IEC 61131-5 Communications
IEC 61131-6 Functional Safety
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
42. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
IEC 61131-5 Communications
IEC 61131-6 Functional Safety
IEC 61131-7 Fuzzy control
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
43. Programmable Logic Controllers
International Standard for PLC
The IEC 1131 standards were developed to be a common and open
framework for PLC architecture, agreed to by many standards groups
and manufacturers.
They were initially approved in 1992, and since then they have been
reviewed as the IEC-61131 standards.
The main components of the standard are:
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
IEC 61131-5 Communications
IEC 61131-6 Functional Safety
IEC 61131-7 Fuzzy control
IEC 61131-8 Guidelines for the application and implementation of
programming languages
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 8 / 1
49. Programmable Logic Controllers
LOGO! integrates:
Control functions
An operating and display unit
Power supply
An interface for program modules and a PC cable
Ready-to-use basic functions that are often required in day-to-day
operation, such as functions for on/off delays and current impulse
relays
Time switch
Binary markers
Inputs and outputs according to the device type
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 14 / 1
50. Programmable Logic Controllers
What device types are available?
There are LOGO! models for 12 V DC, 24 V DC, 24 V AC and 230 V AC
as:
A standard variant with 6 inputs and 4 outputs with dimensions of 72
x 90 x 55 mm
A variant without a display with 6 inputs and 4 outputs with
dimensions of 72 x 90 x 55 mm
A variant with 8 inputs and 4 outputs with dimensions of 72 x 90 x
55 mm
A long variant with 12 inputs and 8 outputs with dimensions of 126 x
90 x 55 mm
A bus variant with 12 inputs and 8 outputs, and additional AS
interface bus connection, via which 4 further inputs and 4 further
outputs are available in the bus system. All this is packed into
dimensions of 126 x 90 x 55 mm.
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 15 / 1
51. Programmable Logic Controllers
How to recognize which LOGO! model you have:
LOGO!s designation contains information on various characteristics:
12: 12 V DC variant
24: 24 V DC variant
230: 115/230 V AC variant
R: Relay outputs (without R: Transistor output)
C: Integrated seven-day time switch
o: Variant without display
L: Twice the number of outputs and inputs
B11: slave with Actuator Sensor (AS) interface bus connection
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 16 / 1
61. Programmable Logic Controllers
Siemens S7-300
Signal Modules (SM)
Digital input modules: 24V DC, 120/230V AC
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 25 / 1
62. Programmable Logic Controllers
Siemens S7-300
Signal Modules (SM)
Digital input modules: 24V DC, 120/230V AC
Digital output modules: 24V DC, Relay
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 25 / 1
63. Programmable Logic Controllers
Siemens S7-300
Signal Modules (SM)
Digital input modules: 24V DC, 120/230V AC
Digital output modules: 24V DC, Relay
Analog input modules: Voltage, current, resistance, thermocouple
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 25 / 1
64. Programmable Logic Controllers
Siemens S7-300
Signal Modules (SM)
Digital input modules: 24V DC, 120/230V AC
Digital output modules: 24V DC, Relay
Analog input modules: Voltage, current, resistance, thermocouple
Analog output modules: Voltage, current
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 25 / 1
65. Programmable Logic Controllers
Siemens S7-300
Signal Modules (SM)
Digital input modules: 24V DC, 120/230V AC
Digital output modules: 24V DC, Relay
Analog input modules: Voltage, current, resistance, thermocouple
Analog output modules: Voltage, current
Interface Modules (IM): The IM360/IM361 and IM365 make
multi-tier configurations possible.
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 25 / 1
66. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
67. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
68. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
69. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
70. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Closed-loop control
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
71. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Closed-loop control
Communication Processors (CP): Provide the following networking
facilities:
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
72. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Closed-loop control
Communication Processors (CP): Provide the following networking
facilities:
Point-to-Point connections
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
73. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Closed-loop control
Communication Processors (CP): Provide the following networking
facilities:
Point-to-Point connections
PROFIBUS
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
74. Programmable Logic Controllers
Siemens S7-300
Dummy Modules (DM): The DM 370 dummy module reserves a slot
for a signal module whose parameters have not yet been assigned. It
can also be used, for example, to reserve a slot for installation of an
interface module at a later date.
Function Modules (FM): Perform special functions”:
Counting
Positioning
Closed-loop control
Communication Processors (CP): Provide the following networking
facilities:
Point-to-Point connections
PROFIBUS
Industrial Ethernet.
Siemens AG
Behzad Samadi (Amirkabir University) Industrial Control 26 / 1
81. Programmable Logic Controllers
PLC manufacturers:
ABB
Allen-Bradley
ALSTOM/Cegelec
Beck Electronic/Festo
Beckhoff
Bosch
Fisher & Paykel
Fuji Electric
GE-Fanuc
Hitachi
Honeywell
LG Industrial Systems
Matsushita (Europe)/Aromat
Mitsubishi
Omron
Rockwell Automation
Schneider Electric
Siemens/Moore Products
Toshiba
Yamatake
Yokogawa
Behzad Samadi (Amirkabir University) Industrial Control 33 / 1
82. Programmable Logic Controllers
Selecting a PLC:
Number of I/Os
Kind of signals : digital or analog
Fieldbus system or standalone
Modular or compact
Operating voltage
Positive or negative triggerred input
Relay or transistor output
Operating systems
FESTO DIDACTIC
Behzad Samadi (Amirkabir University) Industrial Control 34 / 1
84. Programmable Logic Controllers
GLOFA - GM7:
Global standard (IEC61131-3) language: IL, LD, SFC
Various main module: 32 types
20(12in+8out)/30(18in+12out)/40(24in+16out)/60(36in+24out)
points
AC/DC power, DC input, Relay/Transistor output
Various expansion module: 24 types
Digital I/O 7 types, analog I/O 9 types, Communication I/F 6 types,
option module 2 types
Batteryless Backup
Program backup: EEPROM
Data backup: Supercapacitor
LS Industrial Systems (lsis.biz)Behzad Samadi (Amirkabir University) Industrial Control 36 / 1
86. Programmable Logic Controllers
GLOFA GM4:
IEC standard programming: IL, LD, SFC
Max. I/O points: GM4A/B (2,048), GM4C (3,584)
Fast processing time with high-speed gate array
Fit for small-and medium-sized manufacturing line
In case of remote system configuration, large-scale control available
Cnet, DeviceNet, Fast Ethernet, Fnet, Profibus-DP, Rnet support
Downsizing and high performance/function
Special function modules
Analog I/O, PID, High-speed counter, Position control (APM), AT,
TC, RTD, etc
LS Industrial Systems (lsis.biz)
Behzad Samadi (Amirkabir University) Industrial Control 38 / 1
91. Programmable Logic Controllers
Location and size prefix features for directly represented variables
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 43 / 1
92. Programmable Logic Controllers
Input, Output, Memory Locations:
%QX75 and %Q75 - Output bit 75
%IW215 - Input word location 215
%QB7 - Output byte location 7
%MD48 - Double word at memory location 48
%Q* - Output at a not yet specified location
%IW2.5.7.1 - See explanation below
Depending on the manufacturer specifications, the variable %IW2.5.7.1
may represent the first channel (word) of the seventh module in the fifth
rack of the second I/O bus of a programmable controller system.
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 44 / 1
114. Programmable Logic Controllers
Example: A signal lamp is required to be switched on if a pump is running
and the pressure is satisfactory, or if the lamp test switch is closed.
Behzad Samadi (Amirkabir University) Industrial Control 65 / 1
115. Programmable Logic Controllers
Example: A signal lamp is required to be switched on if a pump is running
and the pressure is satisfactory, or if the lamp test switch is closed.
[Bolton, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 65 / 1
116. Programmable Logic Controllers
Example: Consider a valve which is to be operated to lift a load when a
pump is running and either the lift switch is operated or a switch operated
indicating that the load has not already been lifted and is at the bottom of
its lift channel.
Behzad Samadi (Amirkabir University) Industrial Control 66 / 1
117. Programmable Logic Controllers
Example: Consider a valve which is to be operated to lift a load when a
pump is running and either the lift switch is operated or a switch operated
indicating that the load has not already been lifted and is at the bottom of
its lift channel.
[Bolton, 2006]Behzad Samadi (Amirkabir University) Industrial Control 66 / 1
118. Programmable Logic Controllers
Example: Consider a system where there has to be no output when any
one of four sensors gives an output, otherwise there is to be an output.
Behzad Samadi (Amirkabir University) Industrial Control 67 / 1
119. Programmable Logic Controllers
Example: Consider a system where there has to be no output when any
one of four sensors gives an output, otherwise there is to be an output.
[Bolton, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 67 / 1
132. Programmable Logic Controllers
Elementary Data Types:
STRING: 8 bits per character
BYTE: Bit string of length 8
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 71 / 1
133. Programmable Logic Controllers
Elementary Data Types:
STRING: 8 bits per character
BYTE: Bit string of length 8
WORD: Bit string of length 16
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 71 / 1
134. Programmable Logic Controllers
Elementary Data Types:
STRING: 8 bits per character
BYTE: Bit string of length 8
WORD: Bit string of length 16
DWORD: Bit string of length 32
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 71 / 1
135. Programmable Logic Controllers
Elementary Data Types:
STRING: 8 bits per character
BYTE: Bit string of length 8
WORD: Bit string of length 16
DWORD: Bit string of length 32
LWORD: Bit string of length 64
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 71 / 1
136. Programmable Logic Controllers
Elementary Data Types:
STRING: 8 bits per character
BYTE: Bit string of length 8
WORD: Bit string of length 16
DWORD: Bit string of length 32
LWORD: Bit string of length 64
WSTRING: Variable-length double-byte character string
[IEC, 2003]
Behzad Samadi (Amirkabir University) Industrial Control 71 / 1
144. Programmable Logic Controllers
Example: Write a program such that:
Lecture Notes by Nazarian
Behzad Samadi (Amirkabir University) Industrial Control 79 / 1
146. Programmable Logic Controllers
Example: Write a program such that:
Lecture Notes by Nazarian
Behzad Samadi (Amirkabir University) Industrial Control 81 / 1
151. Programmable Logic Controllers
Example: A motor will be controlled by two switches. The Go switch will
start the motor and the Stop switch will stop it. If the Stop switch was
used to stop the motor, the Go switch must be thrown twice to start the
motor. When the motor is active a light should be turned on. The Stop
switch will be wired as normally closed.
Behzad Samadi (Amirkabir University) Industrial Control 86 / 1
152. Programmable Logic Controllers
Example: A motor will be controlled by two switches. The Go switch will
start the motor and the Stop switch will stop it. If the Stop switch was
used to stop the motor, the Go switch must be thrown twice to start the
motor. When the motor is active a light should be turned on. The Stop
switch will be wired as normally closed.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 86 / 1
153. Programmable Logic Controllers
Example: Consider the task of counting cars as they enter a multi-storage
parking lot and as they leave it. An output is to be triggered if the number
of cars entering is some number greater than the number leaving, i.e. the
number in the parking lot has reached a saturation value.
Behzad Samadi (Amirkabir University) Industrial Control 87 / 1
154. Programmable Logic Controllers
Example: Consider the task of counting cars as they enter a multi-storage
parking lot and as they leave it. An output is to be triggered if the number
of cars entering is some number greater than the number leaving, i.e. the
number in the parking lot has reached a saturation value.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 87 / 1
160. Programmable Logic Controllers
Structured text is a programming language that strongly resembles the
programming language PASCAL.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 93 / 1
167. Programmable Logic Controllers
Sequential Function Chart (SFC):
Example: A two door security system. One door requires a two digit entry
code, the second door requires a three digit entry code.
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 100 / 1
168. Programmable Logic Controllers
Sequential Function Chart (SFC):
Example: Controlling a stamping press
[Jack, 2008]
Behzad Samadi (Amirkabir University) Industrial Control 101 / 1