Professional Documents
Culture Documents
www.siemens.co.uk/sitrain
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
1
Pocket Reference Siemens PLC
an an
dr dr
e es ee
cu sc
ci u ci
pr pr
ia ia
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Step7 Siemens
Siemens Step7
Contents
Generating A Cross Reference 3
Displaying A Cross Reference 4
mCross Reference Buttons m 5
co co
Input, Output, Memory, Timers & Counters Assignments 6
o.
Program Structure o. 7
Monitor/Modify ho ho 8
Go-To Location ya ya 9
Checking Hardware Diagnostics 10
@
Module Information: Diagnostic Buffer and Stacks
@ 11
n n
Module Information: Performance Data
Block Compare
ria ria 12
13 – 14
ip ip
Block Consistency Checks
uc uc 15 – 17
What Are Organization Blocks (OB’s)
Which OB’s Are Available?
sc sc 18
19
ee ee
Organization Blocks
Overview of Organization Blocks
dr dr 20
21 – 22
Data Formats
an an23
Complex Data Formats 24
Statement List Instructions For S7 25 – 29
Siemens PLC Pocket Reference
2
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
3
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
Generating A Cross Reference
co co
m m
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
4
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
Displaying A Cross Reference
co co
m m
Step7 Siemens
Cross Reference Buttons
Training Centre
Siemens PLC
Siemens
m
co
o.
Cross References Program structure Addresses without symbols
ho
ya
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
m
@
co
n
o.
ria
ho
ip
ya
uc
5
@
sc
Unused symbols Filter
ee
n
ria
dr
Assignment of in/outputs,
ip
bit memory, timers and
an
counters
uc
sc
ee
Pocket Reference
V2.0 - 08/2011
dr
an
Step7
I/Q/M/T/C Assignments, Bits, Bytes, Words, Double Words
Training Centre
Siemens PLC
Siemens
m
co
o.
ho
ya
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
m
co
@
o.
n
ho
ria
Timer T1 has been used in the program
ya
ip
uc
6
@
sc
Bit 0, 1, 5, 6 and 7 of IB0 are also allocated as
single signals used within the program.
n
ee
ia
pr
dr
e
V2.0 - 08/2011
dr
an
Step7
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
7
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
Program Structure
ho ho
o. o.
co co
m m
Step7 Siemens
Monitor/Modify
Training Centre
Siemens PLC
Siemens
m
co
o.
ho
m
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
ya
co
o.
@
ho
n
ya
ria
ip
@
8
uc
n
New variable table Variable trigger
sc
ria
ee
sc
an
Step7
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
9
Pocket Reference Siemens PLC
an an
Right Mouse Click
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
Go To Location
ya ya
ho ho
o. o.
co co
m m
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
10
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
11
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Module Information: Diagnostic Buffer / B-Stack / I-Stack / L-Stack
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
12
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Module Information: Performance Data
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
13
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
Right mouse click
ip ip
ria ria
ho ho
o. o.
co co
m m
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
14
Pocket Reference Siemens PLC
… from ‘Compare Blocks – 1’
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
Compare Blocks - 2
ho ho
o. o.
co co
m m
Step7 Siemens
Check Block Consistency - 1
Training Centre
Siemens PLC
Siemens
m
Compile includes
co
replacing any
Compile (only the changes)
modified blocks
o.
with the latest Compile All (everything)
ho
update.
(see “Check Block
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
ya
Consistency 2) Inconsistency here…
m
co
@
o.
.. because of here
ho
Right mouse click
ria
ya
ip
TREE VIEW
15
uc
@
sc
n
ria
ee
ip
dr
uc
an
sc
ee
ERROR VIEW
Pocket Reference
V2.0 - 08/2011
dr
an
Step7
Check Block Consistency - 2
Training Centre
Siemens PLC
Siemens
m m
co co
o. o.
ho ho
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
ya ya
After a compile…
@ @
n
TREE VIEW
ria
16
ip
uc
n
ria
sc
ip
ee
uc
dr
Code replaced
sc
an
caused a compile
error …
ee
ERROR VIEW
dr
Pocket Reference
V2.0 - 08/2011
an
Step7
Double click to go to
the erroneous code
Siemens Step7
Check Block Consistency - 3
Buttons in TREE View
m m
co co
o. o.
ho ho
ya ya
@ @
n n
ria ia
pr
ip ci
uc u
Buttons in ERROR Viewsc sc
ee ee
dr dr
an an
Siemens PLC Pocket Reference
17
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
Siemens Step7
What Are Organization Blocks (OBs)
Organization Blocks (OBs) are the interface between the operating
system of the CPU and the user program.
OBs are used to execute specific program sections:
At the start-up of the CPU.
m m
In a cyclic or clocked execution.
co co
o.
Whenever errors occur.
o.
Whenever hardware interrupts occur.
ho ho
ya ya
Organization Blocks are executed according to the priority they are
allocated. @ @
n n
ria ria
ip ip
uc uc
sc sc
ee ee
dr dr
an an
Siemens PLC Pocket Reference
18
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
Which OBs Are Available
Training Centre
Siemens PLC
Siemens
Not all CPUs can process all of the OBs available in STEP7.
m
co
If a connection to the CPU is available then use the Module Information to determine which OBs are
included.
o.
ho
m
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
ya
co
o.
@
ho
n
ya
ria
ip
19
@
uc
n
sc
ria
ee
ip
uc
dr
an
sc
ee
Pocket Reference
CPU.
Step7
Siemens Step7
Organization Blocks
Program Cycle Organization Block (OB1)
Time-of-Day Interrupt Organization Blocks (OB10 to OB17)
Time-Delay Interrupt Organization Blocks (OB20 to OB23)
Cyclic Interrupt Organization Blocks (OB30 to OB38)
m Hardware Interrupt Organization Blocks (OB40 to OB47)
m
co co
Multi-computing Interrupt Organization Blocks (OB60)
o.
I/O Redundancy Error (OB70) o.
ho
CPU Redundancy Error (OB72) ho
ya
Communication Redundancy Error (OB73) ya
Time Error Organization Block (OB80)
@ @
Power Supply Error Organization Block (OB81)
n n
ria
Diagnostic Interrupt Organization Block (OB82) ria
ip
Insert/Remove Module Interrupt Organization Block (OB83) ip
CPU Hardware Fault Organization Block (OB84)
uc uc
Priority Class Error Organization Block (OB85)
sc sc
Rack Failure Organization Block (OB86)
ee ee
Communication Error Organization Block (OB87)
dr dr
Background Organization Block (OB90)
an an
Start-up Organization Blocks (OB100, OB101, OB102)
Programming Error Organization Block (OB121)
I/O Access Error Organization Block (OB122)
Siemens PLC Pocket Reference
20
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
Siemens Step7
Overview of the Organization Blocks (OBs)
The following table contains the start event belonging to each OB as well as the
default priority class
Default
Priority
OB Start Event Class Explanation
OB1 End of Start-up or End of OB1 1 Free cycle
OB10 Time-of-day interrupt 2 No default time specified
OB11 Time-of-day interrupt 2
OB12 Time-of-day interrupt m m 2
OB13 Time-of-day interruptco co 2
OB14 o. o.
Time-of-day interrupt 2
OB15
OB16
ho ho
Time-of-day interrupt
Time-of-day interrupt
2
2
OB17
ya ya
Time-of-day interrupt 2
OB20 Time-delay interrupt
@ @ 3 No default time specified
OB21 Time-delay interrupt
n n 4
OB22
OB23
ria ria
Time-delay interrupt
Time-delay interrupt
5
6
OB30
ip ip
Cyclic interrupt (default interval: 5 s) 7 Cycle interrupts
OB31 uc uc
Cyclic interrupt (default interval: 2 s) 8
OB32 sc sc
Cyclic interrupt (default interval: 1 s) 9
OB33
ee ee
Cyclic interrupt (default interval: 500 ms) 10
OB34
OB35
dr dr
Cyclic interrupt (default interval: 200 ms)
Cyclic interrupt (default interval: 100 ms)
11
12
OB36
an an
Cyclic interrupt (default interval: 50 ms) 13
OB37 Cyclic interrupt (default interval: 20 ms) 14
OB38 Cyclic interrupt (default interval: 10 ms) 15
Siemens PLC Pocket Reference
21
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
Siemens Step7
Overview of the Organization Blocks (OBs)
The following table contains the start event belonging to each OB as well as the
default priority class
Default
Priority
OB Start Event Class Explanation
OB40 Hardware interrupt 0 16 Hardware interrupts
OB41 Hardware interrupt 1 17
OB42 Hardware interrupt 2 18
OB43 m m
Hardware interrupt 3 19
OB44
co co
Hardware interrupt 4 20
OB45
OB46
o. o.
Hardware interrupt 5
Hardware interrupt 6
21
22
OB47
OB60
ho
Hardware Interrupt 7
SFC35 “MP _ALM” call
ho 23
24 Multi-computing interrupt
OB70 ya ya
I/O redundancy error (only H CPUs) 25 Redundancy error
OB72 CPU redundancy error (only H CPUs) 28
OB80 Time error @ @ 26 Asynchronous error
OB81 Power supply fault n 26 n
OB82 Diagnostic Interrupt 26
OB83 Insert/remove-module interrupt ria 26
ia r
OB84 CPU hardware fault ip 26 ip
OB85
OB86
Program cycle error
Failure of expansion rack, DP master
26
uc uc
system or station for distributed I/O 26 sc sc
OB87
OB90
Communication Error
Warm or cold restart or delete a block
26
ee
Background cycle ee
being executed in OB90 or load an OB90
291)
dr dr
OB100
on the CPU or terminate OB90
Warm restart 27 Start up an an
OB101 Hot restart 27
OB102 Cold Restart 27
OB121 Programming error Priority of the OB Synchronous error
that caused the error
OB122 I/O access error Priority of the OB
that caused the error
1) The priority class 29 corresponds to priority 0.29. The background cycle has a lower priority than the free cycle
Siemens PLC Pocket Reference
22
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
Training Centre V2.0 - 08/2011
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
23
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Data Formats
Step7 Siemens
V2.0 - 08/2011 Training Centre
Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com
24
Pocket Reference Siemens PLC
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
e es ee
cu sc
ci u ci
pr pr
ia ia
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
an an
dr dr
ee ee
sc sc
uc uc
ip ip
ria ria
n n
@ @
ya ya
ho ho
o. o.
co co
m m
Step7 Siemens
Siemens Step7
m m
co co
o. o.
ho ho
ya ya
@ @
n n
ria ria
ip ip
uc uc
sc sc
ee ee
dr dr
an an
Training for Industry
Tel: 0161 446 6111
Fax: 0161 446 5742
Email: training.ad.uk@siemens.com
Web: www.siemens.co.uk/sitrain
Siemens PLC Private copy for Ciprian Andreescu, andreescuciprian@yahoo.com Pocket Reference
Training Centre V2.0 - 08/2011