Standard vs Custom Battery Packs - Decoding the Power Play
Plc basics
1. PLC – The Basics
Programmable Logic Controllers.
2. PLC - Basics
1. What is a PLC
2. Before PLCs (Before PCs)
3. Advantages of PLC
4. Disadvantages of PLC
5. PLC Configurations
6. PLC versus PC
7. Parts of a PLC
8. PLC in Operation
3. PLC – The Basics
9. Ladder Logic
10.Programming the PLC
11.Siemens SIMATIC S7 300 – An Overview
12.Troubleshooting & Maintenance
13.Closing (Q/A)
14.Acknowledgements
4. 1. What is a PLC ?
A Programmable Logic Controllers (PLC)
is a miniature industrial grade computer
that contains hardware and software –
capable of being programmed to perform
control functions
Image Source: Siemens
Image Source: Koyo
5. 2. Before the PLC.
The development of the PLC can be compared
analogously to the development of the Personal
Computer,
Before the PC what were the computing devices:
Abacus
Slide Rule
Table of Logarithms
Electronic Calculator
Personal Computer (Desktop, Laptop, Mobile
Devices
6. 2. Before the PLC.
How were machines and industrial processes
controlled before the advent of the PLC?
One of the means for controlling machines was
through the use of
Power Relays and their associated
Control Relays
7. 2. Before the PLC.
What are the disadvantages of relay based
control systems?
Complexity,
Costly
Hardwiring,
Logistical nightmare
Troubleshooting problems
Strict Maintenance routine
Not easy to modify
Etc, etc
8. 2. Before the PLC.
Control devices:
• Rotary drum switch
• Limit switch
• Electromechanical Counter
• Fuses
• Control Transformers
• Motor Starter
• Solenoid Valves
• Pneumatic plunger timers
• etc
9. 2. Before the PLC.
Historical Background
General Motors
Corporation specified the
design criteria for the first
programmable controller in
1968
The main goal:
To eliminate the high costs
associated with inflexible,
relay-controlled systems.
Main Criteria
• The controller had to be designed in modular
form, so that sub-assemblies could be
removed easily for replacement or repair.
• The control system needed the capability to
pass data collection to a central system.
• The system had to be reusable.
• The method used to program the controller
had to be simple, so that it could be easily
understood by plant personnel.
10. 3. Advantages of the PLC.
A Programmable Logic
Controller (PLC) is a device that
was invented to replace the
necessary sequential relay circuits
for machine control. The PLC
works by looking at its inputs and
depending upon their state, turning
on/off its outputs. The user enters
a program, usually via software,
that gives the desired results.
PLCs are used in all industries.
Manufacturing
Process Plants & Systems
Machining,
Packaging,
Automated Plants
Etc
11. 3. Advantages of the PLC.
They are re-programmable
Solid state switches last much longer than relays
Complex logics can be easily represented
Multiple devices can be embedded in one unit
Can easily be scaled up or modified.
Smaller physical size than hard-wire solutions.
Easier and faster to make changes.
PLCs have integrated diagnostics and override functions.
Diagnostics are centrally available.
Applications can be immediately documented.
Applications can be duplicated faster and less
expensively.
12. 3. Advantages of the PLC.
Connection between switches/output can be
modified through software easily.
Troubleshooting is Easier and Faster.
Ease of Maintenance – less downtime.
Easy to develop Programs by offline simulation
Less amount of Space Needed
Changes are easier and faster to implement,
Integrated diagnostics
13. 3. Advantages of the PLC.
Inputs and Outputs are easier to monitor by
HMI devices....and from PC's
Can withstand severe environmental
conditions.
Cost effective for controlling complex
systems.
Computational abilities make possible more
sophisticated controls
Reliable components make for long uptime
before failure.
14. 4. Disadvantages of the PLC.
Most PLCs manufacturers offer only closed
architectures for their products .
PLC devices are proprietary, proprietary,
which means that parts and from one
manufacturer can’t easily be used in
combination with parts of another
manufacturer, which limits the design and cost
options.
Subject to the limitations imposed by
semiconductor based systems.
Setup and training costs could be high
15. 5. PLC – Configurations
PLCs are of two main configurations.
• Modular Configuration
• Fixed Configuration .
Modular Configuration
16. 5. PLC – Configurations
PLCs are of two main configurations.
• Modular Configuration
• Fixed Configuration
.
Fixed Configuration
17. 6. PLC versus PC
PLC
• Designed for extreme industrial
environments
• Can operation in high
temperature and humidity
• High immunity to noise.
• Integrated Command interpreter
(proprietary)
• No secondary memory like HDD
• Optimized for a Single task
PC
• Mainly for Data Processing & Calculation
• Optimized for Speed
• Not built for extreme enviroments
• Can be programmed in several languages
• Secondary Memory is Built in.
• Built for multitasks
18. 7. Parts of a PLC.
Basic parts of a PLC
Power Supply
Processor Module
CPU
Memory
Communication Interface.
HMI – Status
HMI – Programming
I/O Modules
Discrete/Digital Inputs
Analog Inputs
Output Modules
Sections of a PLC module.
(Courtesy: Mitsubishi Automation)
20. 7. Parts of a PLC.
Power Supply
PLC Power Supply (Courtesy: Allen Bradley)
The system power supply plays a major
role in the total system operation.
Its responsibility is not only to provide
internal DC voltages to the system
components (i.e., processor, memory, and
input/output interfaces), but also:
a) to monitor and regulate the
supplied voltages and warn the
CPU if something is wrong.
b) The power supply, then, has the
function of supplying well-
regulated power and protection
for other system components.
21. 7. Parts of a PLC.
Power Supply
Usually, PLC power supplies require input
from an AC power source; however, some
PLCs will accept a DC power source. Those
that will accept
Most PLCs, however, require a 120 VAC or
220 VAC power source, while a few
controllers will accept 24 VDC.
Since industrial facilities normally
experience fluctuations in line voltage and
frequency, a PLC power supply must be
able to tolerate a 10 to 15% variation in
line voltage conditions.
The first step in estimating the load is to
determine how many modules are required
and then compute the total current
requirement of these modules.
The following table lists the module types,
current requirements for all inputs and
outputs ON at the same time, and the
available power supplies for our
programmable controller example.
22. 7. Parts of a PLC.
Power Supply The first step in estimating the load is to determine how many modules are
required and then compute the total current requirement of these modules.
The following table lists the module types, current requirements for all
inputs and outputs ON at the same time, and the available power supplies for
our programmable controller example.
4
23. 7. Parts of a PLC. CPU (Controller/ Processor)
Memory
Typical Processor
Module
24. 7. Parts of a PLC.
CPU (Controller/ Processor)
Memory
• Processors are either modular or built
into the PLC
• They vary in processing speed and
memory options.
• Processor is optimized for high speed
control and not general purpose
computing.
Allen Bradley SLC 500 CPU
(Courtesy: Allen Bradley)
25. 7. Parts of a PLC.
CPU Functions:
• Executes the operating
system
• Manages memory,
• Monitors inputs,
• Evaluates the
• Means for connecting to
an external programming
device
• Provide system diagnostics
with status LED
indicators.
• It may have a switch for
selecting mode of
operation :
• RUN,
• PROG
• REM
RUN
• Places the processor in the Run mode
• Runs Ladder program and energizes output devices
• Prevents online program editing in this position
• Prevents use of programmer/operator interface device to change
the processor mode
PROG Position
• Sets the processor in the Program mode
• Prevents the processor from scanning or executing the ladder
program, and the controller outputs are de-energized
• Enables program entry and editing
• Prevents you from using a programmer/operator interface device
to change the processor mode
REM Position
• Places the processor in the Remote mode: either the REMote
Run, REMote Program, or REMote Test mode
• Allows you to change the processor mode from a
programmer/operator interface device
• Allows you to perform online program editing
26. 7. Parts of a PLC.
I/O Module
Typical I/O Module
(Courtesy: Rockwell Automation)
27. 7. Parts of a PLC.
Discrete devices are inputs and outputs that have
only two states: on and off.
Discrete I/O modules perform four tasks in the PLC:
• Sense when a signal is received from a field
device.
• Convert the input signal to the correct voltage
level for the particular PLC.
• Isolate the PLC from fluctuations in the input
signal’s voltage or current.
• Send a signal to the processor indicating which
sensor originated the signal.
Examples of discrete input
devices:
ON/SWITCHES
Limit switches.
Push buttons
Output can control ON OFF devices only
28. 7. Parts of a PLC.
Analog devices represent physical
quantities that can have an infinite
number of values. Typical analog
inputs and outputs vary from
0 to 20 milliamps, 4 to 20 milliamps,
or 0 to 10 volts.
Analog I/O modules deals with signals that
are continuously changing. They are
needed for precise control of the process
under the control of the PLC.
Examples,
• Temperature
• Pressure
• Humidity
• Density
• Fluid Level
29. 7. Parts of a PLC.
Communication Modules
Used to establish point-to-point connections
with other intelligent devices for the exchange
of data.
Such connections are normally established with
computers, operator stations, process control
systems, and other PLCs.
Communication modules allow the user to
connect the PLC to high-speed local networks
that may be different from the network
communication provided with the PLC.
Serial Communication Module
(Courtesy: www.automationdirec.com
30. 7. Parts of a PLC.
Other types of output modules
Motion Control Modules
PID Modules
BCD/ASCII Modules
Stepper Motor Control
Encoder Counter Module
High Speed Counters
Motion & Position Control
31. 8. The PLC in Operation.
Three Phase AC Motor Control
The opposite diagram
illustrates the use of a NC
and NO pushbutton switches
to control the 3 phase AC
motor.
The ON/OFF control of the 3
phase motor can also be
implemented with a PLC.
First, we need to understand
the use of Logic gates.
32. 8. The PLC in Operation.
Logic Gates A logic gate is a circuit with several inputs but only
one output that is activated by particular combinations of
input conditions.
Boolean algebra as related to AND, OR, and NOT functions.
33. 8. The PLC in Operation.
The PLC, as used to control the operation of the AC
motor responds to the presence or absence of Logic
signals at its I/O module to control response the
output devices that receive signal from the output.
Examples of discrete inputs: Push Buttons, selector
switches, limit switches, proximity switches.
Example of discrete outputs devices: Indicator Lights,
Relays, Motor Starters.
34. 8. The PLC in Operation. PLC Control of AC Motor
PLC Control: ( Phase Motor in OFF position)
35. 8. The PLC in Operation. PLC Control of AC Motor
PLC Control: (Phase Motor in START position)
36. 8. The PLC in Operation. PLC Control of AC Motor
PLC Control: (Phase Motor in RUNNING position)
37. 8. The PLC in Operation. PLC Control of AC Motor
PLC Control: (Phase Motor in switch OFF position)
38. 8. The PLC in Operation.
PLC Control – More Examples
Manufacturing,
Mining,
CNC
Assembly Line Processes
PLC Control: (Other Examples)
39. 8. The PLC in Operation. PLC – Program Execution Cycle
The processor (CPU) is the “brain” of the
PLC.
What the CPU does:
Implements the logic and controlling the
communications among the modules.
Stores program information and logical operations
results in memory - EPROM or EEPROM plus RAM.
Controls all PLC activity.
Enables user to enter in the desired program in
relay ladder logic
Typical PLC CPU (Courtesy: Rockwell Automation)
40. 8. The PLC in Operation. PLC – Program Execution Cycle
The PLC program is executed as
part of a repetitive process referred
to as a scan.
A typical PLC scan starts with the
CPU reading the status of inputs.
Next, the application program is
executed.
Next, the CPU performs internal
diagnostic and communication tasks.
Finally, the status of all outputs is
updated.
This process is repeated
continuously as long as the PLC is in
the run mode.
41. 9. Ladder Logic
The devices that control the logic functions of
a control system are physical wired. This is
called hard wired logic.
Hard wired logic is done by using relay ladder
schematics.
Control scheme and the associated control
elements are represented between two power
lines.
All control element are placed in a ladder like
function between the two power lines.
42. 9. Ladder Logic
The PLC logic function can be similary
represented in a ladder logic diagram.
Major difference is that the hard wired logic
can only be modified by rewiring and changing
element as needed. The PLC control function
depends on the logic states of the outputs and
these are very easy to change through the
software program.
44. 9. Ladder Logic
• PLC express control logic in terms of contact
symbols symbols.
• Symbols are the same as those used for hard
wired relay control circuits.
• A rung is the contact symbolism required to
control an output.
• A complete ladder logic program has several
rungs of ladder, each of which controls an
output.
• In PLC logiclogic all mechanical switch contacts
are represented by a software contact symbol
and all electromagnetic coils are represented
by a software coil symbol.
• The PLC uses ladder logic diagrams, the
conversion from any existing relay logic to
programmed logic is therefore simplified.
• Each rung is a combination of input conditions
(symbols) connected from left to right, with the
symbol that represents the output at the far right.
• The symbols that represent the inputs are connected
in series, parallel, or some combination of the two
to obtain the desired logic.
CPU Scan Time
While in operation, the controller scans the logic
stored in the CPU memory continuously.
The completion of a cycle of the controller is
called a Scan.
The scan time needed to complete a full cycle by
the controller gives the measure of the speed of
execution for the PLC.
45. 9. Ladder Logic
Two limit switches connected in series
and used to control a solenoid valve
46. 9. Ladder Logic
Two limit switches connected in parallel
and used to control a solenoid valve
47. 9. Ladder Logic
Two limit switches connected in parallel with each
other and in series with a pressure switch and used
to control a solenoid valve
48. 9. Ladder Logic
A motor control circuit with two start/stop buttons. When
either start button is depressed, the motor runs. By use of
a seal-in contact, it continues to run when the start button
is released. Either stop button stops the motor when it is
depressed
49. 10. Programming the PLC
The system to be controlled by
the PLC is first described in ladder
logic.
Next the ladder logic is compiled
and translated into basic
instructions that are uploaded into
the PLC memory by the
programmer.
The programming is done while
the PLC is set to TERMINAL OR
PROGRAMMING MODE.
Programming can be done through
a PLC Programmer or a PC that
has the programming software.
51. SIMATIC S7-300
in the system familyUpper and mid
performance range
S7-400
Lower and mid
performance range
S7-300
Bottom
performance range
S7-200
+ Programming devices
+ STEP 7 software
+ Communication
+ HMI
S7-300 - the universal,
small control system for
versatile applications in
automation engineering
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
52. The new S7-300 compact CPUs
3 basic types:
With different memory
sizes and performances
312C: 16 Kbyte
313C: 32 Kbyte
314C: 48 Kbyte
The versions differ with respect to
- I/Os
- Onboard interfaces
- Process functions
312C
313C
313C-2 DP
313C-2 PtP
314C-2 DP
314C-2 PtP
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
53. Dimensions and design
Onboard I/Os:
Integral interfaces:
Max. design:
DI/DO
MPI
1 tier
DI/DO +
AI/AO
MPI
4 tiers
DI/DO
MPI +
PtP/DP
4 tiers
DI/DO + AI/AO
MPI + PtP/DP
4 tiers
312C
80 mm
313C
120 mm
313C-2 PtP
313C-2 DP
120 mm 120 mm
314C-2 PtP
314C-2 DP
125 mm
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
54. Memory,
performance and
quantity breakdown
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC 312C 313C 314C
Main memory 16 kB 32 kB 48 kB
Statements 5 k 10 k 16 k
Loading memory plug-in 64k-4MB plug-in 64k-4MB plug-in 64k-4MB
Instruction runtime min. 0.2 µs min. 0.1 µs min. 0.1 µs
Alarm response time 800 µs 400 µs 400 µs
Bit memories 1024 2048 2048
Timers / counters 128 / 128 256 / 256 256 / 256
Address space I/O 1024 / 1024 byte 1024 / 1024 byte 1024 / 1024 byte
No. of digital channels 266 1000 1000
No. analog chann. I/O 64 / 64 248 / 248 248 / 248
11. Siemens SIMATIC S7 300
55. Integral I/Os - summary
Low-cost onboard I/O channels for universal use
Every digital input can be used as an alarm input
Analog inputs can also be used as digital inputs
* Additional input for resistance measurement
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
312C 313C 314C
313C 313C-2 PtP / DP 314C-2 PtP / DP
Number of DIs 10 24 16 24
Number of DOs 6 16 16 16
Number of AIs -/- 4 + 1* -/- 4 + 1*
Number of AOs -/- 2 -/- 2
11. Siemens SIMATIC S7 300
56. Integral digital I/OsOverview
Comparison
I/O‘s
Process Functions
Communication
MMC
Digital
inputs
Digital
outputs
Rated voltage DC 24 V DC 24 V
Permissible range DC 20.4 - 28.8 V DC 20.4 - 28.8 V
Current range --- 0.5 A
Input delay 0.1/0.5/3/15 ms ---
Switch-off delay --- 2 ms
Electrical isolation from
backplane bus
yes yes
Groups of 16 8
Max. frequency --- 100 Hz
11. Siemens SIMATIC S7 300
57. Integral analog I/Os
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
Analog
inputs
Analog
outputs
Measuring ranges
Voltage ±10V; 0..10V ±10V; 0..10V
Current ±20mA; 0/4..20mA ±20mA; 0/4..20mA
Resolution 11 bits+sign 11 bits+sign
Filter (50/60 Hz) selectable ---
Input delay 5 ms ---
Output delay --- 1,2 ms
Electrical isolation from
backplane bus
yes yes
11. Siemens SIMATIC S7 300
58. Summary of process functionsOverview
Comparison
I/O‘s
Process Functions
Communication
MMC
312C 313C 314C
Counting
Connectable sources Incremental encoder,
pulse generator with
direction signal
Incremental encoder,
pulse generator with
direction signal
Incremental encoder,
pulse generator with
direction signal
Number of channels 2 3 4
Cut-off frequency 10 kHz 30 kHz 60 kHz
Frequency measurem. yes yes yes
PWM
Number of outputs 2 3 4
Cut-off frequency 2.5 kHz 2.5 kHz 2.5 kHz
Positioning no no 1 axis
Control - PID PID
11. Siemens SIMATIC S7 300
59. Integral counters
Integral counters in all compact CPUs
- Recording of pulse and incremental encoder
signals (DC 24V)
- Forward/reverse with reference values which
can be changed during operation
- 10 - 60 kHz (depending on CPU)
Various operating modes possible
- Single counting (e.g. filling, dosing)
- Periodic counting (e.g. recording of angle)
- Counting with gate control (e.g. length measurement)
Frequency measurement
- Counting with fixed time base
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
60. PWM outputs
Pulse outputs on all compact CPUs
- Direct control of valves, actuators, switchgear,
heaters etc. (DC 24 V/ 0.5 A)
- Period and pulse/pause ratio can be changed
during operation
- 2.5 kHz switching frequency, up to 4 outputs
(depending on CPU)
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
61. Simple motion control
without additional Components
Low-price
Since no additional modules required
Optimum memory requirements and runtime
No additional programming requirements
since function is component of operating
system
Flexible
Parameters (delay, acceleration etc.) can be
changed for each travel
Various operating modes selectable: absolute
or relative positioning, inching etc.
Simple
Prepared functionality can be linked into
application program using standard blocks
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
62. Summary of communications
312C
313C 314C-2 PtP
313C-2 PtP
314C-2 DP
313C-2 DP
MPI
Point-to-
point
PROFIBUS
DP
Interface present on all CPUs - networking of CPU, programming device and OPs
Low-cost communications without additional HW - extremely simple configuring
Communication with up to 7 OPs simultaneously (depending on type of CPU)
Serial onboard interface
Data exchange e.g. with
devices from other
vendors
Fast, cyclic data exchange
High data security
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
63. On every CPU:
multipoint interface MPI
Data exchange: 187.5 kbit/s
Up to 32 bus stations, up to 12
active connections per CPU
Communications functions:
- Programming device/operator
panel functions
- Global data communications
without programming input
- S7 basic communication up to 76
byte
- S7 communication (only server)
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
Low-cost communication
without additional hardware
11. Siemens SIMATIC S7 300
64. Point-to-point interface (RS422/485)
Connection of non-system components
CPU 313C-2 PtP / 314C-2 PtP
Transmission physics:
- RS 422/485 (X.27)
- Transmission rate: up to 19.2 / 38.4 kbit/s (half duplex/full duplex)
Protocols:
- ASCII
- 3964(R)
- RK 512
- (only 314C-2 PtP)
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
65. CPU 313C-2 DP,
314C-2 DP,
integral PROFIBUS-DP
Versatile use:
master or slave function
Data exchange at 12 Mbit/s
Up to 32 DP stations
to master interface
Max. distance 23 km using FO
Communications functions:
- All programming device/OP
functions
- PROFIBUS-DP
PG
PROCESSFIELDBUS
S I E M E N S
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
No additional module
or software required!
11. Siemens SIMATIC S7 300
66. SIMATIC Micro Memory Card
Many functions - small format
Can be used in every S7-300 compact CPU
Functions as program memory, non-volatile and
resistant to overall reset; transportable for simple
program updating
Functions as loading memory - flexible as result
of selectable MMC sized between 64kB and 4MB
Permits project storage on CPU - save your
complete project on the MMC
Access to the MMC during RUN mode of CPU
- Load data into CPU (recipe)
- Write data onto MMC (archive)
MMC buffers your data in the main memory in
event of power failure
no backup battery required
MMC is required to operate the compact CPUs
Overview
Comparison
I/O‘s
Process Functions
Communication
MMC
11. Siemens SIMATIC S7 300
67. 12. Troubleshooting & Maintenance
• Ground yourself by touching a conductive surface before
handling static-sensitive components.
• Wear a wrist strap that provides a path to bleed off any charge
that may build up during work.
• Be careful not to touch the backplane connector or connector
pins of the PLC system (always handle the circuit cards by the
edge if possible).
• Be careful not to touch other circuit components in a module
when you configure or replace its internal components.
• When not in use, store modules in its static-shield bag.
• If available, use a static-safe work station.