of 67
8/9/2019 14249646-plcnotesppt
1/67
SiemensS7-200 PLC training courses
8/9/2019 14249646-plcnotesppt
2/67
PLC history
Classical control
- More complicated- Longer time for maintenance
- Time consuming troubleshooting
- Occupies larger area in switchboards- Requires more wiring
- Standard reliability
8/9/2019 14249646-plcnotesppt
3/67
History
Large projects requirements
-More inputs and outputs points
-Large program memory
-Several programming instructions-Communication with other equipments
-Deal with analogue signals
-Deal with large number of counters, timersand markers
8/9/2019 14249646-plcnotesppt
4/67
History
Historical view
8/9/2019 14249646-plcnotesppt
5/67
Course contents
Introduction to PLC
Bit logic
compare
Timers
Counters
Memory instructions
AnalogI/
O Move , shift
Practical examples
8/9/2019 14249646-plcnotesppt
6/67
Introduction
What is a PLC
8/9/2019 14249646-plcnotesppt
7/67
Introduction
Basic PLC operation
8/9/2019 14249646-plcnotesppt
8/67
introduction
S7 200 family
8/9/2019 14249646-plcnotesppt
9/67
introduction
S7-200 configuration
8/9/2019 14249646-plcnotesppt
10/67
introduction
S7-200 configuration
mode switch and analog adjustment
8/9/2019 14249646-plcnotesppt
11/67
introduction
S7-200 configuration
optional cartidge
8/9/2019 14249646-plcnotesppt
12/67
Introduction
S7-200 configuration
expansion modules
8/9/2019 14249646-plcnotesppt
13/67
Introduction
S7-200 configuration
status indicator
8/9/2019 14249646-plcnotesppt
14/67
Introduction
S7-200 configuration
I/O numbering
8/9/2019 14249646-plcnotesppt
15/67
Introduction
S7-200 configuration
inputs
8/9/2019 14249646-plcnotesppt
16/67
Introduction
S7-200 configuration
outputs
8/9/2019 14249646-plcnotesppt
17/67
Introduction
S7-200 configuration
programming software
8/9/2019 14249646-plcnotesppt
18/67
Analogue I/O= Typical analogue signals from 0-10 VDC or 4-20 mA
= They are used to represent changing values such as
speed, temperature, weight and level
8/9/2019 14249646-plcnotesppt
19/67
Introduction
Analogue outputs may be used to produce
variable reference signals for devicessuch as:
# Control valves
# Chart recorders
# Electric motor drives
# Pressure transducers
# Analogue meters
8/9/2019 14249646-plcnotesppt
20/67
Introduction
8/9/2019 14249646-plcnotesppt
21/67
Introduction
8/9/2019 14249646-plcnotesppt
22/67
Introduction
8/9/2019 14249646-plcnotesppt
23/67
PLC Programming
8/9/2019 14249646-plcnotesppt
24/67
Programming languages
Statement list Function block
Ladder diagram
The instructions are represented
by graphic symbols:
Contacts, Coils & Boxes
The ladder diagram is the most
popular programming language
8/9/2019 14249646-plcnotesppt
25/67
Instructions
Standard instructions:
They are used in most programs.
Examples: timer, counter, math, logical, incr., decr. and move
High speed instructions:
They allow for events and interrupts to occur independently ofthe PLC scan time.
Examples: High speed counters and interrupts
Special instructions:
They are used to manipulate data
Shift, table, conversion, real time instruction.
8/9/2019 14249646-plcnotesppt
26/67
Bit Logic instruction
Normally Open contact
Normally Open Immediate contact
Normally Closed contact
Not contact
Normally Closed Immediate contact
Positive Transition contact
Negative Transition contact
Input Instructions
8/9/2019 14249646-plcnotesppt
27/67
Input contactsexample
8/9/2019 14249646-plcnotesppt
28/67
Outputinstructions
Output Instruction
No Operation instruction
Output Immediate instruction
Set (N bits) instruction
Reset (N bits) instruction
Set Immediate (N bits) instruction
Reset Immediate (N bits) instruction
8/9/2019 14249646-plcnotesppt
29/67
Output,Set & Resetexample
8/9/2019 14249646-plcnotesppt
30/67
Startingamotor
8/9/2019 14249646-plcnotesppt
31/67
8/9/2019 14249646-plcnotesppt
32/67
Using PLC
Before start
Starting
After start
8/9/2019 14249646-plcnotesppt
33/67
Stopping
8/9/2019 14249646-plcnotesppt
34/67
Input & Output connections
8/9/2019 14249646-plcnotesppt
35/67
Timerinstructions
On-Delay Timer
Retentive On-Delay Timer
Off-Delay Timer
8/9/2019 14249646-plcnotesppt
36/67
On-Delay & RetentiveOn-Delaytimers
They count time when the enabling input (IN) is ON.
the preset time (PT), the timer bit is ON.>When the current value (Txxx) is
The On-Delay timer current value is cleared when (IN) is OFF, while the
current value of the Retentive On-Delay Timer is maintained.
You can use the Retentive On-Delay Timer to accumulate time for multiple
periods of the input ON.
8/9/2019 14249646-plcnotesppt
37/67
8/9/2019 14249646-plcnotesppt
38/67
Timersnumbers & resolutions
Note
You cannot share the same timer numbers for TOF and TON.
For example, you cannot have both a TON T32 and a TOF T32.
8/9/2019 14249646-plcnotesppt
39/67
Timerexamples
On-Delay
Off-Delay
RetentiveOn-Delay
8/9/2019 14249646-plcnotesppt
40/67
Hard-wiredon-delaytimer
8/9/2019 14249646-plcnotesppt
41/67
Timerexample
TONR l
8/9/2019 14249646-plcnotesppt
42/67
TONR example
Ti l
8/9/2019 14249646-plcnotesppt
43/67
Timerexample
C t i t ti
8/9/2019 14249646-plcnotesppt
44/67
Counterinstructions
Up counter
Up/down counter
Down counter
A bottling machine, for example, may use a counter to count
bottles into groups of six for packaging.
U t
8/9/2019 14249646-plcnotesppt
45/67
Up-counter
It counts up on the rising edges of the Count Up (CU)
input.
(PV), the counter bit>When the current value (Cxxx)
(Cxxx) turns on.
The counter is reset when the Reset (R) input turns on.
U /D t
8/9/2019 14249646-plcnotesppt
46/67
Up/Down counter
It counts up on rising edges of the Count Up (CU) input.It counts down on the rising edges of the Count Down
(CD) input.
(PV), the counter bit>When the current value (Cxxx)
(Cxxx) turns on.
The counter is reset when the Reset (R) input turns on.
8/9/2019 14249646-plcnotesppt
47/67
Down counter
It counts down from the PV on the rising edges of the (CD) input .
When the current value is equal to zero, the counter bit (Cxxx)
turns on.
The counter resets the counter bit (Cxxx) and loads the currentvalue with the (PV) when the load input (LD) turns on.
D t l
8/9/2019 14249646-plcnotesppt
48/67
Down-counterexample
U /d t l
8/9/2019 14249646-plcnotesppt
49/67
Up/down-counterexample
C t l
8/9/2019 14249646-plcnotesppt
50/67
Counterexample
A counter might be used to keep track of the number of vehiclesin a parking lot. As vehicles enter the lot through an entrance
gate, the counter counts up. As vehicles exit the lot through an
exit gate, the counter counts down. When the lot is full a sign at
the entrance gate turns on indicating the lot is full.
The ladder logic
8/9/2019 14249646-plcnotesppt
51/67
The ladder logic
Memory types
8/9/2019 14249646-plcnotesppt
52/67
Memorytypes
You can access data in many CPU memory areas
- process image input register (I)- process image output register (Q)
- variable memory area (V)
- Bit memory area (M)
- sequence control relay memory area (S)
- special memory bits (SM)
- local memory area (L)
- Timer memory area (T)- counter memory area (C)
- Analog inputs (AI)
Memory addressing
8/9/2019 14249646-plcnotesppt
53/67
Accessing a Bit of Data in the CPUMemory (Byte.bit Addressing)
Memoryaddressing
Memory addressing
8/9/2019 14249646-plcnotesppt
54/67
Memoryaddressing
You can access data in many CPUmemory areas (V, I, Q, M, S, L,
and SM) as:
bytes, words, or double words by using the byte-address format.
Memory types
8/9/2019 14249646-plcnotesppt
55/67
Memorytypes
Process-image input register (I)
Format:Bit I[byte address].[bit address] I0.1
Byte, Word, Double Word I[size][starting byte address] IB4
Process-image output register (Q)Format:
Bit Q[byte address].[bit address] Q1
.1Byte, Word, Double Word Q[size][starting byte address] QB5
Variable memory area (V)You can use V memory to:
store intermediate results of the control logic operations.
store other data pertaining to your process or task.
Format:Bit V[byte address].[bit address] V10.2
Byte, Word, Double Word V[size][starting byte address] VW100
Memory types
8/9/2019 14249646-plcnotesppt
56/67
Memorytypes
Sequence control relay area (S)
They are used to organize machine operations or steps into equivalentprogram segments. SCRs allow logical segmentation of the control
Format:
Bit S[byte address].[bit address] S3.1
Byte, Word, Double Word S[size][starting byte address] SB4
Special memory bits (SM)The SM bits provide a means for communicating information between the
CPU and your program. You can use these bits to select and control some
of the special functions of the S7-200 CPU, such as:
A bit that turns on for the first scan cycle
Bits that toggle at fixed rates
Bits that show the status of math or operational instructionsFormat:
Bit SM[byte address].[bit address] SM0.1
Byte, Word, Double Word SM[size][starting byte address] SMB86
Memory types
8/9/2019 14249646-plcnotesppt
57/67
Memorytypes
Local memory area (L)
The S7-200 PLCs provide 64 bytes of local (L) memory of which 60 can be
used as scratchpad memory or for passing formal parameters to subroutines.Format:
Bit L [byte address].[bit address] L0.0
Byte, Word, Double Word L [size] [starting byte address] LB33
8/9/2019 14249646-plcnotesppt
58/67
Memory types
8/9/2019 14249646-plcnotesppt
59/67
Memorytypes
The S7-200 converts a word-length (16-bit) digital value into a currentor voltage, proportional to the digital value (such as for a current or
voltage). You write these values by the area identifier (AQ), size of the
data (W), and the starting by address. Since analog outputs are words
and always start on even-number bytes (such as 0, 2, or 4), you write
them with even-number byte addresses (AQW0, AQW2, AQW4),
Format: AQW [starting byte address] AQW4
Analog outputs (AQ)
Move instructions
8/9/2019 14249646-plcnotesppt
60/67
MoveinstructionsThe Move Byte instruction moves the input byte
(IN) to the output byte (OUT). The input byte is not
altered by the move.
The Move Word instruction moves the input word
(IN) to the output word (OUT). The input word is
not altered by the move.
The Move Double Word instruction moves the input
double word (IN) to the output double word (OUT).
The input double word is not altered by the move.
The Move Real instruction moves a 32-bit, real input
double word (IN) to the output double word (OUT).
The input double word is not altered by the move.
The block move instructions
8/9/2019 14249646-plcnotesppt
61/67
Theblock moveinstructions
The Block Move Byte instruction moves the number of
bytes (N) from the input address IN to the output addressOUT. N has a range of 1 to 255.
Example
8/9/2019 14249646-plcnotesppt
62/67
Analogue I/O
8/9/2019 14249646-plcnotesppt
63/67
= Typical analogue signals from 0-10 VDC or 4-20 mA
= They are used to represent changing values such asspeed, temperature, weight and level
AnalogueI/O
=The expansion module converts the standard voltage and
current values to 12-bit digital representation. These digital
values are transferred to the PLC for use in its program
8/9/2019 14249646-plcnotesppt
64/67
Analogue outputs may be used to produce
variable reference signals for devicessuch as:
# Control valves
# Chart recorders# Electric motor drives
# Pressure transducers
# Analogue meters
Analog o/p example
8/9/2019 14249646-plcnotesppt
65/67
Analogo/pexample
Analog i/p example
8/9/2019 14249646-plcnotesppt
66/67
Analogi/pexample
Analog i/p example
8/9/2019 14249646-plcnotesppt
67/67
Analogi/pexample