IST / DEEC / API
Industrial Automation
(Automação de Processos Industriais)
Introduction to PLCs
http://www.isr.tecnico.ulisboa.pt/~jag/courses/api20b/api2021.html
Prof. Paulo Jorge Oliveira, original slides
Prof. José Gaspar, rev. 2020/2021
Page 1
IST / DEEC / API Industrial Automation
Syllabus:
Chap. 1 – Introduction to Automation [1 week]
...
Chap. 2 – Introduction to PLCs [2 weeks]
Internal architecture and functional structure.
Input / output interfaces. Interconnection of PLCs .
Components of Programmable Logic Controllers (PLCs).
...
Chap. 3 – PLCs Programming Languages [2 weeks]
Page 2
IST / DEEC / API Chap. 2 – Introduction to PLCs
Some resources available online on PLCs
History : http://www.plcs.net/chapters/history2.htm
Tutorial: http://www.koldwater.com
http://www.htservices.com/Tutorials/plctutorial1.htm
http://www.sea.siemens.com/step/templates/lesson.mason?plcs:1:1:1
Simulators: http://thelearningpit.com/plc/psim/psim.html
http://www.keyence.com/plc/kvl.htm
http://www.autoware.com/english/demo.htm
SW used in lab, Schneider/SoCollaborative Unity Pro, has simulator
Bibliography : Automatic Manufacturing Systems with PLCs, Hugh Jack
(online version available)
Programming Logic Controllers, Frank D. Petruzella
...
Standards: http://www.plcopen.org/
Page 3
IST / DEEC / API Chap. 2 – Introduction to PLCs
Types of PLCs
may use DIN rail 35mm
(the most common rail of
main electrical panels)
Page 4
IST / DEEC / API Chap. 2 – Introduction to PLCs
Phases of a Project in EE&CS:
(Automation included)
• Specifications
Preliminary Study • Technical solution choice
• Execution of tech. drawings
Preparation • Documentation
• Software development
• Installation
Execution • Software installation
• Tests
• Start of operation
Conclusion • Start of exploitation
Page 5
IST / DEEC / API Chap. 2 – Introduction to PLCs
An Automation Example
Solution based on PLCs
Example:
Automation of the Main Entrance Door, in “PLCs Theory,” [Omron]
Page 6
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example:
Automation of the Main Entrance Door, in “PLCs Theory,” [Omron]
Functional Specifications
An automatic system that could command the opening and close of a door is the main purpose
of these specifications.
The command operation will be automatic and manual. There must be a selector with two
positions in a front panel of command to select the mode of operation.
The manual mode resorts to the use of two push buttons to open and close the door. Once the
OPEN push button is pressed, the door will be opened until the operation is completed, as
detected by a limit switch. Upon pushing the CLOSE button the door will be commanded to
close, until the end of the operation is detected by another limit switch.
The automatic mode of operation resorts to the use of two sensors, that detect the proximity of
the users. When a person is detected the automatic opening of the door starts. The door
remains open for a period from 5 to 20 seconds, following the null detection of the user. After
that period the door starts to close. If during this last phase the presence of another user is
detected the close operation is aborted and a new cycle of opening starts.
Page 7
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example:
Automation of the Main Entrance Door, in “PLCs Theory,” [Omron]
Technological Specifications
The proximity sensor that detects the users must be of a model that can be installed over the
door (one in the interior and other in the exterior), and must be based on the reflection of
infrared radiations, with output by transistor. The sensor sensitivity must be tuned such that its
output becomes active if an user is at 2 meters of distance or less.
The motor that activates the open and close of the door must be electrical , three-phase, ..., etc.
Operating Specifications
A key must be required to be used in the model of the automatic-manual selector. A counter of
the number of operations should be incorporated in the solution, to identify when maintenance
is required. The maintenance must be at each 10000 operations, ... etc
Page 8
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example:
Automation of the Main Entrance Door, in “PLCs Theory,” [Omron]
Hardware list
Input (sensors): Output (actuators):
- Selector manual / automatic - Motor actuation to open door
- Push button open door - Motor actuation to close door
- Push button close door
- Proximity sensors
- Limit switch fully open
- Limit switch fully closed
Combining all
- Connect input and output hardware
- Implement functional and operational specifications, according to the
technological specifications
Page 9
IST / DEEC / API Chap. 2 – Introduction to PLCs
Automation Problems - PLC based solutions
Programmable
Logic Controller
Sensors Actuators Engineering
World
Process
Using PLCs implies connecting input devices (for detection and sensing)
and output devices (for command and control).
Using PLCs implies developing software programs for the PLCs to
implement the proposed solution. Graphical user interfaces make trivial
making simple (typical) PLC programs.
Page 10
IST / DEEC / API Chap. 2 – Introduction to PLCs
Architecture of PLCs
Page 11
IST / DEEC / API Chap. 2 – Introduction to PLCs
Architecture of PLCs
... and internally, how is it implemented?
Program
Memory Input/output
address
data
control
Central Processing Unit
Page 12
IST / DEEC / API Chap. 2 – Introduction to PLCs
Architecture of PLCs vs PCs
Program
Memory Input/output
address
data
control
Central Processing Unit
Page 13
IST / DEEC / API Chap. 2 – Introduction to PLCs
Architecture of PLCs
PLC
Page 14
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example: Mixer Motor
Problem [Petruzella96]: A mixer motor is to be used to automatically stir the liquid in a
vat when the temperature and pressure reach preset values. In addition, direct manual
operation of the motor is provided by means of a separate pushbutton station.
Solution using the relay diagram:
Page 15
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example: Mixer Motor, input
Page 16
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example: Mixer Motor, output
Page 17
IST / DEEC / API Chap. 2 – Introduction to PLCs
Example: Mixer Motor, input + CPU/Memory + output
PLC :
CPU +
Mem. +
IO
Page 18
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and
Work principles
Example: Motor Start / Stop
Command of a motor from a console
with start and stop buttons.
Page 19
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and
Work principles
Page 20
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and
Work principles
3 4
2
1 5 1, 2, 3
4, 5 3, 4
Page 21
IST / DEEC / API
Internal structure and work principles
Page 22
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
8.2.1 The Input and Output Scans
When the inputs to the PLC are scanned the physical input values are copied into
memory. When the outputs to a PLC are scanned they are copied from memory to the
physical outputs. When the ladder logic is scanned it uses the values in memory, not
the actual input or output values. The primary reason for doing this is so that if a
program uses an input value in multiple places, a change in the input value will not
invalidate the logic. Also, if output bits were changed as each bit was changed, instead
of all at once at the end of the scan the PLC would operate much slower.
[From Hugh Jack (PLCs book)]
Page 23
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
Pulse 1 Pulse 2 Pulse 3
Scan 1 Scan 2 Scan 3
Scan / Scan Cycle (input / prog exec / output), Scan Period (time T)
The inputs must be active for at least one scan cycle to have impact (no
uncertainty) in the internal PLC state and indirectly in the outputs.
Exception: interrupts...
Page 24
IST / DEEC / API
Internal structure and work principles
PLC1, equipped with slow IO
PLC2, equipped with fast IO
Page 25
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
Worst time
Best time
prog prog prog
exec exec exec
SCAN 1 SCAN 2
Q: Worst time interval for an input to have impact on an output (with probability one)?
A: 2x Scan Period
Q: Smallest time interval (with probability greater than zero) that the change in one
input can impact in one output?
A: Scan Period – Read Time – Write Time = Execution Time
Page 26
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
^^ Interface for inputs and outputs
Page 27
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
Another program,
logic function :
Interface for inputs and outputs
Page 28
IST / DEEC / API Chap. 2 – Introduction to PLCs
Internal structure and work principles
Horizontal scanning
Vertical
scanning
Interface for inputs and outputs
Scanning rungs...
Page 29
IST / DEEC / API Chap. 2 – Introduction to PLCs
8.2.2 The Logic Scan
Ladder logic programs are modeled after relay logic. In relay logic each element in the ladder
will switch as quickly as possible. But in a program elements can only be examined one at
a time in a fixed sequence. Consider the ladder logic in Figure 8.4, the ladder logic will be
interpreted left-to-right, top-to-bottom. In the figure the ladder logic scan begins at the top
rung. At the end of the rung it interprets the top output first, then the output branched below
it. On the second rung it solves branches, before moving along the ladder logic rung.
[From Hugh Jack (PLCs book)]
Page 30
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of Programmable Logic Controllers
1. Programming (using specific devices or PCs)
Schneider
/ Twido
Honeywell console
Omron console
Ethernet is now common
Page 31
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.1 AC input module (discrete)
Page 32
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.1 AC input module:
simplified implementation
A B
A B
C
C
Electronic circuit
Connections to the PLC terminals
Page 33
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.2 AC output module
(discrete)
Page 34
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.2 AC output module (discrete)
Page 35
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.3 DC input module (discrete)
Relay
External
terminals
Attention to:
• Galvanic isolation Transistor
CPU
• Economy External
terminals
• Consumption
• Switching speed
Opto-coupler
• Noise immunity
External
terminals
Page 36
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of PLCs: Input and output interfaces
2.4 DC output module (discrete) Connections to terminals ...
External
External terminals
terminals
To
the
Relay To the CPU
CPU
CPU
... and protections.
To the External
Transistor CPU terminals
Page 37
IST / DEEC / API Chap. 2 – Introduction to PLCs
Components of Programmable Logic Controllers
3. Power sources
Attention to:
• Isolation to the noise
• Isolation relative to
disturbances on the network
• Efficiency
• Consumption
Switching power sources
• Size (volume and weight)
• Robustness relative to load
variations
Page 38
IST / DEEC / API Chap. 2 – Introduction to PLCs
Types of PLCs
Page 39
IST / DEEC / API
Rockwell Automation / Allen-Bradley
Micro800 Control Systems
CompactLogix Control Systems
http://ab.rockwellautomation.com/Programmable-Controllers
Page 40
IST / DEEC / API
Siemens SIMATIC S7
Modular controllers:
SIMATIC S7-1200
SIMATIC S7-1500
SIMATIC S7-200
SIMATIC S7-300
SIMATIC S7-400
http://www.automation.siemens.com
Page 41
IST / DEEC / API
Schneider / Modicon
Twido
Modicon Premium
Modicon Quantum
http://www.schneider-electric.com
Page 42
IST / DEEC / API
The topmost used PLC systems around the world
From http://www.control.com/thread/948918117
Michael Sullivan 2February2000
PLCs market share:
Vijay Bharadva, 16Sept2009
-- Europe
Depends on the application:
1. Siemens
1. Process industry : Rockwell
2. Schneider Electric
2. Machine application : Rockwell/Siemens
3. Rockwell
3. CNC application : Siemens/Allen-Bradley
-- North America
4. Power industry : GE Fanuc
1. Rockwell
5. Tyre Industry : Rockwell/Modicon
2. Schneider Electric
6. Building automation : Telemechanique/Siemens
3. Siemens
LOGO/Rockwell PICO.
-- Worldwide
1. Siemens
Johan Bengtsson 7March2000
2. Rockwell
most popular PLC:s: A-B, Siemens and Schneider
3. Schneider Electric
Electric. Modicon, Mitsubishi and Omron being a
Mitsubishi has the leading market share in
little bit smaller but quite significant.
Japan and many other Asian countries.
North America: mostly Allen-Bradley
Schneider Electric, Rockwell, and Siemens
Europe: mostly Siemens
also have a strong presence in Asia.
Asia: mostly Mitsubishi
Page 43