Programmable Logic Controller basics
Programmable Logic Controller basics
LOGIC
CONTROLLER
SCADA
Hardware
and
Communicat
ion
2
▪ What is PLC
▪ PLC Basic
▪ Architecture
▪ PLC Application
▪ Siemens PLC
▪ Hardware
▪ Communication
▪ Software Overview
3
What is PLC?
▪ PLC is a digital computer designed for multiple input and output arrangements, extended temperature ranges, immunity to electrical
noise and resistance to vibration and impact.
▪ They both have a power supply, a CPU (Central Processing Unit), inputs and outputs (I/O), memory, and operating software (although
it’s a different operating software).
▪ Automation – is basically the delegation of human control function to technical equipment aimed toward achieving.
▪ Higher productivity
4
PLC Basics
▪ PLCs, created by Dick Morley in 1964, have transformed the industrial and
manufacturing sectors with functions such as timing, counting, and signal
processing.
▪ The main advantage of a PLC over a “hard-wired” control system is that you can go
back and change a PLC after you’ve programmed it, at little cost (just the cost of the
programmer’s time). In a hard-wired control system, you’re essentially having to rip
out wires and start from scratch, (which is more expensive and takes longer).
5
Evolution of PLC
PLC Control
Electronic Control
Manual Control
6
Evolution of PLC
▪ First generation PLCs (1970s) were large, expensive, and used primarily to replace relay-based control systems.
▪ Second generation PLCs (1980s) added more memory and processing power, and began to use more standardized programming
languages. They also started to incorporate more advanced functions such as timers, counters, and data manipulation.
▪ Third generation PLCs (1990s) became more compact and efficient, and were able to control a wider range of industrial processes.
They also began to incorporate networking capabilities, allowing PLCs to communicate with other devices and systems.
▪ Fourth generation PLCs (2000s) They also began to incorporate advanced features such as Ethernet connectivity, support for
industrial protocols such as Modbus and Profinet, and the ability to handle large amounts of data.
▪ Fifth generation PLCs (2010s) built-in high-speed communication interfaces, support for IoT and cloud connectivity, and advanced
security mechanisms.
▪ Currently, sixth-generation PLCs More robust support for IoT, AI and Machine Learning, Cybersecurity, and can be accessed remotely,
offer more flexibility in terms of scalability.
7
PLC Manufacturer company
8
PLC Advantages
▪ High Reliability
▪ Small Space Requirements
▪ Computing Capabilities
▪ Reduced Costs
▪ Ability To Withstand Harsh Environments
▪ Expandability
9
PLC Setup
10
Physical Structure of PLC
11
Types of PLC
12
SIEMENS S7 – Within the system family
Micro PLCs
S7-200
❖ Programming devices
❖ STEP 7 software
❖ Communication
❖ Human-machine Interface
13
Siemens S7– Ranges
▪ PS - Power supply
▪ CPU - Central processing Unit
▪ IM - Interface Module
▪ SM - Signal Module (I/O modules)
▪ Bus connector Rack – Eleven Slot rail
▪ CP - Communication Processor
▪ FM -Functional Module
15
Basic components
16
CPU Overview
▪ CP the standard CPU for a wide range of application with integrated PROFIBUS DP interface.
17
The Compact CPUs - Highlights
▪ Integrated Functions
▪ Count/Measure, control, Positioning.
▪ Integrated I/O
▪ Digital, Analog
▪ Integrated Communication Interfaces
▪ In addition to MPI, also PROFIBUS DP and point-to-point
18
Test and diagnostics functions
▪ System diagnostics
▪ Fault diagnostics from CPU to I/O
▪ Internal CPU services (e.g error message with time stamp)
▪ Process diagnostics
▪ Monitoring critical process signals at the program level.
▪ CPU generates messages automatically for S7 HMI
▪ So that your service personnel can diagnose the problem sooner.
19
The Input/Output System
20
Input and Output Devices
▪ Outputs are devices that await a signal/data from the PLC to perform their control functions.
21
Analog and Discrete Devices
▪ Discrete devices are inputs and outputs that have only two states: on and off.
▪ Analog devices are inputs and outputs that can have an infinite number of states. These devices can not only be on and off, but they
can also be barely on, almost totally on, not quite off, etc.
▪ These devices send/receive complex signals to/from a PLC. Their communications consist of a variety of signals, not just 1s and 0s.
22
CPU – Communication ports
▪ MPI is used for PLC programming, inter CPU communication, SCADA/HMI communication
▪ In addition to above profibus is also used for remote I/Os and Drives communication.
MPI Profibus
23
Communications integrated: MPI, PROFIBUS-DP
interface
▪ Interfaces
▪ MPI intergraded into every CPU.
▪ DP in 314 2DP, 315-2 dp, 316-2DP, 318-2DP.
▪ Programming from any point in the network.
▪ HMI services for connection of OP/OS
▪ No additional programming
▪ Minimal CPU cycle load
24
Addressing Concepts
▪ The signal modules (I/O) can be put from slot no 4 onwards. When we do the I/O configuration byte numbers required for each
modules are defined by the system which we can use in the programming.
▪ In certain CPUs these Byte numbers can be changed by the user. Generally, system defined addressing is preferred as it avoids
memory holes.
25
I/O Addressing
I 0 : 0 (0 to 7)
I 1 : 0 (0 to 7)
Q 0 : 0 (0 to 7)
Q 1 : 0 (0 to 7)
26
Block Type
27
CPU-Memory organization
▪ Load memory:- Users program stored, capacity can be changed by MMC up to 256k.
▪ System memory:- Holds OS, Timer, Counter, Memory bits, Process Image Memory, Buffer diagnostics.
28
Memory addressing
▪ M – Marker memory
▪ MB - Memory byte
▪ MW – Memory word
▪ MD – Memory double word
29
Memory addressing
▪ MW0,MW2,MW4,………………..MW126
▪ 16 BITS = 65536 OR -32767 to 32767
▪ Word address is used to display Timer & counter value and for integer function within above limit.
▪ MD0,MD4,MD8,……………………MD124
▪ Double word address is used for integer function value more than word limit.
30
PLC Programming
▪ A PLC program consists of a set of instructions either in textual or graphical form, which represents the logic that governs the process
the PLC is controlling. There are two main classifications of PLC programming languages, which are further divided into many sub-
classified types.
▪ Textual Language
▪ Instruction list
▪ Structured text
▪ Graphical Form
▪ Ladder Diagrams (LD) (i.e. Ladder Logic)
▪ Function Block Diagram (FBD)
▪ Sequential Function Chart (SFC)
31
Programming Language
32
STL :- Structural Text Language
▪ Structured text, a programming language for PLCs, uses simple statements to dictate operations. It is similar to conventional
programming but isn’t case-sensitive, using operators to express logic and relationships.
A
(
A I0.0
A I0.1
)
= Q0.0
33
Functional Block Diagram (FBD)
▪ Functional Block Diagram (FBD) is a simple and graphical method to program multiple functions in PLC. PLC Open has described using
FBD. A function block is a program instruction unit that, when executed, yields one or more output values.
▪ It is represented by a block, as shown below. It is represented as a rectangular block with inputs entering on the left and output lines
leaving on the right. It gives a relation between the state of input and output
34
Instructions
▪ ---------| |------------ NO
▪ ---------| \|------------NC
▪ ---------( )------------ O/P COIL
▪ ---------(S)----------- SET COIL
▪ ---------( R )---------- RESET COIL
▪ ----------( P )--------- POSITIVE EDGE
▪ ----------( N )---------- NEGATIVE EDGE
35
Instructions
36
PLC – LED Description
▪ SF
▪ 1. Hardware faults
▪ 2. Programming errors
▪ 3. Parameter assignment errors
▪ 4.Calculation error
▪ 5.faulty memory card
▪ 6. I/O fault / error
▪ 7. Communication error
▪ BATF
▪ The backup battery is missing, faulty or not charged.
It also is on when an accumulator is connected. The
reason for this is that the user program is not back
up by the accumulator.
37
PLC – LED Description
▪ STOP Flashes
▪ When CPU is not processing a user program. The CPU requests a
memory reset.
38
Logic Gates with ladder diagram
▪ OR Logic
39
AND Logic
40
NOT Logic
41
NAND Logic
42
NOR Logic
43
Ex- OR
44
Ex - NOR
45
Ladder diagram for Motor starter :
46
Motor Control Circuits
47
Thank you
48