PLC Basic For Instructions
PLC Basic For Instructions
Objectives
PLC Defined
Parts of PLC
PLC Operation
PLC Programming
PROGRAMMABLE
MEMORY
LOGIC
SEQUENCING
TIMING
ARITHMETIC
6-1
boiler_bursting_md_wht.gif
MACHINE OR PROCESS
PLC Defined
A PLC is a specialized
computer, designed to
withstand the harshness
of industrial environment
and to perform a
specified task.
Benefits of PLC
Flexibility and Functionalities
Lower cost
Immediate documentation
Reliability/Maintainability
Applications of PLC
PLC
APPLICATIONS
MACHINE CONTROL or
FACTORY AUTOMATION
PROCESS CONTROL
Applications of PLC
What PLC’s can Do
SUPERVISORY
• Process Monitoring
SOPHISTICATED and Alarm
• Fault Diagnostic and
SEQUENCE • Arithmetic
monitoring
• Conventional Operation
• Interfacing w/
Relay Logic • Information
Computer
Replacer Handling
• Printer / ASCII
• Timers / Counters • Analog Control
Interfacing
• PCB Card • PID Control
Controller • Factory Automation
• Servo motor
Replacer Networking
control
• Auto/ Semi-auto/ • LAN/WAN
• Stepper motor
Manual control of control
machine and
processes
Classification of PLC (no. of I/O’s)
Micro
Up to 32 I/O’s
Small
Up to 128 I/O’s
Medium
Up to 1024 I/O’s
Large
Up to 8192 I/O’s
Classification of PLC (enclosure/ function)
Compact/
CPU, Power Supply, I/O Modules in an enclosure
Shoebox
Expandable but only handles limited I/O’s
INPUT OUTPUT
MODULE MODULE
CPU
PROGRAMMING
DEVICE
HUMAN
MACHINE INTERFACE
SERIAL DEVICES
S7-200 PLC
INPUT\OUTPUT MODULES
▪ Discrete
▪ Analog
▪ High Speed Pulse
▪ Register (BCD)
Typical Discrete Input Module Circuit
com com
input1 input2 input3 input4 input5 input6
Input Module
LIMIT
SWITCHES
ELECTRO-
MECHANICAL
SWITCHES LASER
PHOTOELECTRIC
SENSORS
SENSORS
PROXIMITY
SENSORS ON or OFF
FIBER OPTIC
SENSORS
LIGHT
CURTAINS
Analog Input
TACHOGENERATORS
THERMOCOUPLE
LOAD CELL
PRESSURE SENSORS
4-20 mA
1-5 Vdc
RTD’s 0-10 Vdc
-10 to +10 Vdc
Pulsed Input
RELATIVE ROTARY
ENCODER
REGISTERS (BCD) INPUT
800px-Rotatory_EnDat_Encoder
THUMBWHEEL
SWITCH
ABSOLUTE ROTARY
ENCODER
Typical Discrete Output Module Circuit
com
output1 output2 output3 output4
Transistorized Output
Typical Discrete Output Module Circuit
com
output1 output2 output3 output4
Relay Output
DISCRETE OUTPUT
4-kuhnway
SOLENOID
VALVES
SSR
RELAY
COILS
LAMPS
ON or OFF
CONTACTOR
COILS
Analog Outputs
4-20 mA
1-5 Vdc
0-10 Vdc
-10 to +10 Vdc
VARIABLE
FREQUENCY DRIVE PANEL
(ANALOG INPUT) METERS
VALVE
POSITIONER
PULSED OUTPUT
ROBOCYLINDERS
SERVO/STEPPER
MOTORS High Speed Pulse
REGISTER (BCD) OUTPUT
BCD
Central Processing Unit
Central Processing Unit
CPU contains:
• Microprocessor
• Memory System
• supporting circuitry
Memory
SYSTEM
MEMORY
APPLICATION
MEMORY
System Memory
• operating
system EXECUTIVE
• PLC
MEMORY
capabilities
SCRATCH
PAD • calculation
• control
DATA TABLE
AREA
USER
PROGRAM
AREA
Application Memory
EXECUTIVE
MEMORY
SCRATCH
• stores all data PAD
associated
with the control DATA TABLE
program
AREA • provides storage
for programmed
USER instructions entered
PROGRAM by the user
AREA
Memory Map
EXECUTIVE
MEMORY
SCRATCH
PAD
INPUT TABLE
OUTPUT TABLE
INTERNAL BITS
REGISTERS/ WORDS
USER
PROGRAM
AREA
S7-200 Memory System
Program Block Program Block
Program Block
System Block System Block System Block
Data Block
V Memory Data Block
M Memory
M Memory
(permanent area)
Timer and Counter RAM Forced Values
Current Value
Read
Inputs Execute
Programs
PLC Scan
Write Cycle
Outputs
Diagnostics/
Communications
input
device converter opto-isolator input logic
“1”
“0”
power
supply
to CPU
Opto-isolator
Opto-isolators act as a protection
mechanism, ensuring that harmful
electrical currents cannot flow across the
device. In simplest terms, an opto-isolator
works by taking an input electrical signal
and converting it into a light signal using a
light-emitting diode, generally operating in
the near-infrared spectrum.
PLC memory
can be read
through word
PII
PIQ
output
output logic opto-isolator switching device
relay
“0”
“1”
power
supply
from
CPU
Putting them together…
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
150 0 0 0 0 0 0 0
Process Image for
Output
I0.0 I0.1 Q0.0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Input
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Output
I0.0 I0.1 Q0.0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Input
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Output
I0.0 I0.1 Q0.0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Input
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Output
I0.0 I0.1 Q0.0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 1 1
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
.
150 0 0 0 0 0 0 0
Process Image for
Input
PLC OPERATION
PROGRAM DOWNLOAD
Microprocessor
Power
Supply AC
PLC OPERATION
READ INPUT
STATUS RUN MODE
MicroProcessor
Power
Supply AC
PLC OPERATION
MicroProcessor
Power
Supply AC
PLC OPERATION
WRITE
OUTPUT RUN MODE
MicroProcessor
Power
Supply AC
PLC OPERATION
RUN MODE
MicroProcessor
Power
Supply AC
PLC OPERATION
RUN MODE
MicroProcessor
Power
Supply AC
PLC OPERATION
RUN MODE
USER PROGRAM
000 001 002 500 OUTPUT REGISTER
005 004 003 002 001 000 503 502 501 500
0 0 0 1 1 1 0 0 0 0
1
PLC OPERATION
MicroProcessor
Power
Supply AC
SIMATIC S7-200
SIMATIC S7-200
Positioning within the SIMATIC family
Micro Automation Totally Integrated
Automation
S7-200
S7-300
LOGO!
S7-400
SIMATIC S7-200
S7-200 Second Generation Overview
CPU 221 CPU 222 CPU 224
(10 I/O Points) (14 I/O Points) (24 I/O Points)
CPU 224XP (24 I/O + 2AI/1AA) CPU 226 (40 I/O Points)
SIMATIC S7-200
Features: CPUs (1/2)
Features CPU 221 CPU 222
Integrated Inputs/Outputs 6DE/4DA 8DE/6DA
Max. Expansion Modules - 2
Max. # of Dig. I/O Channels 10 78
Analogue Points In/Out/Max - 8/4/10
Program/Data Memory 4KB/2KB 4KB/2KB
Boolean Execution Time 0.22 µs 0.22 µs
Bit Relays/Counters/Timers 256/256/256 256/256/256
High Speed Counters 4 x 30 kHz 4 x 30 kHz
Real Time Clock optional optional
Pulse Outputs 2 x 20 kHz 2 x 20 kHz
Communication Interface 1x RS-485 1x RS-485
Analogue Potentiometers 1 1
SIMATIC S7-200
Features: CPUs (2/2)
Features CPU 224 CPU 224XP CPU 226
Integrated Inputs/Outputs 14 DE/10 DA 14 DE/10 DA 24 DE/16 DA
Integrated Analogue In/Out - 2AE/1AA -
Max. Expansion Modules 7 7 7
Max. # of Dig. I/O Channels 168 168 248
Analogue Points In/Out/Max 28/14/35 30/15/38 28/14/35
Program/ 8/12 KB 12/16 KB 16/24 KB
Data Memory 8 KB 10 KB 10 KB
Boolean Execution Time 0.22 µs 0.22 µs 0.22 µs
Bit Relays/Counters/Timers 256/256/256 256/256/256 256/256/256
4 x 30 kHz
High Speed Counters 6 x 30 kHz 6 x 30 kHz
2 x 200 kHz
Real Time Clock Integrated Integrated Integrated
Pulse Outputs 2 x 20 kHz 2 x 100 kHz 2 x 20 kHz
Communication Interface 1 x RS-485 2 x RS-485 2 x RS-485
Analogue Potentiometers 2 2 2
SIMATIC S7-200
Built-in Features
Cartridge Slot CPU Status I/O Point Internal:
LEDs Status LEDs - Power Supply
- Super Capacitor
- Clock (224(XP),226)
Communication
Port(s)
SIMATIC S7-200
224XP Built-in Features
I/O Point Internal:
Status - Power Supply
LEDs - Super Capacitor
- Clock (for 224, 224XP, 226)
CPU Status
LEDs Mounting Holes
for Panel
Installation
Removable
Analogue
Terminals
Removable
Terminal Blocks
(224,226)
Cartridge Slot
Snap-On Clip
for DIN Rail Mounting
Communication 24V Sensor
Ports Power Output
SIMATIC S7-200
SIMATIC S7-200 in detail ...
Clock and battery module
◼Real-time clock and calendar
(for 221, 222 CPU)
◼ Typically 200 days backup
Battery module
◼Backup of the internal data
(data block)
◼Typically 200 days backup
SIMATIC S7-200
Diagnostic LED on
▪ All the new and improved CPUs
have a multi purpose Diagnostic LED
▪ The Diagnostic LED is combined with the System Fault LED
▪ The combined LED is either RED or YELLOW depending on the fault
▪ The Diagnostic LED is controlled by both the operating system and the user’s program by
means of the Diagnostic instruction
▪ The Diagnostic LED can be turned on when a value is FORCED or an I/O Error occurs or
the USER’s program commands it on
SIMATIC S7-200
S7-200 Networking possibilities
S7-22X CP EM EM CP CP
243-2 277 241 243-1 243-1 IT
+ Email
+ HTML
+ FTP
Ethernet Network
Telefon Network
PPI/MPI Network
SIMATIC S7-200
STEP7-Micro/WIN 4.0
Setting THE Standard
in Micro PLC Programming
SIMATIC S7-200
Your Choice of Editors
▪ Use the right tool for the job
▪ Ladder & FBD editors for graphic LADDER
languages (IEC 1131-3)
▪ STL for text programming
▪ Switch between editors as necessary
▪ Easy error identification
▪ Save project in any case
STL
FBD
SIMATIC S7-200
Function Block Diagram - FBD
STL- Statement List
PLC Ladder diagram
PLC PROGRAMMING
Defining the Control Task
GRAFCET Method
Relay Pattern
GRAFCET Method
Permissible Operands:
▪ A drill motor is started clockwise with S1. After 3s, the feed is
activated.
▪ When the depth limit at I0.3 is reached, the feed is de-activated. A
spring returns the drill to the initial situation. In doing so, the drive turns
anti-clockwise (Q0.0 and Q0.1 are "1").
▪ When the initial situation I0.4 = "1" is reached, the drive continues to
operate for 1s until the drill is fully switched off.
▪ The drill can always be switched off with Stop (activation with I0.0 =
"0").
• A control method in which a task is broken down
into very small, usually sequential, subtasks (e.g.
Motor on, feed on, feed off, ...).
• The subtasks (functions) are called steps.
• Usually one step has to be completed before the
next one is started.
• A new step becomes active when the relevant
transition condition is active.
• A step is active when the associated step flag,
e.g. M0.1 = "1".
• Each step is started (activated) by a condition).
The condition is usually derived from the states of the machine.
These can include actuated limit switches, operator keys,
temperatures reached or timers.
• An active preceding step is almost always part of the
condition.
• If a new step flag is set, the step flag of the preceding step is
reset.
• If two or more processes must be controlled simultaneously and
independently, separate sequencers are used. This is shown in the
diagram below.
Thank You !