Professional Documents
Culture Documents
Step7 Jeld1 Farsi
Step7 Jeld1 Farsi
( )
:
:
STEP7
( )
:
:
. ....
.
( Step7 )
. Step7
.
PLC
.
PLC
. S7 PLC
ST SFC
FBD STL LAD
PID
Step7 .
.
.
.
reza.maher@gmail.com
PLC
IEC1131
PLC
S7
-
-
-
-
Step7
Step5 Step7
Step7
Step7
Step7 -
Step7
Step7
Simatic Manager
Hwconfig -
S7-300
S7-400
PLC
S7
S7
S7
CPU S7
Simatic Manager
LAD/STL/FBD
Reference Data
Rewiring
Word
SFB3
n -
Address Register
PLC On-Line
-
-
Hwconfig On-Line
LAD/STL/FBD On-Line
IEC1131
STL
S7-400
S5 S7
:
PLC -
IEC1131
PLC -
S7
Step7 -
Step5 Step7
Step7
Step7
Step7 -
PLC
PLC -
Programmable Controller Programmable Logic Controller PLC
.
.
. CPU PLC
CPU ( 1 0 ) Field
CPU .
.
. (Actuators) Field
(Hard-wired)
PLC
.
(Troubleshooting)
PLC
. PLC
.
. PLC ...
. PLC PLC
. (Communication)
. IEC1131 PLC
IEC1131
IEC1131 -
PLC
PLC .
.
IEC1131
(Programming Languages) -
Integer,Real, Word , Date , Time Byte Bool
(FB) (FC) (Program Organization Units ) POU .
. FB FC FB .
IEC
: . PLC
. PLC Instruction List IL x
.
FBD . Function Block Diagram FBD x
.
.
Ladder Diagram LD x
. FBD LD
C ST . IEC Structured Text ST
.
. Sequential Function Control SFC
Transition Step
. . Step Step
.
.
Sequentioal Function Contrl
(SFC)
Step 1
FILL
InstructionList (IL)
LD
ANDN B
ST
StructuredText (ST)
A
C:= A AND NOTB
Transition 1
Step 2
Empty
Transition 2
Step 3
Ladder Diagram(LD)
A B
-| |--|/|----------------( )
(User Guidelines) -
(End User)
. IEC1131
IEC1131
(Communications)
.
.
.
(Fuzzy Control Programming) -
.
(Guidelines for the application of programming languages)
PLC
.
. IEC1131
PLC
PLC -
Compact . SIMATIC PLC
CPU
Compact (Modular) .
.
: PLC
Simatic S5
PLC
Compact
S5-115U S5-100U
S5-95U
S5-90U
.
S5-
PLC
.
S5-155U 135U
. STEP 5 PLC
Simatic S7
S5 PLC
Compact S7-200
S7-300 .
S7-400
.
STEP7 PLC
.
LOGO
( )
Compact PLC .
.
. LOGO! Soft Comfort
PLC
Simatic C7
Simatic 505
505
Compact
. TISOFT
. Texas Instruments
. S7
S7
S7 -
S7-200
. micro PLC x
. x
. x
On-Board
I/O Compact x
.
x
. CPU
. Step7-Micro/Win x
S7-300
mini PLc x
. x
x
. x
x
. STEP7 x
S7-300F
x
Fail-Safe
. S7-300 x
F CPU x
CPU 315F
S7-300C
CPU S7-300 x
Compact /
.
C CPU x
CPU 314C
S7
S7-400
. x
x
. x
x
S7-300 x
.
STEP7 x
S7-400H
High Availability S7-400
:
x
.
. x
x
.
CPU Redundant
. (Hot-Standby)
CPU
. CPU
.
.
Step7
. H-System
S7-400FH
S7-400 x
. S7-400H x
F-system x
.
Step7 S7
. S7-200 .
Step7
Step7 -
: Step7
. S7-200 PLC Step7-MicroWin .
. C7 S7-300 , S7-400 Step7
()
RUN V5.2
Step7 Proffesional
: Optional
Step7 V5.2
S7-PLCSIM
S7-PDIAG
SFC S7-Graph V5.2
ST S7-SCL
V5.2
:
Step 7
. Proffesional
Step7
Step5 Step7 -
: Step5 Step7
: IEC1131 -
Step7
. Step5 .
: -
:
-
:
Windows
Windows
Windows
Windows
Windows
Windows
95
98
Me
NT4 workstation (SP6a)
2000 Proffesional (SP2)
XP Proffesional
. RAM CPU
. Step7
Win95
Processor
Win98
Win NT
P133
Win 2000
Win XP
P166
P300
P III
RAM
Win Me
16
24
32
64
64
64
32
32
64
64
128
128
450 MB
Hard Disk
(Autoroziation) -
STEP7
.
Single License
Authorization .
Authorization
Authorization
.
Step7
: PLC -
PC Adaptor
. MPI
. USB . RS232 USB
Step7
PCI ISA
) PLC
( CP5611
PCMCIA
CP5511 Notebook
:
PG . PG
. PLC
Step7
PLC
. PLC .
Step7 Set PG/PC Interface
. Control Panel
.
Step7
Step7 -
Step7 Simatic
. HMI Runtime Engineering
Engineering Tools
S7 SCL
ST
CPU314) S7-300 PLC IEC1131-3
. C7 S7-400 (
. Step7 Professional
. C7 s7-400 S7-300 PLC : S7 HiGraph
S7 GRAPH
PLC
IEC1131-3 SFC
. PLC : S7 PLCSIM
. Professional
CFC
.
F/H
S7-400 S7-300
Systems
Wiring : DOCPRO
.
Step7
Runtime Software
. : Fuzzy Control
. PID
Modular PID Control
. : Neurosystem
. C7 M7 S7 MPI : PRODAVE MPI
HMI Software
SIMATIC ProTool
. C7
SIMATIC WinCC
Step7
Step7 -
: S7 PLC
. Step7
. PG PC PLC
PLC .
. PLC Offline Step7 .
On-Line
. PLC PG PC PLC
. PLC
Commisioning
. (Cold Test)
.
Step7 .
. PLC Online PG PC
Operation
PC PG . PLC
. . Step7
Troubleshooting
PC PG .
. . Step7
Step 7 -
:
-
Step7
Simatic Manager -
-
Desktop Start Step7
.
Simatic Manager
. .
( ) Simatic Manager
( Optional ) Step7 Professional
:
x
x
x
x
S7 SCL
S7-PDIAG
S7-PLCSIM
S7 Graph
Step7
.
Standard Package
NETPROCommunication
Configuration
SIMATIC Manager
Symbol Editor
Hardware Diagnostics
Programming
Languages
LAD / FBD / STL
Hardware
Configuration
Simatic Manager
Symbol Editor
. PLC
Diagnostics
. PLC
Programming Language
.
Network Configuration
. Node
:
. PDF Documentation
. Step7 Help
Simatic Manager -
. Simatic Manager
Desktop Step7
.
. Wizard
Simatic Manager
. Wizard CPU
. ( ) Wizard
Simatic Manager
. PLC
. File > Open
. Sample Project File > Open
) File>New>New Project> .
: ( Test
.
.
.
Simatic Manager
Simatic Manager
.
.
.
.
.
Program Station :
. S5
. PLC PG :PG/PC
. Station
400 300 PLC . Station
. Station .
Insert>Station Station
Simatic Manager
Inser>Program>s7
. . Program
:
Insert>Subnet
.
.
Simatic Manager -
Simatic Manager
:
.
File
Edit
.
. PLC PLC
. Object
Insert
PLC
View
Options
. Simatic Manager
Window
. Simatic Manager
Help
.
.
.
Simatic Manager
File
:
: New
Wizard :New Project Wizard
: Open
: Open Version 1 Project
: Close
:Save As
:Delete
: Reorganize
Object Gap
.
. : Manage
Hide . User Project
. .
Simatic Manager
Display . Display
. Start Search
.
.
. : Archive
Backup
ZIP . File > Archive .
. Option>Customize
Retrieve : Retrieve
. Simatic Manager .
Object List : Print
Object Simatic Manager
Contenet
.
: Page Setup
(... ) : Labeling fields
.
. :Print Setup
Simatic Manager
View
PLC : Offline
PLC :Online
LargeIcons
Small Icons
List
Details
..
Expand all
Collapse all
.
Object : Filter
. S7 CPU .
Simatic Manager
Option
Simatic Manager
Language . Tab Customize
General
Simatic Manager
Online View
: Object Column
: Archiving
-
:
Hwconfig -
-
S7-300
S7-400
Hwconfig
Hwconfig -
Hardware Simatic Manager Station
Station 300 Station .
.
. Hwconfig Hardware
H-Station 400 300 Station .
PG S5 Station Pc Station Hardware
. Others
Step7 Station
.
: .
Station
Hwconfig
( Rack )
Hwconfig
. Hardware Hwconfig
. Catalog .
. View >catalog
.
. Station
. 400 Station 300
. Not The same System Family
. Station
.
Rack
Rack
Power Supply
PS
CPU
Interface Module
IM
Signal Module
SM
Communication Processor
CP
Function Module
FM
( I/O )
CPU
( Folder )
.
Simatic Step7
(Free download) Service Pack
. Update (www4.ad.siemens.de)
-
.
. I/O
PLC CD .
I/O x
. CPU
I/O
CPU
...
x
I/O
x
I/O
....
FM
CP
.....
x
x
I/O x
IM x
.
....
S7-300 PLC
S7-300 PLC -
: 300
.
. () CPU PS x
. x
. x
CPU (
CPU (
S7-300 PLC
300
Hwconfig .
.
PS
CPU
IM
FM CP SM
4-11
(Drag)
. .
.
( Consistency Check)
. Station
.
. ( ) IM
. CPU
S7-300 PLC
(Expansion)
: IM
( ) IM 361R IM 360S
( ) IM 365 IM 365
/ . IM o
. .
. o
. IM Daisy Chain IM
.
S7-300 PLC
. . CPU
PS
IM
FM CP
SM
4-11
S7-300 PLC
S7-300
Hwconfig
. .
... 400 300 Step7
Service Pack
.
.
.
View > Address Overview .
CPU . (Gap) (output) (input)
.
. . Object Properties
S7-300 PLC
DI
24 VDC
48 VDC
120 VAC
230 VAC
: General
.
End Start . : Address
1 0 DI .
. (1 0 ) Bit
2 Byte= 16 Bit
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
. DI
S7-300 PLC
System Selection . (
CPU Address Area .
.
.
( Interrupt ) . DI
Properties .
: Inputs
(
) : Diagnostic Interrupt
No Sensor Supply . CPU
. . 15 8 7 0
.
: Hardware Interrupt
. .
. ( )
. :
. Organization Block
. Stop CPU
. : Input Delay
:
. . .
. . .
S7-300 PLC
DO
: Digital Output
Digital Output
24 VDC
0.5 , 1 , 1.5 , 2 A
5 , 8 A
48 VDC
120 VAC
230 VAC
CPU
. F-System :
Address General DO
. Output . DI
: Wire Break
:No Load Voltage
: Short Circuit to M
:Short Circuit to L+
.
DO CPU : Reaction To CPU Stop
Substitute Value . 1 .
. 0 .
. CPU Keep Last Value
S7-300 PLC
DI/DO
.
.
DI/DO
24 VDC
0.5 A
/
+
. DO DI Address General
.
. S7-400 S7-300 DI/DO
S7-300 PLC
. Analoge Input
.
.
.
x
x
x
x
x
x
x
x
x
x
+/-25 mV
+/-50 mV
+/-80 mV
+/-250 mV
+/-500 mV
+/-1 V
+/-2.5 V
+/-5 V
1.. 5 V
+/-10 V
. ()
. ( )
4 Wire
Transducer
AI
2 Wire
Transducer
AI
Power
Supply
Power
Supply
: 4-20mA
-5 mA
-10 mA
-20 mA
0 mA
4 mA
to
to
to
to
to
+5 mA x
+10 mA x
+20 mA x
20 mA x
20 mA x
S7-300 PLC
(Resistor)
48
150
300
600
6000
. (RTD)
.
.( )
.
.
. Pt100 .
.
Pt100
Pt200
Pt500
Pt1000
Ni100
Ni1000
x
x
x
x
x
x
. x
AI
S7-300 PLC
.
. mV
. .
)
. (Compensator) .
(Reference Junction)
. (External Compensating) .
.
. (Internal Compensating)
( ).
Thermocouple
Conductor
Type
Positive
Temperature
Voltage Range
Negative
Range (qC)
(mV)
E
J
Chromel
Constantan
-270q to 1,000q
-9.835 to 76.358
Iron
Constantan
-210q to 1,200q
-8.096 to 69.536
Chromel
Alumel
-270q to 1,372q
-6.548 to 54.874
Copper
Constantan
-270q to 400q
-6.258 to 20.869
Platinum-10%
Platinum
-50q to 1,768q
-0.236 to 18.698
Platinum
-50q to 1,768q
-0.226 to 21.108
Rhodium
R
Platinum-13%
Rhodium
S7-300 PLC
AI
Hwconfig AI
Measuring Range Module .
D , C , B , A
.
. Hwconfig
mV
S7-300 PLC
PLC
CPU AI
1 0 PLC .
. Hex
. Cycle Time
. n
. Cycle Time
.
.
1 0 .
.
Resolution
Number of bits
Bit weighting
Analog Value
15 14 13 12 11 10 9
8
7
6
VZ 214 213 212 211 210 29 28 27 26
22.810
32511
: Resolution
20.0005
27649
20.000
27648
16.000
20736
:
Resolution
0
4.000
1
3.9995
: :
1.1852
4864
< 1.1852
32768
Range
Overflow
7EFF
Overrange
6C01
H
6C00
H
5100
H
:
0
H
FFFF
H
:
ED00
H
8000
H
4
24
3
23
2
22
1
21
0
20
Hex
Measuring
Units
Resolution
Range
20
4 to
mA Decimal Hexadecimal
7FFF
>
22.810 32767
H
5
25
. Decimal
.
Overflow
. Underflow
PLC . 4-20 mA
.
Nominal
Hex .
range
Underrange
Underflow
. PLC .
Hex
.
Resolution Resolution
. Resolution .
S7-300 PLC
S5 S7
S5 S7 S5 PLC
.
. S7
S5 . 1 Overflow S5
.
. Overflow O 0
. Wire Break 1
. Error Bit E 1
. Invalid Valid Activity Bit A 2
Resolution
Bit Number
Bit Value ( S7 )
15
VZ
14
214
13
213
12
212
11
211
10
210
Analog Value
9 8 7
6
29 28 27 26
5
25
4
24
3
23
2
22
1
21
0
20
Bit Value ( S5 )
PS
211
210
29
28
27
26
22
21
20
25
24
23
S7 . ( ) Resolution S5
. ( ) Resolution
S5 S7
Dip S5 . S7
. S5 .
S7-300 PLC
AI
. Analog Input
x
x
x
TC
RTD
x
x
. AI
. Address General
. Word
. 623 608
. AI Input
.
Measuring Range Input . Input
. . D C B A
S7-300 PLC
. Measuring Type
.
.
. Measurement type
. Deactivated
. Deactivate
Measuring range Measuring type
. .
AI
Measuring range .
RTD
. TC
. RTD
S7-300 PLC
AI
: AI
. DI Wire Break : Diagnostics Interrupt
. : Hardware
Interrupt
Interference
Frequency
(HZ)
400
60
50
10
Integration
Time (ms)
2.5
16.6
20
100
S7-300 PLC
AO
. Analog Output
CPU
AI Address General
. Output
.
. Output Range
. Deactivated I E
CPU .
. . ( )
. Deactivated
S7-300 PLC
AI/AO
. .
Output Input
.
Special 300
S7-300 SM I/O
. Special 300
Dummy
.
.
I/O
.
I/O
.
. SM 338
S7-300 PLC
CPU
CPU 315-2DP
128 KB
256
256
2048 byte
128 byte
CPU 314
48 KB
256
256
256 byte
128 byte
CPU 312
16 KB
128
128
128 byte
128 byte
16384 byte
1024 byte
256 byte
max. 4
Yes
max. 4
Yes
max. 4
No
max. 1
No
RAM
Counter
Timer
Bit Memory
Digital
Channel
Analog
Channel
Rack
Profibus DP
: Hwconfig CPU
. 2DP CPU
. New
. DP CPU
CPU C CPU
. CPU .
I/O
.
S7-300 PLC
: CPU
. CPU .
. CPU
CPU
(Startup) PLC
(STOP) RUN . Run
. RUN .
( ) RUN CPU
. . ( )
. (Operating System )
.
S7-300 PLC
:
PII Update
PIQ
S7-300 PLC
PLC
: PLC
Write Read CPU . I/O :Stop
. .
Read Only CPU . I/O CPU . :Run
. Download
CPU . I/O CPU . :Run-P
. Write Read
. ( ) CPU :
. Run-P CPU
CPU : MRES
. CPU .
. STOP MRES CPU
. Stop LED Stop :
. Stop MRES STOP -
. LED . MRES Stop ( ) .
LED . CPU
.
S7-300 PLC
S7-300 CPU
S7 CPU
. Memory
Load Memory 318-2DP CPU . CPU
MMC Load Memory 300 CPU . EPROM RAM
S7-300 PLC
Memory Load Memory CPU
Master Memory MMC . Flash EPROM RAM Card
S7-300 PLC
: S7 CPU
Cold Restart
Warm Restart
( S7-400 ) Hot restart
.
.
.
Cold Restart
. (Retentive)
. OB1 x
Warm Restart
. Retentive x
. OB1 x
Hot Restart
. Retentive x
. x
. S7-400 x
. Backup CPU x
. RUN Stop CPU
.
HOLD
. PC PG
Debug . (breakpoint) Debug .
.
CPU
RUN CPU .
HOLD
STARTUP
RUN
S7-300 PLC
S7-300 PLC
CPU
. CPU
. STOP CPU
. RUN-P RUN
. STOP OB STOP
HOLD
Breakpoint
:
.
STARTUP CPU
.
.
5
STOP
STARTUP CPU
STARTUP
HOLD CPU
STOP
. STOP
RUN
STARTUP CPU
STOP
RUN
CPU
. OB RUN
. STOP
:
.
10
HOLD CPU
.
8
Breakpoint
:
.
HOLD
RUN CPU
RUN
HOLD CPU
S7-300 PLC
. CPU
S7-300 CPU
CPU
. CPU
:
. CPU : General
. CPU MPI . Interface
Simatic Multi Point Interface MPI
PC PG CPU MPI .
.
. MPI
: Cycle/ Clock Memory
Scan Cycle Monitoring Time
.
Stop PLC 150ms
.
.
Minimum Scan Cycle Time
S7-300 PLC
: Retentive Memory
. NVRAM
.
. S7 S5 Retentive Step5
: Retentive 115U CPU
Retentive
. Retentive
( ) . Retentive
. Retentive S7
:Startup
RUN CPU
.
:
. Cold , Warm , Hot S7-400
x
:
. LAD/STL/FBD Hwconfig
S7-300 PLC
S7-400 CPU
: CPU
(Write Read )
x
.
Upload (Read)
x
. Download
. Read , Write
x
. (Know-How)
Simatic Manager Password . CPU
. Online
Simatic Manager PLC>Access Right>Setup
PLC>Access Right>Cancel . Simatic Manager
.
MRES PLC
.
S7-300 PLC
. CPU
:
. (OB)
. OB CPU
. ( OB1) CPU
. : Interrupts
. Time-of-Day Interrupts x
. Cyclic Interrupts x
OB CPU . CPU315-2DP Interrupt
.
S7-300 PLC
CPU
. 318
. PLC CPU
LED
SF
BATF
DC5V
. CPU 5VDC
FRCE
( ) Force
RUN
STOP
SF DP
DP
BUSF
DP
S7-300 PLC
FM
CPU . CPU
Step7 FM . FM
FM FM .
FM Simatic Manager Hwconfig FM .
. FM .
300 FM
. Address Generel
FM
. SM Address
S7-300 PLC
: S7-300
(Counter Module )
FM350-1
(Incremental) .
FM350-1 . 500KHZ
.
.
(Counter Module )
FM350-2
(Incremental) .
. 10 KHZ
. 20KHZ
(Position Module )
FM351
.
.
.
.
(Position Module )
FM353
.
(Position Module )
FM354
.
(Electronic Cam Controller ) FM352 x
. Cam Control
.
.
.
(Closed Loop Controller )
FM355
Continues Control .
Step Control
.
S7-300 PLC
FM350-1
CPU
. .
CPU CPU
.
Step7 FM350-1
. Download FM .
FM350-1 HWconfig Step7
.
S7-300 PLC
. Encoders
.
Operating Mode
Continuous
.
Single Counting .
Peridic Counting .
. Load Value Continuous
S7-300 PLC
(Gate Control)
.
.
) Inputs (Hardware
Gate Control)
: . (
Level Control -
: DI Start
Edge Control -
: DI Stop DI Start
.
FM
Step7
FC0 . Library
. CNT_CTRL
S7-300 PLC
: FM350-1
Hardware Interrupt Enables
. Underflow Overflow .
HWConfig
. Basic Parameters Properies FM
Outputs
FM Output
.
FM
. FM350-1 FM
FM .
.
AI Submodule FM
. D A FM350-1 .
A
D
5 V Differential Signals
24V Signals
S7-300 PLC
CP
( Communication Processor )
. CP
.
PS
. 10A 5A 2A
120/230 300
. Hwconfig
. 300
) . File > Consistency Check .
. ( CPU
PLC
S7-400 PLC
S7-400 -
S7-400 S7-300
. .
Simatic Manager Station400
Hwconfig Station
400
: S7-400 S7-300
. 300 400
.300
. 400
. 300 400
. 400 CPU
:
PS
. S7-400
Redundant
Standard
10 A
4A
10 A
20 A
24 V
120/230 V
Redundant
. .
.
S7-400 PLC
S7-400
: S7-400
Backplane Bus
I/O BUS
. Communication Bus
. 400
. S7-400 .
.
Universal
UR1
Redundant
"
"
"
UR2
"
18
Expansion
ER1
"
"
"
ER2
10 + 8
Segmented
CR2
Universal
CR2-H
.
.
18
UR2
PLC
2*9
Redundant
S7-400 PLC
S7-400
: S7-400
. S7-400
. IM
. IM
. IM
. IM (Chain) IM x
460-3
461-3
4
460-1
461-1
1
460-0
461-0
4
102.25
m
No
1.5 m
5m
Yes
No
Send IM
Recieve IM
Max. ER
/chain
Max.Distance
Power
Transfer
Number of IM
in Rack0
IM 9
. (Send/Receive) .
.
IM 9
.
IM 9
. IM467
S7-400 PLC
IM s7-300 . S7-300
IM S7-400
IM .
.
IM . Connect
. C2 C1
S7-400 PLC
400
: 400
. CPU x
. Receive IM
. Redundant
.
. CPU x
Redundant
Multicomputing CPU
. S7-300 S7-400
. CPU PS
FEPROM RAM
. CPU .
. 300 400 CPU
S7-400 PLC
. Cycle/Clock Memory
S7-400 PLC
Multicomputing CPU
CPU S7-400 CPU CPU
(Tasks) ( )
CPU STOP CPU .
.
: Multicomputing
CPU 9
. CPU
CPU 9
.
: Multicomputing
. Hwconfig . Multicomputing CPU
. CPU414-2DP CPU412-2DP
CPU .
CR . UR .
. CPU
S7-400 PLC
Multicomputing CPU .
View>Filter Hwconfig
. CPU . CPU
Station 400 Simatic Manager Hwconfig
CPU . CPU
. CPU
: . CR CPU Multicomputing :
UR Multicomp. C bus i/o CR
.
Multicomp CR CPU
Multicomp SM CPU CR
. CPU Hwconfig
CPU H H-system Multicomputing :
. CPU .
-
:
PLC
-
S7
S7
CPU S7
-
-
Simatic Manager
LAD/STL/FBD
-
-
Reference Data
Rewiring
Compare Blocks
PLC
PLC -
. Decimal
PLC .
. .
(Binary) (Decimal)
. .
Decimal
4
9
24
Binary
100
1001
11000
. Bit (
)
. Double Word Word . Word Byte
Decimal
.
PLC
. Hexadecimal
. Hex .
.
16 digits
0 , 1, 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , A , B , C , D , E, F
:
A=10
B=11
C=12
D=13
E=14
F=15
: .
Decimal
Binary
Hexadecimal
BCD
43
1011
0010
0100
0011
BCD
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
PLC
.
Decimal
Binary
BCD
Hexadecimal
0000
0001
0010
11
0011
100
0100
101
0101
110
0110
111
0111
1000
1000
1001
1001
10
1010
0001 0000
11
1011
0001 0001
12
1100
0001 0010
13
1101
0001 0011
14
1110
0001 0100
15
1111
0001 0101
16
1 0000
0001 0110
10
17
1 0001
0001 0111
11
18
1 0010
0001 1000
12
19
1 0011
0001 1001
13
20
1 0100
0010 0000
14
126
111 1110
7E
127
111 1111
7F
128
1000 0000
80
510
1 1111 1110
1FE
511
1 1111 1111
1FF
512
10 0000 0000
200
S7
S7 -
DI . Dword Word Byte Bit PLC
Bit
. Dword Word Byte
. Word AI
0.0
4.7
. 0.8
. . I S7
I 0.1
IB 1
IW 2
ID 8
I
Bit
IB
Byte
IW
Word
ID
Dword
. IW IW
BYTE0
BYTE1
IW 1
=
BYTE1
+
BYTE2
ID4 ID0
. . Double Word
PI (peripheral) :
PIB 1
PIW 2
PID 8
PIB
PIW
PID
Byte
Word
Dword
. Bit
S7
. Q I .
Q 0.1
QB 1
QW 2
QD 8
Q
QB
QW
QD
Bit
Byte
Word
Dword
.. (peripheral)
PQB 1
PQW 2
PQD 8
PQB
PQW
PQD
Byte
Word
Dword
.. PLC
. Bit Memory CPU
. Flag F S5 .
M 0.1
MIB 1
MW 2
MD 8
M
MB
MW
MD
Bit
Byte
Word
Dword
C T
C2 T1
. cpu :
S7
S7 -
S5 . Parameter Complex Elementary S7
.
Elementary
S5
A I 0.0
=Q 0.1
A F1.1
KB
KH
DH
A I 0.0
=Q 0.1
A M1.1
L B#16#01
L IB0
T QB1
T MB3
L W#16#6AC0
L IW0
T QW2
L MW4
L ID4
T QD8
(bit)
1
Bool
B#16#
Byte
FF 00
16
W#16#
Word
FFFF 0000
32
DW#16#
DWord
0000_0000
FFFF_FFFF
KF
L +35
L -415
16
L -3200947891
32
+ -
L#
-2147483648
Integer
(INT)
Double
Integer
(DINT)
2147483647
KG
L 1.23e+1
32
(Floating Point)
Real
KT
L S5T#1M40S
L S5Time#20MS
16
S5T#
S5Time
2H46M30S0MS
L T#10M20S
L Time#1MS
32
T#
Time
24D20H31M23S647MS
16
L D#2004-3-15
L Date#20043-15
Time
L TOD#1:10:3.3
32
ASCII
Character
L a
T IB0
D#
yyy-mm-dd
TOD#h:m:s.ms
0:0:0.0
23:59:59.999
Date
Time_Of_Day
CHAR
S7
Complex
64
Bit
DT#yy-mm-dd-h:m:s.ms
DATE_AND_TIME
S5
DT#1993-12-258:01:1.23
BCD
.
STRING[4]
n+2
Byte
STRING[n]
STRING
. n
Test
String
String[4]
Test[1..3]
:
Test[1], Test[2],
Test[3]
ARRAY
ARRAY[x1..x2]
x2 x1
+ -
.
Test[1..3,1..2]
:
Test[1,1]
Test[1,2]
Test[2,1]
Test[2,2]
Test[3,1]
Test[3,2]
:
Test[1,1,2,1,5,4]
ARRAY[x1..x2 y1..y2]
y2 y1 x2 x1
+ -
.
.
.
:
Bool
. INT
.
Test
Struct
a
bool
b
int
c
word
End Struct
Struct
End Struct
STRUCT
CPU S7
Parameter Types
S5
T1
Timer
C1
Counter
P#M50.0
P#
Pointer
2
bytes
2
bytes
6
bytes
10
bytes
Any
CPU S7 -
24
23
16
15
..
ACCU1
ACCU1-H
ACCU1-H-H
High Word - High Byte
ACCU1-H-L
High Word - Low Byte
ACCU1-L
ACCU1-L-H
ACCU1-L-L
Low Word - High Byte
:
( ) . ACCU1-L-L
( ) . ACCU1-L Word
( ) . ACCU1 Dword
CPU Stack
: Stack S7 CPU
Status Word x
.
. TAR LAR Address Registers x
Nesting Nesting Stack x
. RLO RLO .
Master Control Relay MCR Stack x
.
CPU S7
CPU S7
Status Word
. .
( X ) 1 0
. Show FC . BR S5
CC1 , CC0
:
CC1
CC0
OV
. 1 (Overflow)
. Update
OS
OV . OverFlow Stored
.
OR
.0 1
RLO
-
. Step7
(logic Blocks) -
: Code Blocks
x OB
Organization Block
x FB
Function Block
x FC
Function
x SFB
x SFC
System Function
-
.
:
x DB
Data Block
x SDB
: CPU CPU
CPU 416-2
CPU 412-1
CPU 314
CPU 312
44
23
13
OB
2048
256
128
32
FB
2048
256
128
32
FC
4095
511
127
63
DB
Step5 Step7
:
. Step7 Step5 OB
. Step7 Step5 DB
. Step7 FC Step5 FB
. IEC1131
:
. Step5 FB Step7 FB
Organization Blocks
OB
Time-of-day interrupts
OB10 to OB17
OB20 to OB23
Cyclic interrupts
OB30 to OB38
Hardware interrupts
OB40 to OB47
3 to 6
7 to 15
16 to 23
25
Multicomputing interrupt
25
28
26
Redundancy errors
29
Background cycle
27
Startup
Asynchronous errors
OB1
OB60
OB70, OB72
OB80, OB82 to OB87
OB90
OB100 to OB102
Synchronous errors
OB121, OB122
. (priority) OB
OB1 . OB OB .
. OB CPU . OB
S7- S7-300 OB
. CPU 416-2DP
:
OB47 OB10 x
OB72 OB70 x
OB87 OB81 x
. OB
. Deselect OB
. OB OB1
S7 S5 OB
. S5 OB1 S7 OB1 (
Cold . S5 OB S7 OB (
S5
SFC41 SFC40
OB120
: S7 S5 OB (
S7
S5
LOOP
OB160
PUSH
OB111
S7 S5 OB
S5
S7
Free cycle
OB1
OB1
Time-delay (delayed)
interrupt
OB6
OB20 to OB23
Time-of-day
(clock-controlled) interrupt
OB9
OB10 to OB17
Hardware interrupts
OB2 to OB5
OB40 to OB47
Process interrupts
OB2 to OB9
Cyclic (timed)
interrupts
OB10 to OB18
Replaced by
hardware
interrupts
OB30 to OB38
Multicomputing interrupt
OB60
OB21 (S5-115U)
OB20 (S5-135U)
OB100
OB21 (S5-135U)
OB101
OB22
OB101
Errors
Error
OB19 to OB35
Other
Processing in STOP
mode
OB39
OB121, OB122,
OB80 to OB87
Omitted
Background processing
OB90
Function
Main
program
Interrupts
Startup
(Function)
FC
FC . FC
FC .
. FC FC
OB1
FC1
-----------CALL FC1
-----------------------
-------------------------------------------------
FC
.
FC
. FC
(Function Block)
FB
FC FC FB
FB . .
:
CALL FB1 , DB1
. FB FB
(Data Block)
DB
. Step7 OB ,FC,FB
DB PLC Write Protect
. Properties
:
Shared DB -
.
. CPU DB .
Instance DB -
DB FB FB
. FB
.
System Blocks
:
System Function
SFC x
FC SFC FB SFB
. . .
stop cpu
SFC 46
SFB 41
:
. Linear Programming OB1 -
Structured Programming -
.
Linear Programming
Structured Programming
Main Program
OB1
FB1
FC1
. FC FB FC FB FB FC OB
FC1 FB1 . Step7
. OB1
CPU 315 . CPU Nesting Depth
. CPU 414-3
. Nesting Depth
Simatic Manager
Simatic Manager -
. Simatic Manager DB FC FB OB
. SFC SFB
.
. CPU S7 Program Station
Sources Blocks
. Source Source
Blocks OB1 . Blocks
Hwconfig .
Blocks System data Save and Compile
System Data Blocks SDB
:
. PLC PLC
S7 Program .
. Blocks
Simatic Manager
:
: Block Insert > S7 Blocks Blocks -
:
. . x
. STL OB , FB , FC x
( ) Instance . Shared x
. Blocks FB . FB
Open New Object General Option > Customize Simatic Manager x
.
LAD/STL/FBD
LAD/STL/FBD -
Menu / Toolbar
Declaration Section
Program
Element
Code Section
:Program Element
.
View FBD STL LAD . LAD
.
LAD/STL/FBD
:Declaration Section
Temp OB .
. Temp FC FB
.
Declaration
in
FC
X
FB
X
OB
-
Out
In/out
temp
static
:
. Temp x
.
. Temp x
Temp OB x
.
. OB x
. out in x
) in/out x
(
. DB Temp FB . FB Static x
Static DB
.
: . # x
L #test
. test . FB Declaration
LAD/STL/FBD
:Code Section
OB1 .
STL View . LAD
Code Section FBD STL . LAD FBD
. T
:
Block Title
.
Block Comment
.. Comment
Network Comment
Network
. Network . Segment
LAD/STL/FBD
. Network
. Network 2 Network 1
. OB1 Network
STL . Statement
Toolbar FBD LAD
. Network Drag Program Element
. LAD
. FBD
.
.
. FBD
-
FC
OB1
.
:
Simatic Manager
. Declaration . LAD/STL/FBD
b a Declaration C a, b
FC Network . Int C
FB
: FC FB
Simatic Manager FB -
LAD/STL/FBD FB -
Declaration -
Network -
FB -
Simatic Manager -
FB Instance -
FB Blocks Program Element FB
: DB CALL OB1
CALL FB1,DB2
. Declaration
. CALL DB
Temp PLC
DB .
FB DB Simatic Manager
. ( Temp )
SFB SFC
. ( )
: Program Element
Simatic Manager
.
.
.
LAD/STL/FBD . Protect
. . Protect
Protect . Source EXE
.
STP SFC 46
. CPU .
DB
Shared DB . FB FB Instance
.
.
:
Simatic Manager -
LAD/STL/FBD -
-
: SF PLC
. Simatic Manager (
. PLC Simatic Manager (
. (
LAD/STL/FBD
.
.
2 2 1 0 Word 0
cell 6 Real
. Type
. SF DB PLC
UDT
Simatic Blocks User-defined Data Type
UDT
UDT . Manager
.
( Run, Stop,Error, Min,Max )
.
. UDT . UDT
UDT . UDT
.
LAD\STL\FBD View> Data View
.
UDT UDT
. File> Check and Update Access
. Symbol Editor
.
.
Reference Data
. LAD
. Enter
View > Display With LAD/STL/FBD
. Symbolic Representation
:
. . x
Import ( Step 5 ) S7
Reference Data -
Reference Data
Option > Reference Blocks Simatic Manager .
: Ref . Data>Display
(I , Q , M ,T ,C ) -
Go to location .
.
Reference Data
-
(byte, word) X O
. -
. Call -
:
Example
CALL FB10
Meaning
UC FB10
CC FB10
Data block
Symbole
. -
. -
Rewiring
Rewiring -
Simatic Manager Rewiring . .
. Option
OK Rewiring
. Rewiring
.
Compare Blocks -
PLC
. PG PC
:
Off Line On Line
Offline
Simatic Manager
Path2 Blocks
. Blocks Simatic Manager
OK .
. Detail
LAD/STL/FBD Go To
.
S7 Z] cYf{ -5
: ] f
Bit Logic Instructions
Comparison Instructions
Conversion Instructions
Counter Instructions
Data Block Instructions
-
-
-
-
-
-
-
Timer Instructions
Word Logic Instructions
Accumulator Instructions
-
Word -
-
S7
: .
. STL FBD LAD STL .
. FBD LAD
FBD LAD .
.
. .
Status Word .
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
. CPU Writes
:
1 0
( )
Bit Logic
Bit Logic -
: .
x A
And
x AN
And Not
x O
Or
x ON
Or Not
x X
Exclusive Or
x XN
Exclusive Or Not
x O
And before Or
x A(
x AN(
x O(
x ON(
x X(
x XN(
x )
Nesting Closed
x =
Assign
x R
Reset
x S
Set
x CLR
Edge Negative
x FP
Edge Positive
:
Address
<Bit>
Data Type
Bool
Memory Area
I,Q,M,L,D
Bit Logic
And
: STL
A <Bit>
. AND RLO 1 A :
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
A
A
=
AN
I 0.0
I 0.1
Q 4.0
. 1 . 1 .
LAD
FBD
And Not
: STL
AN <Bit>
. AND RLO 0 AN
And :Status Word
A
AN
=
I 0.0
I 0.1
Q 4.0
. 0 1 . 1 .
LAD
Normal Open
Normal Closed
FBD
Bit Logic
Or
: STL
O <Bit>
. Or RLO 1 O :
:Status Word
Writes:
BR
-
CC1
-
CC0
-
OV
-
OS
-
OR
0
STA
x
RLO
x
/FC
1
:
O
O
=
ON
I 0.0
I 0.1
Q 4.0
LAD
FBD
Or Not
: STL
ON <Bit>
. Or RLO 0 ON
or :Status Word
O
ON
=
I 0.0
I 0.1
Q 4.0
LAD
Bit Logic
Exclusive Or
: STL
X <Bit>
. XOR RLO 1 x :
1 1 ( RLO )
or :Status Word
:
X
I 0.0
I 0.0
I 0.1
Q 4.0
0
0
1
1
I 0.1 Q 4.0
0
1
0
1
0
1
1
0
1
. 1
.
LAD
FBD
XN
Exclusive Or Not
: STL
XN <Bit>
. XOR RLO 0 XN
. 1 0 1 ( RLO )
or :Status Word
X
I 0.0
XN
I 0.1
Q 4.0
I 0.0
0
0
1
1
I 0.1 Q 4.0
0
1
0
1
FBD
1
0
0
1
1 1
. 0
LAD
Bit Logic
A(
: STL
:
A( <Bit>
:
. Nesting Stack ( Status Word ) OR RLO A(
. Nesting Stack
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A(
O
O
)
A(
O
O
)
=
I 0.1
M1.0
I0.0
. Nesting Stack RLO . OR M1.0
Nesting Stack AND
I 0.2
M1.1
Q 4.0
() LAD
() FBD
Bit Logic
AN(
: STL
:
A( <Bit>
:
. And Not A(
O(
: STL
:
O( <Bit>
:
. Or A(
ON(
: STL
:
ON( <Bit>
:
. Or Not O(
X(
: STL
:
X( <Bit>
:
. XOR O(
XN(
: STL
:
X( <Bit>
:
. XOR Not X(
Bit Logic
Nesting Close
: STL
:
)
:
( Status Word ) OR RLO Nesting Stack )
And Nesting Stack RLO
Stack . Stack Or
. . (
A(
AN(
O(
ON(
X(
XN(
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A(
O
O
)
A(
O
O
)
=
I 0.1
M1.0
I0.0
. Nesting Stack RLO . OR M1.0
Nesting Stack AND
I 0.2
M1.1
Q 4.0
LAD
A(
FBD
A(
Bit Logic
Assign
: STL
= <Bit>
0 = MCR=0
. RLO
:Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
0
. Q4.0
. 1 . 1
A
A
=
() FBD
I 0.0
I 0.1
Q 4.0
() LAD
Set
: STL
S <Bit>
Master
. 1 RLO=1 S
S MCR=0
Control Relay
RLO = 1 S = S .
. S . 1 0
Assign :Status Word
Q4.0 I0.0
I0.0 . I0.0 1 0
.. Q4.0
A
S
FBD
I 0.0
Q 4.0
LAD
Bit Logic
Reset
: STL
R <Bit>
. 0 RLO=1 R
R MCR=0 Master Control Relay
.
Assign :Status Word
Q4.0 I0.0 :
I0.0 1 0
Q4.0 I0.0 .
..
A
R
I 0.0
Q 4.0
FBD
NOT
LAD
Negate RLO
: STL
NOT
:
0 1 1 0 RLO NOT
:Status Word
BR
CC1
CC0
OV
OS
Writes:
A
NOT
=
OR
STA
RLO
/FC
I 0.0
Q4.0 I0.0
Q 4.0
I0.0 . NOT
.
FBD
LAD
Bit Logic
132
SET
: STL
SET
:
. 1 RLO SET
NOT :Status Word
SET
=
=
. RLO SET
M10.0
M15.1
FBD
LAD
CLR
: STL
CLR
:
. 0 RLO CLR
:Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
CLR
=
=
M10.1
M10.2
. RLO CLR
.
FBD
LAD
Bit Logic
133
SAVE
: STL
:
SAVE
:
First Check . (Status Word ) BR RLO SAVE
. AND Network BR . /FC
. SAVE
BR RLO BR RLO SAVE
. .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I 0.0
I0.1
SAVE
LAD
FBD
Bit Logic
FN
Edge Negative
: STL
:
FN <Bit>
Address
<Bit>
Data Type
Bool
Memory Area
I,Q,M,L,D
:
0 1 RLO RLO FN
. RLO=1
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I 1.0
FN
M1.0
FN 0 1 I1.0
Q 4.0
. Q4.0
. M1.0
LAD
FBD
Bit Logic
135
FP
Edge Positive
: STL
:
FN <Bit>
Address
<Bit>
Data Type
Bool
Memory Area
I,Q,M,L,D
:
1 0 RLO RLO FP
. RLO=1
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I 1.0
FN
M1.0
FP 1 0 I1.0
Q 4.0
. Q4.0
. M1.0
.
LAD
FBD
Bit Logic
Midline Output
FBD
Address
<Bit>
Data Type
Bool
Memory Area
I,Q,M,L,D
:
. RLO
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
M2.2 M1.1 I1.1 I1.0 And M0.0
. M3.3
() LAD
Bit Logic
137
RS
FBD
Parameter
<address>
Data Type
BOOL
Memory Area
I, Q, M, D, L
Description
S
R
Q
BOOL
BOOL
BOOL
I, Q, M, D, L, T, C
I, Q, M, D, L, T, C
I, Q, M, D, L
:
. RLO=0 RLO =1 RS
. S=0 R=1
1 . S=1 R=0
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. Q4.0 M0.0 I0.1 I0.0
.
.
() STL
A
R
A
S
=
I0.0
M0.0
I0.1
M0.0
Q4.0
() LAD
Bit Logic
SR
FBD
Parameter
<address>
Data Type
BOOL
Memory Area
I, Q, M, D, L
Description
S
R
Q
BOOL
BOOL
BOOL
I, Q, M, D, L, T, C
I, Q, M, D, L, T, C
I, Q, M, D, L
:
. RLO=0 RLO =1 RS
. S=1 R=0
1 . S=0 R=1
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. Q4.0 M0.0 I0.1 I0.0
.
.
() STL
A
S
A
R
A
=
I
M
I
M
M
Q
0.0
0.0
0.1
0.0
0.0
4.0
() LAD
(Comparison Instruction)
(Comparison Instruction) -
.
:
==
<>
>
<
>=
<=
:
x ? I
x ? D
x ? R
(Comparison Instruction)
?I
: STL
:
CC0
0
0
1
0
1
0
ACCU2-L = ACCU1-L
ACCU2-L < ACCU1-L
ACCU2-L > ACCU1-L
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MW0
ACCU1-L MW0
MW2
MW2 ACCU2-L
ACCU2-L . ACCU1-L
>I
=
Q4.0
ACCU1-L
. Q4.0 RLO=1
FBD
(Comparison Instruction)
141
?D
: STL
:
: Word
CC1
CC0
0
0
1
0
1
0
ACCU2 = ACCU1
ACCU2 < ACCU1
ACCU2 > ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD0
ACCU1 MW0
MD4
ACCU2 .
<>D
=
Q4.0
ACCU1
. Q4.0 RLO=1
FBD
(Comparison Instruction)
?R
: STL
:
CC0
0
0
1
0
1
0
ACCU2 = ACCU1
ACCU2 < ACCU1
ACCU2 > ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD0
ACCU1 MD0
1.359E+02
ACCU2 .
<R
=
Q4.0
RLO=1 ACCU1
. Q4.0
FBD
(Conversion Instruction)
(Conversion Instruction) -
:
: Integer BCD :
x
RND Round
TRUNC Truncate
(Conversion Instruction)
BTI
: STL
:
BTI
:
. (Integer) ACCU1-L BCD BTI
. ACCU2 ACCU1-H ACCU1-L
11 0 +999 -999 ACCU1-L BCD
BCD . 14 12 .(0=Positive , 1= Negative) 15
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MW10
Integer ACCU1-L
BTI
T
MW10 BCD
MW12
. MW12 ACCU1-L
Integer BCD
+915
. ACCU1-L
. I0.0=1
(overflow) Q4.0=1
. Q4.0
FBD
(Conversion Instruction)
ITB
: STL
:
ITB
:
. BCD ACCU1-L ITB
. ACCU2 ACCU1-H ACCU1-L
: 15 12 BCD 11 0 ACCU1-L
0000= Positive
,
1111=Negative
Status Word OS OV +999 -999 BCD
. RLO .
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MW10
BCD ACCU1-L
ITB
T
MW10
MW12
. MW12 ACCU1-L
BCD Integer -413
. ACCU1-L
Q4.0=1
FBD
(Conversion Instruction)
BTD
: STL
:
BTD
:
. (Integer) ACCU1 BCD BTD
. ACCU2 ACCU1
27 0 +9,999,999 -9,999,999 ACCU1 BCD
. 30 28 .(0=Positive , 1= Negative) 31
CPU BCDF 15 10 BCD
OB121 . CPU Id:2521 STOP
. CPU Stop
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD10
Integer ACCU1
BTI
T
MD10 BCD
MD20
. MD20 ACCU1
Integer BCD
+157821
. ACCU1
BTI Q4.0=1
FBD
(Conversion Instruction)
ITD
Integer (16-bit) to
Double Integer (32-bit)
: STL
:
ITD
:
ACCU1 . ACCU1-L ITD
. ACCU2
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
MW10
L
ACCU1-L
MW10
. MD12 ACCU1
IT
B
T
-10
MD12
. ACCU1
Example: MW10 = "-10" (Integer, 16-bit)
Contents
ACCU1-H
..
..
ACCU1-L
Bit
31 . . .
XXXX
1111
1111 1111
0110
1111
1111
1111
1111 1111
0110
1111
. . . 16 15 . . .
1111
..
..
...0
BTI Q4.0=1
FBD
(Conversion Instruction)
DTB
: STL
:
DTB
:
. BCD ACCU1 DTB
. ACCU2 ACCU1
: 31 28 BCD 27 0 ACCU1
0000= Positive
1111=Negative
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD10
BCD ACCU1-L
ITB
T
MW10
MD20
. MW12 ACCU1-L
BCD Integer -701
. ACCU1-L
BTI Q4.0=1
FBD
(Conversion Instruction)
DTR
: STL
:
DTR
:
. (Real) ACCU1 DTR
. ACCU2 ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD10
ACCU1
ITB
T
MD10
MD20
. MD20 ACCU1
ACCU1 Real Integer +500
BTI Q4.0=1
FBD
(Conversion Instruction)
INVI
: STL
:
INVI
:
1 . ACCU1-L 16 INVI
. ACCU1-L . 1 0 0
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MW8
MW8
ACCU1-L
INVI
T
. MW10 ACCU1-L
MW10
Contents
ACCU1-L
Bit
15 . . .
..
0110
0011
1010
1110
1001
1100
0101
0001
. I0.0=1
. Q4.0 Q4.0=1
..
...0
FBD
(Conversion Instruction)
INVD
: STL
:
INVD
:
0 1 . ACCU1 32 INVD
. ACCU1 . 1 0
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD8
MD 32
ACCU1
INVI
T
. MD12 ACCU1
MD12
Contents
ACCU1-H
Bit
31 . . .
..
0110
1001
Q4.0=1
..
ACCU1-L
. . . 16 15 . . . . .
..
...0
FBD
(Conversion Instruction)
NEGI
: STL
:
NEGI
:
0 0 1 . ACCU1-L 16 NEGI
. ACCU1-L . 1 1
. ( ) .
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
CC 1
CC 0
OV
OS
Result = 0
Result = 32768
:
L
MW8
MW8
( ) ACCU1-L
NEGI
T
. MW10 ACCU1-L
MW10
.
Contents
ACCU1-L
Bit
15 . . .
..
..
...0
0101
1101
0011
1000
1010
0010
1100
1000
Q4.0=1
FBD
(Conversion Instruction)
NEGD
: STL
:
NEGD
:
0 0 1 . ACCU1 32 NEGI
. ACCU1 . 1 1
. ( ) .
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
CC 1
CC 0
OV
OS
Result = 0
Result = 2,147,483,648
:
L
MD8
MD8
( ) ACCU1
NEGI
T
. MD12 ACCU1
MD12
.
Contents
Bit
before execution of NEGD
after execution of NEGD
31 . . .
0101
1010
ACCU1-H
..
..
1111 0110
0000 1001
Q4.0=1
. . . 16 15 . . .
0100 0101
1011 1010
ACCU1-L
..
..
...0
1101 0011 1000
0010 1100 1000
FBD
(Conversion Instruction)
NEGR
: STL
:
NEGR
:
ACCU1 31 . ACCU1 32 NEGR
. ACCU1 ( 1 0 )
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD8
MD8
ACCU1
NEGR
T
. MD12 ACCU1
MD12
.
MD8 = + 6.234
Q4.0=1
MD12 = - 6.234
FBD
(Conversion Instruction)
CAW
: STL
:
CAW
ACCU1-L . ACCU1-L CAW :
FBD , LAD . ACCU2 ACCU1-H
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MW10
MW10
ACCU1-L
CAW
T
MW20
MW20
Contents
ACCU1-H-H
ACCU1-H-L
ACCU1-L-H
ACCU1-L-L
value A
value B
value C
value D
value A
Value B
value D
value C
CAD
: STL
:
CAD
ACCU2 ACCU1 . ACCU1 CAD :
. CAW Status Word FBD LAD .
:
L
MD10
MD10
ACCU1
CAD
T
MD20
MD20
Contents
ACCU1-H-H
ACCU1-H-L
ACCU1-L-H
ACCU1-L-L
value A
value B
value C
value D
value D
value C
value B
value A
(Conversion Instruction)
RND
Round
: STL
:
RND
:
(Double Integer) 32 32 RND
19 18 18.5 ) .
. OS OV . (
. ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD8
MD8
MD12 ACCU1
RND
T
MD12
MD8 = "100.5"
=>
RND =>
MD12 = "+100"
MD8 = "-100.5"
=>
RND =>
MD12 = "-100"
FBD
. I0.0=1
Q4.0=1
. Q4.0
(Conversion Instruction)
TRUNC
Truncate
: STL
:
TRUNC
:
(Double Integer) 32 32 TRUNC
OS OV . .
. ACCU1 .
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
MD8
MD8
ACCU1
TRUNC
T
MD12
MD12
MD8 = "100.5"
=>
TRUNC =>
MD12 = "+100"
MD8 = "-100.5"
=>
TRUNC =>
MD12 = "-100"
. Q4.0=1
FBD
(Conversion Instruction)
RND+
Round to Upper
Double Integer
: STL
:
RND+
:
(Double Integer) 32 32 RND +
+2 +1.2
. OS OV . -1 -1.5
. ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
FBD
Q4.0
RND-
Round to Lower
Double Integer
: STL
:
RND:
(Double Integer) 32 32 RND -
. +1 +1.2
. ACCU1 . OS OV
. RND+ Statud word
FBD
(Counter Instruction)
(Counter Instruction) -
. CPU STEP7
CPU . Word
.
( ) 999 0 BCD
127 . 11 0
:
:
x
FR
LC
Reset Counter
CU
Counter Up
CD
Counter Down
(Counter Instruction)
FR
: STL
:
FR <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
:
FR 1 0 RLO
. 1 0 RLO .
. RLO=1 1 0 RLO
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I 1.0
FR
C3
FR 1 0 I1.0
. C3
.
.
LAD
FBD
(Counter Instruction)
: STL
:
L <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
:
ACCU2 ACCU1 L
ACCU1-L Integer
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
C3
C3
. ACCU1-L
.
LAD
FBD
(Counter Instruction)
: STL
:
LC <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
:
ACCU2 ACCU1 LC
ACCU1-L BCD
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
LC
C3
BCD C3
.. ACCU1-L
LAD
FBD
(Counter Instruction)
Reset Counter
: STL
:
R <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
. RLO=1 R :
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I0.2
C10
. C10 I0.2=1
LAD
FBD
: STL
:
S <Counter>
. ACCU1-L 1 0 RLO S :
. Status Word . 999 0 BCD
:
A
I0.0
100 I0.0
L
s
C#100
C5
.
FBD
LAD
(Counter Instruction)
CU
Counter Up
: STL
:
CU <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
:
. 1 0 RLO CU
RLO 999 . 999
.
OV .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I0.0
RLO I0.0
CU
C10
. C10 1 0
LAD
FBD
(Counter Instruction)
CD
Counter Down
: STL
:
CD <Counter>
Address
< Counter >
Data Type
Counter
Memory Area
C
:
. 1 0 RLO CD
. RLO 0 . 0
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
C#14
RLO I0.1
I0.1
C10 1 0
C10
I0.0
CD
C10
AN
C1
Q0.0
. C10 1 0 I0.0
Q0.0
.
LAD
FBD
(Counter Instruction)
FBD
S_CU
: FBD
Parameter
no.
CU
S
PV
R
CV
CV_BCD
Q
Data Type
COUNTER
BOOL
BOOL
WORD
BOOL
WORD
WORD
BOOL
Memory
C
I, Q, M, D, L
I, Q, M, D, L, T, C
I, Q, M, D, L or constant
I, Q, M, D, L, T, C
I, Q, M, D, L
I, Q, M, D, L
I, Q, M, D, L
BCD
(Hex)
(BCD)
:
CU . PV 1 0 S RLO
Q . R .
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
LAD
(Counter Instruction)
S_CD
: FBD
Parameter
no.
CD
S
PV
R
CV
CV_BCD
Q
Data Type
COUNTER
BOOL
BOOL
WORD
BOOL
WORD
WORD
BOOL
Memory
C
I, Q, M, D, L
I, Q, M, D, L, T, C
I, Q, M, D, L or constant
I, Q, M, D, L, T, C
I, Q, M, D, L
I, Q, M, D, L
I, Q, M, D, L
BCD
(Hex)
(BCD)
:
CD . PV 1 0 S RLO
Q . R .
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
LAD
(Counter Instruction)
S_CUD
: FBD
Parameter
no.
COUNTER C
CU
BOOL
I, Q, M, D, L
CD
BOOL
I, Q, M, D, L
BOOL
I, Q, M, D, L, T, C
PV
WORD
I, Q, M, D, L or constant
BOOL
I, Q, M, D, L, T, C
CV
WORD
I, Q, M, D, L
(Hex)
CV_BCD
WORD
I, Q, M, D, L
(BCD)
BOOL
I, Q, M, D, L
BCD
:
CU . . PV 1 0 S RLO
R . CD
. Q .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
LAD
(DB Instructions)
.
. FC FB OB Shared DB :
. FB FB Instance DB :
: DB
x
OPN
CDB
L DBLG
L DILG
L DINO
(DB Instructions)
OPN
: STL
:
Source Address
1 to 65535
:
: Instance Shared OPN
OPN
DBn
n Shared
OPN
DIn
n Instance
. Instance Shared
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
OPN
DB10
DBX0.0
Q4.0
DB10
Q4.0 DBX0.0
.
LAD
FBD
(DB Instructions)
CDB
Exchange Shared DB
and Instance DB
: STL
:
CDB
:
Instance Shared . Instance Shared CDB
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
OPN
DB10
OPN
DI20
Instance Shared
Instance CDB
CDB
. Shared
L DBLG
Load Length of
Shared DB in ACCU1
: STL
:
L DBLG
:
ACCU1 Shared ACCU2 ACCU1
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
OPN
DB10
DBLG
Shared
ERRO MD10
MD10
<
JC
ERRO
(DB Instructions)
L DBNO
Load Number of
Shared DB in ACCU1
: STL
:
L DBNO
Shared ACCU2 ACCU1 :
. Status Word ACCU1
:
OPN
DB10
Shared
DBNO
( )
MW0
. MW0
L DILG
Load Length of
Instance DB in ACCU1
: STL
:
L DILG
Instance ACCU2 ACCU1 :
. ACCU1
:
OPN
DI20
DILG
Instance
ERRO MW10
MW10
<
JC
ERRO
: STL
:
L DINO
Instance ACCU2 ACCU1 :
Status Word . ACCU1
:
OPN
DI20
Instance
DBNO
( )
MW0
. MW0
173
(jump)
(LOOP) .
.Loop Label .
: Loop jump
. Label x
. Label x
(Test:
) : Label Loop x
. x
. Label Label x
. LOOP
. Label . Label x
. Program Code 32767 Word Label x
:
: :
x
x
JU
JL
Jump Unconditional
Jump to Labels
: RLO :
x
x
x
x
JC
JCN
JCB
JNB
Jump if RLO = 1
Jump if RLO = 0
Jump if RLO = 1 with BR
Jump if RLO = 0 with BR
JBI
JNBI
JO
JOS
Jump if BR = 1
Jump if BR = 0
Jump if OV = 1
Jump if OS = 1
: :
x
x
x
x
x
x
x
JZ
JN
JP
JM
JPZ
JMZ
JUO
Jump if Zero
Jump if Not Zero
Jump if Plus
Jump if Minus
Jump if Plus or Zero
Jump if Minus or Zero
Jump if Unordered
JU
Jump Unconditional
: STL
:
JU <jump Label>
:
Label Status Word JU
.
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I1.0
JU
I1.2
JC
DELE
FORW
L
INC
DELE:
FORW:
MB10
1
.
jump Label
MB10
Label JU
JU
FORW
) (DELE )
(JC DELE
MB10
(DELE )
I2.1
( Label )
.
LAD
FBD
JL
Jump to Labels
: STL
:
JL <jump Label>
:
( ) JL . JL
JU ACCU1-L-L=0 JU . JU
254 ..... 3 2 ACCU1-L-L JU ACCU1-L-L=1
JU JL JU .
. JL
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MB0
JL
LSTX
. LSTX ACCU1-L-L>3
JU
SEG0
. SEG0 ACCU1-L-L=0
JU
SEG1
. SEG1 ACCU1-L-L=1
JU
COMM
. COMM ACCU1-L-L=2
JU
LSTX:
JU
SEG0:
SEG3
. ACCU1-L-L MB0
. SEG3 ACCU1-L-L=3
COMM
*
JU
SEG1:
COMM
. JU
*
*
JU
SEG3:
COMM
*
*
COMM:
*
LAD
FBD
JC
Jump if RLO=1
: STL
:
JC <jump Label>
Label RLO=1 JC :
. (Conditional)
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
I1.0
JC
I1.2
JC
JOVR:
JOVR
IW8
MW22
. JOVR
I2.1
LAD
JU
. I0.0
JCN
Jump if RLO=0
FBD
: STL
:
JCB
: STL
:
I1.0
RLO JCB
I1.2
RLO=1 BR
JCB
JOVR:
JOVR
IW8
MW22
I2.1
FBD LAD
BR JMP
.
JNB
: STL
:
I1.0
JNB
I1.2
JNB
JOVR:
JOVR
IW8
MW22
. JOVR
I2.1
FBD LAD
BR JMPN
.
JBI
Jump if BR=1
: STL
:
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
CALL
JBI
FC1
JBI
TEST
FC1
) BR=1
*
JU
Test:
Test ( BR SAVE
COMM
I2.2
*
COMM:
( JMP BR ) LAD
( JMP BR ) FBD
JNBI
Jump if BR=0
: STL
:
FBD LAD
JBI
JO
Jump if OV=1
: STL
:
JO <jump Label>
:
(Overflow) Status Word OV JO
. Label
. JOS JO
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
MW10
JO OV=1
*I
. OVER
JO
OVER
MW10
OVER:
NEXT:
JU
NEXT
AN
M4.0
Q4.0
NOP
( JMP OV ) LAD
( JMP OV ) FBD
JOS
Jump if OS=1
: STL
:
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
MW10
50 MW200
*I
L
MW200
50
OVER
MW10
OS
JU
OVER:
NEXT:
NEXT
AN
M4.0
Q4.0
NOP
. OVER
JO JOS
/I
JOS
JOS OS=1
( JMP OS ) LAD
( JMP OS ) FBD
JZ
Jump if Zero
: STL
:
JZ <jump Label>
:
. Label JZ
: Status Word
CC1=0
CC0=0
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
30
-I
JZ
ZERO
MW10
30 MW10
. ZERO JZ
*
JU
NEXT
ZERO:
AN
M4.0
NEXT:
NOP
Q4.0
0
( JMP ) LAD
( JMP ) FBD
JN
: STL
:
JN <jump Label>
:
. Label JN
: Status Word
CC1=0
CC1=1
CC0=1
CC0=0
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
30
-I
JN
30 MW10
. NOZE JN
NOZE
MW10
*
JU
NOZE:
NEXT:
NEXT
AN
M4.0
Q4.0
NOP
( JMP ) LAD
( JMP ) FBD
JP
Jump if Plus
: STL
:
JP <jump Label>
:
. Label JP
: Status Word
CC1=1
CC0=0
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
30
-I
JP
30 MW10
. POS JP
POS
MW10
*
JU
POS:
AN
NEXT:
NOP
NEXT
M4.0
Q4.0
0
( JMP ) LAD
( JMP ) FBD
JM
Jump if Minus
: STL
:
JM <jump Label>
:
. Label JM
: Status Word
CC1=0
CC0=1
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
L
MW10
30
-I
JM
30 MW10
. NEG JM
NEG
MW10
*
JU
NEG:
AN
NEXT:
NOP
NEXT
M4.0
Q4.0
0
( JMP ) LAD
( JMP ) FBD
JPZ
: STL
:
CC0=0
CC1=1
CC0=0
LAD
) FBD LAD
( JMP
JMZ
: STL
:
FBD
CC1=0
CC0=0
CC1=1
CC0=0
) FBD LAD
( JMP
JUO
Jump if Unordered
: STL
:
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
ERRO:
NEXT:
L
L
/D
JUO
T
JU
S
NOP
ID0
ID4
ID4=0
. ERRO JUO
ERRO
MD10
NEXT
Q4.1
0
187
LOOP
Loop
: STL
:
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
*
NEXT:
MW10
MD20
MD20
MW10
LOOP
MD20
.
NEXT
FBD LAD
( JMP
.
CPU .
: .
x
+I
-I
*I
/I
+D
-D
*D
/D
MOD
: CC1,CC0 , OV , OS
CC 1
CC 0
OV
OS
0 (zero)
189
CC 1
CC 0
OV
OS
CC 1
CC 0
OV
OS
/D or MOD: division by 0
Underflow (addition)
16 bits: result = -65536
32 bits: result = -4 294 967 296
Underflow (multiplication)
16 bits: result < -32 768 (negative number)
32 bits: result < -2 147 483 648 (negative number)
Overflow (addition, subtraction)
16 bits: result > 32 767 (positive number)
32 bits: result > 2 147 483 647 (positive number)
Overflow (multiplication, division)
16 bits: result > 32 767 (positive number)
32 bits: result > 2 147 483 647 (positive number)
Underflow (addition, subtraction)
16 bits: result < -32. 768 (negative number)
32 bits: result < -2 147 483 648 (negative number)
Division by 0
Operation
+I
: STL
:
+I
:
. ACCU1-L ACCU2-L ACCU1-L +I
. CC1,CC0, OV,OS RLO .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
MW2 MW0
L
MW0
MW2
MW10
. MW10
LAD
Q4.0 I0.0=1
)
. Q4.0 ( 32768
FBD
191
-I
-I
: STL
:
I0.0=1
Q4.0
. Q4.0
*I
*I
: STL
:
/I
Divide ACCU2 by
ACCU1 as Integer(16-Bit)
: STL
:
/I
ACCU1- ACCU1-L ACCU1-L ACCU2-L / I :
.. Status Word . H
LAD
: STL
:
+
:
ACCU2-L . ACCU1-L ACCU1-L +
: .
+32767
-32768
+2,147,483,647
-2,147,483,648
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
MW0
L
MW0
2589
MW10
. MW10
LAD
Q4.0 I0.0=1
Q4.0
FBD
193
+D
: STL
:
+D
:
. ACCU1 ACCU2 ACCU1 +D
. CC1,CC0, OV,OS RLO .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
MD4 MD0
L
MD0
MD4
MD10
. MD10
LAD
Q4.0 I0.0=1
Q4.0
FBD
-D
-D
: STL
:
*D
: STL
:
*D
. ACCU1 ACCU2 ACCU1 *D :
. CC1,CC0, OV,OS RLO .
FBD
/D
: STL
:
/D
:
. ACCU2 ACCU1 ACCU1 ACCU2 /D
. CC1,CC0, OV,OS RLO
LAD
195
MOD
Division Remainder
Double Integer(32-Bit)
: STL
:
MOD
:
ACCU1 ACCU2 . MOD
RLO . . ACCU1
. CC1,CC0, OV,OS
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
MD4 MD0
L
MD0
MD4
MD10
LAD
I0.0=1
Q4.0
. Q4.0
FBD
.
CPU .
.
:
x
+R
-R
*R
/R
:
x
ABS
Absolute Value
SQR
SQRT
EXP
LN
SIN
COS
TAN
ASIN
ACOS
ATAN
197
: CC1,CC0 , OV , OS
CC 1 CC 0 OV
OS
+0, -0 (Null)
. os :*
Underflow
CC 1 CC 0 OV
OS
+R
: STL
:
+R
:
. ACCU1 ACCU2 ACCU1 +R
. CC1,CC0, OV,OS RLO .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
MD4 MD0
L
MD0
MD4
MD10
. MD10
LAD
Q4.0 I0.0=1
Q4.0
FBD
199
-R
: STL
-R
:
:
*R
: STL
*R
:
:
*R
/R
/R
: STL
:
:
LAD
ABS
Absolute Value of
Floating-Point (32-Bit)
: STL
:
ABS
:
. ACCU1 ACCU1 ABS
. Staut Word
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. MD10 MD8
L
MD8
ABS
T
MD10
LAD
I0.0=1
. Q4.0
FBD
201
SQR
: STL
:
SQR
. ACCU1 ACCU1 SQR :
. CC1,CC0, OV,OS
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
. MD10 MD0
L
MD0
SQR
T
MD10
LAD
I0.0=1
. Q4.0
SQRT
Square Root of
Floating-Point (32-Bit)
: STL
:
SQRT
:
. ACCU1
ACCU1 SQRT
. CC1,CC0, OV,OS
I0.0=1
. Q4.0
FBD
EXP
Exponential Value of
Floating-Point (32-Bit)
: STL
:
EXP
:
. ACCU1 ACCU1 e EXP
. CC1,CC0, OV,OS
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. MD10 MD0 e
L
MD0
EXP
T
MD10
LAD
I0.0=1
. Q4.0
LN
Natural Logarithm of
Floating-Point (32-Bit)
: STL
:
LN
. ACCU1 ACCU1 LN :
CC1,CC0, OV,OS
FBD
203
SIN
Sine of Angles as
Floating-Point (32-Bit)
: STL
:
SIN
:
ACCU1 ACCU1 SIN
. CC1,CC0, OV,OS .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. MD10 MD0
L
MD0
SIN
T
MD10
LAD
I0.0=1
. Q4.0
FBD
COS
Cosine of Angles as
Floating-Point (32-Bit)
: STL
:
COS
:
ACCU1 ACCU1 COS
. CC1,CC0, OV,OS .
:
. MD10 MD0
L
MD0
COS
T
MD10
LAD
TAN
Tangent of Angles as
Floating-Point (32-Bit)
: STL
:
TAN
:
ACCU1 ACCU1 TAN
. CC1,CC0, OV,OS .
FBD
ASIN
: STL
:
ASIN
:
ACCU1 ACCU1 ASIN
. CC1,CC0, OV,OS .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
. MD10 MD0
L
MD0
ASIN
T
MD10
LAD
I0.0=1
. Q4.0
FBD
: STL
:
ACOS
:
ACCU1 ACOS
. CC1,CC0, OV,OS . ACCU1
:
. MD10 MD0
L
MD0
ACOS
T
MD10
LAD
ATAN
: STL
:
ATAN
:
ACCU1 ACCU1 ATAN
. CC1,CC0, OV,OS .
FBD
207
Load
L STW
LAR1 AR2
LAR1 <D>
LAR1
LAR2 <D>
LAR2
Transfer
T STW
TAR1 AR2
TAR1 <D>
TAR2 <D>
TAR1
TAR2
CAR
Load
: STL
:
L <Address>
Address
<address>
Data type
BYTE
WORD
DWORD
Memory area
Q , I , PI , M , L ,D, Pointer,
Parameter
Source address
0...65535
0...65534
0...65532
:
0 ACCU1 ACCU2 ACCU1 L
. ACCU1
Status Word
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
Writes:
:
L
IB10
MB120
. ACCU1-L-L MB120
DBB12
. ACCU1-L-L DBB12
DIW15
LD252
P#I8.7
OTTO
. ACCU1-L-L IB10
Load
Contents of ACCU 1
ACCU1-H-H
ACCU1-H-L
ACCU1-L-H
ACCU1-L-L
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
00000000
00000000
00000000
<MB10>
00000000
00000000
<MB10>
<MB11>
<MB10>
<MB11>
<MB12>
<MB13>
(L <double word>)
X = "1" or "0"
209
L STW
: STL
:
L STW
:
Status Word
. L STW .
Bit
Content:
L AR1
31-9
BR
CC 1
CC 0
OV
OS
OR
STA
RLO
/FC
: STL
:
LAR1
:
. ACCU2 ACCU1 . ACCU1 AR1 LAR1
. Status Word
: STL
:
LAR1 <D>
Address
Data type
DWORD
Pointer Constant
<D>
Memory area
D,M,L
Source address
0...65532
:
. ACCU2 ACCU1 . Dword AR1 LAR1
. Status Word
:
LAR1
DBD20
. AR1
DBD20
LAR1
DID30
. AR1
Instance DID30
LAR1
LD180
LAR1
MD24
LAR1
P#M100.0
: STL
:
LAR1 AR2
:
. ACCU2 ACCU1 . AR1 AR2 LAR1 AR2
. Status Word
L AR2
: STL
:
LAR2
:
. ACCU2 ACCU1 . ACCU1 AR2 LAR2
. Status Word
: STL
:
LAR2 <D>
Address
Data type
DWORD
Pointer Constant
<D>
Memory area
D,M,L
Source address
0...65532
:
. ACCU2 ACCU1 . Dword AR2 LAR2
. Status Word
:
LAR2
DBD20
. AR2
DBD20
LAR2
DID30
. AR2
Instance DID30
LAR2
LD180
LAR2
MD24
LAR2
P#M100.0
211
Transfer
: STL
:
T <Address>
Address
<address>
Data type
BYTE
WORD
DWORD
Memory area
Q , I , PQ , , M , L , D
Source address
0...65535
0...65534
0...65532
:
ACCU1 . ACCU1 T
Master Control Relay .
. ACCU1 0 T MCR=0
. Status Word
:
T
QB10
MW120
DBD2
. QB10 ACCU1-L-L
. MW120 word ACCU1-L
DBD2 Dword ACCU1
..
T STW
Transfer ACCU1
into Status Word
: STL
:
T STW
:
. Status Word 8 0 T STW
. Status Word
. 1,4,5,6,7,8 OR,STA,/FC S7-300 CPU :
CAR
: STL
:
CAR
:
Status
TAR1
: STL
:
TAR1
:
. ACCU2 ACCU1 . ACCU1 AR1 TAR1
. Status Word
: STL
:
TAR1 <D>
Address
<D>
Data type
DWORD
Memory area
D,M,L
Source address
0...65532
:
(D) (M) AR1 TAR1
Status Word . ACCU2 ACCU1 . (L)
.
:
TAR1
DBD20
. DBD20 AR1
TAR1
DID30
TAR1
LD180
TAR1
MD24
: STL
:
TAR1 AR2
:
. ACCU2 ACCU1 . AR2 AR1 TAR1 AR2
. Status Word
213
TAR2
: STL
:
TAR2
:
.. ACCU2 ACCU1 . ACCU1 AR2 TAR2
. Status Word
: STL
:
TAR2 <D>
Address
<D>
Data type
DWORD
Memory area
D,M,L
Source address
0...65532
:
(D) (M) AR2 TAR2
Status Word . ACCU2 ACCU1 . (L)
.
:
TAR1
DBD20
. DBD20 AR2
TAR1
DID30
TAR1
LD180
TAR1
MD24
215
:
.
215
BE
Block End
BEC
BEU
CALL
Block Call
CC
Conditional Call
UC
Unconditional Call
Call FB
Call FC
Call SFB
Call SFC
MCR
MCR(
)MCR
End MCR
MCRA
MCRD
215
BE
BEU
Block End
Block End Unconditional
: STL
:
BE
BEU
:
( ) BEU , BE
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
NEXT:
A
JC
*
BE
NOP
I1.0
NEXT
I1.0=1
JC I1.0=0
. BE
FBD LAD
BEC
: STL
:
BEC
:
. 1 RLO BE BEC
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
BEC
L
T
I1.0
IW4
MW10
I1.0=1
BEC I1.0=0
.
FBD LAD
CALL
Block Call
: STL
:
Block Type
Function
System function
Function block
System function block
. Symbol Table
CALL STL
.
Formal Parameter
. Actual Parameter
CALL
FC6
Formal parameter
Actual parameter
NO OF TOOL
:= MW100
TIME OUT
:= MW110
FOUND
:= Q 0.1
ERROR
:= Q 100.0
. CALL
Actual Parameter FB
: . Call Instance
CALL
FB99 , DB2
Formal parameter
Actual parameter
MAX_RPM
:= #RPM2_MAX
MIN_RPM
:= #RPM2
MAX_POWER
:= #POWER2
MAX_TEMP
:= #TEMP2
217
CALL
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
LAD:
FBD LAD
LAD/STL/FBD FB FC
.
FB FC
FBD LAD
.
SFB SFC
. Library
FBD SFC LAD SFB
.
FBD:
: STL
:
Name
Type
Test2
FB2
Test3
FB3
. DB FB FB1
CALL # TEST2
CALL # TEST3
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
LAD
FBD
219
CC
Conditional Call
: STL
:
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
CC
A
I1.0
FC6
M3.0
FC6 I1.0=1
.
LAD
FBD
UC
Unconditional Call
: STL
:
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
UC
I1.0
FC6
FC6 I1.0
LAD
FBD
221
MCR
: STL
MCR
.
:
: MCR . MCR
x
= <bit>
S <bit>
R <bit>
. T = MCR =0
R S .
MCR=1 .
. .
Signal State of MCR
= <bit>
0 ("OFF")
S <bit>, R <bit>
1 ("ON")
T <byte>, T <word>
T <double word>
0
: MCR
x
MCRA
x
MCR(
x
)MCR
x
MCRD
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
MCRA
A
MCR(
A
=
L
T
)MCR
MCRD
A
=
I 1.0
I 4.0
Q 8.0
MW 20
QW 10
I 1.1
Q 8.1
I 1.0=1
MCR I1.0 =0
MCR Qw20 Q8.0
.
MCR
. MCR
LAD
FBD
223
(
. .
. 2n n
2n n .
.
) 0
. 1 0
(Sign Bit
) CC1 . 0 1
. (Jump) CC1 . OV , CC0 (Status Word
RLO . Status Word
: Status Word .
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
x
(
. Rotate
Rotate 0 Shift
(Status Word ) CC1 .
. (Jump) CC1 . OV , CC0
:
x
SSI
SSI
: STL
:
:
ACCU1-L ( ) SSI
SSI . ACCU1-H .
SSI<Number> ACCU2-L-L
0 . 15 0 . Number
. No operation NOP
:
L
SSI
T
+10
1
QW0
10
( ) 5
15
14
13
12
11
10
ACCU1-L
.
1
.
LAD
FBD
LAD
225
SSD
: STL
:
SSD
ACCU1 ( ) SSD
ACCU2-L-L
SSD .
Number SSD<Number>
NOP 0 . 15 0 .
. No operation
:
. SSD7
Contents
Bit
before execution of SSD 7
after execution of SSD 7
31 . . .
1000
1111
ACCU1-H
..
..
1111 0110
1111 0001
. . . 16
0100
1110
15 . . .
0101
1100
ACCU1-L
..
..
...0
1101 0011 1011
1000 1011 1010
:
L
L
SSD
JP
+3
MD20
Next
3
SSD . MD20
. ( ) ACCU1
CC0=0 CC1=1 1
JP
. Next
LAD
FBD
LAD
SLW
: STL
:
SLW
:
. ACCU1-L Word SLW
SLW . ACCU1-H
SLW<Number> ACCU2-L-L
0 . 15 0 . Number
. No operation NOP
:
L
SLW1
T
+3
3
MW0 ( )
MW0
15
14
13
12
11
10
:
. SLW5
Contents
ACCU1-H
Bit
31 . . .
..
0101
0101
..
ACCU1-L
. . . 16
15 . . .
..
..
...0
1111 0110
0100
0101
1101
0011
1011
1111 0110
0100
1010
0111
0110
0000
LAD
FBD
LAD
227
SRW
: STL
:
SRW
ACCU1-H
ACCU1-L
Bit
31 . . .
..
..
. . . 16
15 . . .
..
..
...0
0101
1111
0110
0100
0101
1101
0011
1011
0101
1111
0110
0100
0000
0001
0111
0100
LAD
FBD
LAD
SLD
SLD
: STL
:
:
. No operation NOP 0 .
. Dword :
SRD
SRD
: STL
:
:
. No operation NOP 0 .
:
L
L
SRD
JP
+3
MD20
Next
3
SRD . MD20
. ( ) ACCU1
CC0=0 CC1=1 1
JP
. Next
. SHR_W SHR_DW : FBD LAD
229
RLD
: STL
:
RLD
RLD <Number> ACCU2-L-L
0 . 32 0 . Number
. No operation NOP
:
Contents
Bit
before execution of RLD 4
after execution of RLD 4
31 . . .
0101
1111
ACCU1-H
..
..
1111
0110
0110
0100
. . . 16
0100
0101
15 . . .
0101
1101
ACCU1-L
..
..
1101
0011
0011
1011
...0
1011
0101
LAD
FBD
LAD
RRD
: STL
:
RRD
31 . . .
0101
1011
ACCU1-H
..
..
1111
0110
0101
1111
. . . 16
0100
0110
15 . . .
0101
0100
ACCU1-L
..
..
1101
0011
0101
1101
...0
1011
0011
LAD
FBD
LAD
231
RLDA
: STL
RLDA
:
:
CC
1
Bit
ACCU1-H
31 . .
.
0101
1011
..
ACCU1-L
..
1111
0110
1110
1100
. . . 16
0100
15 . .
.
0101
..
..
...0
1101
0011
1011
1000
1011
1010
0111
011X
. : FBD LAD
RRDA
RRDA
: STL
:
:
. CC1 CC0
. RRDA :
Contents
CC 1
Bit
ACCU1-H
31 . . .
..
ACCU1-L
..
0101
1111
...
16
0110 0100
X010
1111
1011 0010
15 . .
.
0101
..
..
...0
1101
0011
1011
0010
1110
1001
1101
: FBD LAD
(Timer Instructions) -
. 9 0 ( ) Word CPU
.
:
: W#16#txyz .
BCD
xyz
. .
: S5T#aH_bM_cS_dMS .
MS
a , b, c
. 9990 2H_46M_30S
233
Resolution
:
Resolution
Range
0.01 second
10MS to 9S_990MS
0.1 second
100MS to 1M_39S_900MS
1 second
1S to 16M_39S
10 seconds
10S to 2H_46M_30S
BCD .
127 . 13 12 . 11 0
. 1
.
t
.
t
.
t
.
t
t .
Extended
Pulse
Timer
On-Delay
Timer
t (
Retentive
On-Delay
Timer
1 (
Off-Delay
Timer
Pulse
Timer
:
x
x
x
x
x
x
x
x
x
FR
L
LC
R
SD
SE
SF
SP
SS
FR
: STL
:
FR <timer>
:
. 1 0 RLO FR
. LAD FBD . Restart
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
FR
I2.0
T1
I2.1
S5T#10S
SP
T1
I2.2
T1
T1
Q4.0
T1
MW10
I2.0
I2.1 10 T1 I2.1
FR
I2.0
.
I2.0 RLO (
T1
I2.0 RLO .
.
235
: STL
T1
. t1 :
BI : FBD LAD
LC
: STL
:
( ). BCD :
SP
Pulse Timer
: STL
SP < Timer>
RLO . RLO :
. One Shot .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
L
SP
A
R
A
=
I0.0
S5T#2S
T5
I0.1
T5
T5
Q4.0
. I0.0 T5
. I0.0
I0.1 . Q4.0
.
LAD
. TV . R S
Q . BCD BCD BI
FBD
237
SE
: STL
SE < Timer>
. RLO :
. RLO
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
A
L
SE
A
R
I0.0
S5T#2S
T5
I0.1
T5
A
=
I0.0 T5
I0.0
. Q4.0 .
. I0.1
T5
Q4.0
LAD
. Pulse Timer
FBD
SD
On-Delay Timer
: STL
SD < Timer>
RLO :
( ) t
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
A
L
SD
A
R
A
=
I0.0
S5T#2S
T5
I0.1
T5
T5
Q4.0
I0.0 T5
I0.0
. Q4.0 .
. I0.1
LAD
. Pulse Timer
FBD
239
SS
: STL
SS < Timer>
RLO :
. t
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
A
L
SS
A
R
A
=
I0.0
S5T#2S
T5
I0.1
T5
T5
Q4.0
I0.0 T5
I0.0
.
. I0.1 . Q4.0
LAD
. Pulse Timer
FBD
SF
Off-Delay Timer
: STL
SF < Timer>
t RLO :
( ) . t .
Status Word
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
A
L
SF
A
R
A
=
I0.0
S5T#2S
T5
I0.1
T5
T5
Q4.0
I0.0 T5
Q4.0 .
. I0.1 .
LAD
. Pulse Timer
FBD
241
. FBD LAD
. STL .
---(SP)
LAD
RLO :
. Pulse Timer
LAD .
.
I0.1 I0.0
.
. Q4.0
FBD
.. .
LAD
ExtendedPulse Timer
On-Delay Timer
FBD
Word
Word -
Word .
. Dword Low Word
.
. CC1 Status Word CC0 OV
. CC1=0 0 CC1=1 0
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
x
AW
OW
OR Word (16-bit)
XOW
AD
OD
XOD
Word
243
AW
: STL
AW
:
AW < Constant>
ACCU1-L AND ACCU2-L ACCU1-L AW :
. ACCU2-H ACCU1-H .
AND 16 ACCU1-L AW AW <Constant>
:
L
L
AW
T
IW20
IW22
IW22 IW20
MW8
MW8
:
L
L
AW
T
MW0
W#16#000F
W#16#000F MW0
MW0 MW2
. 5555
MW2
MW0
01010101 01010101
W#16#000F
00000000 00001111
MW2
00000000 00000101
LAD
Q4.0
FBD
Word
OW
Or Word (16-bit)
: STL
OW
:
OW < Constant>
. Or . Or AW :
Bit
15 . . .
..
..
...0
0101
0101
0011
1011
1111
0110
1011
0101
1111
0111
1011
1111
FBD
XW
LAD
: STL
XW
:
XW < Constant>
. XOR .XOR :
. 1 0 1
Bit
15 . . .
..
..
...0
0101
0101
0011
1011
1111
0110
1011
0101
1010
0011
1000
1110
FBD
LAD
Word
245
AD
: STL
AD
:
AD < Constant>
ACCU1 AND ACCU2 ACCU1 AD :
.
AND 32 ACCU1 AD AD <Constant>
:
L
L
AD
T
ID20
ID24
ID24 ID20
MD8
MD8
:
L
L
AD
T
MD0
DW#16#FFF
DW#16#00000FFF MD
MD0 MD4
. 55555555
MD4
MD0
0101010101010101
0101010101010101
DW#16#FFF
0000000000000000
0000111111111111
MD4
0000000000000000
0000010101010101
LAD
Q4.0
FBD
Word
OD
: STL
OD
:
OD < Constant>
. Or . Or AD :
Bit
31 . .
..
0101
0000 1111
..
..
..
..
..
1111
0011 1000
1011 0101
1111
0011 1111
1011 1111
FBD
XD
...0
0011 1011
LAD
: STL
XD
:
XD < Constant>
. XOR .XOR :
. 1 0 1
Bit
31 . .
..
..
..
..
..
..
...0
0101
0000 1111
0011 1011
1111
0011 1000
1011 0101
1010
0011 0111
1000 1110
FBD
LAD
247
(Accumulator Instructions) -
:
. S7 CPU x
. x
: x
.
31
24
23
16
15
..
ACCU1
ACCU1-H
ACCU1-H-H
ACCU1-L
ACCU1-L-H
ACCU1-L-L
ACCU1-H-L
. Status Word x
Writes:
BR
CC1
CC0
OV
OS
OR
STA
RLO
/FC
:
x
TAK
PUSH
PUSH
POP
POP
ENT
INC
DEC
+AR1
+AR2
BLD
TAK
: STL
TAK
CPU . TAK :
.
:
L
L
TAK
MW10
MW12
Contents
ACCU 1
ACCU 2
<MW12>
<MW10>
<MW10>
<MW12>
NEXT :
L
L
>
JP
TAK
T
MW10
MW12
I
NEXT
I
MW4
. TAK
. MW12 Mw10
MW10- MW10>MW12
POP
: STL
POP
: CPU
Contents
before executing POP instruction
after executing POP instruction
ACCU 1
value A
value B
ACCU 2
value B
value B
: CPU
Contents
before executing POP instruction
after executing POP instruction
ACCU 1
value A
value B
ACCU 2
value B
value C
ACCU 3
value C
value D
ACCU 4
value D
value D
:
L
L
T
POP
T
+10
+20
MD0
.
POP MD0
. MD4
MD4
249
PUSH
: STL
PUSH
: CPU
Contents
before executing PUSH instruction
after executing PUSH instruction
ACCU 1
value A
value A
ACCU 2
value B
value A
: CPU
Contents
before executing PUSH instruction
after executing PUSH instruction
ACCU 1
value A
value A
ACCU 2
value B
value A
ACCU 3
value C
value B
ACCU 4
value D
value C
:
L
PUSH
ENT
MW10
MW10
.
ENT
: STL
:
. CPU ENT :
. Load
:
L
L
+
L
ENT
L
/
T
DBD0
DBD4
R
DBD8
DBD12
R
R
DBD16
. (DBD8-DBD12)
. DBD16
: STL
:
. CPU LEAVE :
. .
INC
INC
Increment ACCU-1L-L
: STL
. ACCU-1-L-L INC :
. .
+D +I .
.
:
L
INC
T
DEC
DEC
MB22
. MB22 MB22
MB22
Decrement ACCU-1L-L
: STL
. ACCU-1-L-L DEC :
. .
-D -I .
.
:
L
DEC
T
+AR1
MB22
. MB22 MB22
MB22
: STL
+AR1
:
+AR1 <P#byte.bit>
. AR1 ACCU-1-L +AR1 :
. +32767 -32768
. AR1 +AR1 <P#byte.bit>
:
L
+AR1
+300
AR1
:
+AR1
P#300.0
. AR1 300.0
251
+AR2
+AR2
+AR2
: STL
:
<P#byte.bit>
. AR2 +AR1 :
:
L
+AR2
+300
+AR2
P#300.0
AR2
:
BLD
BLD
. AR2 300.0
: STL
:
( BLD255 BLD0 )
.
NOP0
Null Instruction
NOP0
: STL
:
NOP1
NOP0
Null Instruction
: STL
:
Z] Zj |q WYY -6
: ] f
( )
( )
-
-
-
-
-
SFB3
-
n -
Address Register
-
-
-
-
-
( )
. MW100 MW100
. 1 0 Q0.0 M101.0 word
L
L
+I
T
A
=
MW100
1
MW100
M101.0
Q0.0
MW100
7
MB100
4
3
MB101
4
3
MB101 MW100
. .
MB101
Scan
Cycle
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
10
11
12
( ) -
. CPU
Q0.0 Extended Pulse .
) MW100 .
NOT . Mw100 BEC (
. BEC RLO RLO=0
AN
L
SE
NOT
BEC
L
L
+I
T
A
=
M0.0
S5T#250MS
T1
MW100
1
MW100
M101.0
Q0.0
. F=1/T
1/(250+250) M101.0
. . 2HZ
Bits of MB100
Frequency in Hertz
Duration
M 101.0
2.0
0.5 s
M 101.1
1.0
1s
M 101.2
0.5
2s
(1 s on / 1 s off)
M 101.3
0.25
4s
(2 s on / 2 s off)
M 101.4
0.125
8s
(4 s on / 4 s off)
M 101.5
0.0625
16 s
(8 s on / 8 s off)
M 101.6
0.03125
32 s
(16 s on / 16 s off)
M 101.7
0.015625
64 s
(32 s on / 32 s off)
. 1HZ . M101.1
-
. Stop Start
: (NC)
I 0.0
S1
I 0.1
S2
I 1.0
S3
I 1.1
S4
I 2.0
S5
Q 0.0
MOTOR
: STL
O
S1
S3
MOTOR
S2
S4
ON
S5
MOTOR
I 0.0
PEB2
I 0.1
PEB1
Q 4.0
RIGHT
Q 4.1
LEFT
:
NETWORK 1
A
PEB2
FP
AN
M 0.0
PEB1
LEFT
NETWORK 2
A
PEB1
FP
AN
S
M0.1
PEB2
RIGHT
NETWORK 3
AN
PEB2
AN
PEB1
RIGHT
LEFT
-
.
.
. Q0.0
M1
M2
:
O(
A
MOT1
AN
MOT2
)
O(
AN
MOT1
MOT2
)
Q0.0
MOT1
MOT2
: Exclusive OR :
X
MOT1
MOT2
Q0.0
MOT1
MOT2
: FBD
-
. Start
. (Thumbwheel)
: .
. 9 0 BCD
: IW0
I1.3
I1.0
I1.7
I1.4
I0.3
I0.0
. .
A
T1
=
Q4.0
BEC
. BEC
I 0.7
.
IW0
AW
W#16#0FFF
1
.AND
OW
W#16#2000
OR 2000 10"
A
SE
I 0.7
T1
. BCD
Extended Pulse T1
-
:
.
O
O
O
O
O
S
L
SD
R
I 0.0
I 0.1
I 0.2
I 0.3
I 0.4
Q 0.0
S5T#30S
T1
Q0.0
SFB3 -
TP SFB3
Q IN . Q PT IN
. (Expired Time) ET
. SFB3 OB1
CALL SFB3,DB3
IN: I 0.0
PT : T#6S
Q : Q0.0
ET : MD0
. 1 0
n -
TEST:
L
T
L
T
L
*
T
L
LOOP
1
MW20
IW0
MW0
MW20
I
MW20
MW0
TEST
Address Register -
IW0
IW0
0 IW0
LAR1
AR1 0
TAK
IW0
QW [AR1,P#0.0]
AR1 QW
QW0
P#2.0
QW2 2 AR1
IW0 AR1
. QW20 QW0
L
T
ABC: L
L
<=
JCN
L
L
LAR1
TAK
T
L
L
+
T
JU
END: NOP
0
MW0
MW0
160
I
END
IW0
MW0
QW [AR1,P#0.0]
MW0
16
I
MW0
ABC
0
-
. .
. . I 12.0
. .
:
. (QW2 ) BCD
.
. (Q0.1) x
. (Q0.0) x
A
CU
A
CD
LC
T
L
>=
=
LC
L
<
=
I 12.0
C1
I 12.1
C1
C1
QW2
C#90
I
Q 0.1
C1
C#100
I
Q0.0
. Start
:
NETWORK 1
A(
O
O
)
=
Conveyor1
NETWORK 2
A
L
SP
AN
A
=
Conveyor1
S5T#10S
T1
T1
Conveyor1
Conveyor2
Start
Conveyor1
. 0 I0.0 1
. FBD
: Q0.0
: Q0.1
: Q0.2
( ) : Q0.1
. ZEn01_08_STEP7_Mix
.
.
.
.
.
.
.
FB
DB .
FC
OB .
-
. B A
. .
-
:
: B A
(Inlet Valve) x
(Feed Pump) x
(Feed Valve) x
(Flow Sensor)
:
(Drain Valve)
:
x
x
x
x
-
:
. x
. x
. x
)
x
(
. x
. x
. x
:
. x
. x
. x
. x
:
. x
. Tank Empty x
. x
-
:
Stop / Start
Stop x
x
x
-
:
. FB ... Count Off On x
. FB1 Instance DB3 DB2 DB1 x
.
. FC Close Open x
-
: Symbol Table
Symbole
Agitator
Agitator_fault
Agitator_maint
Agitator_off
Agitator_on
Agitator_running
Agitator_start
Agitator_stop
DB_agitator
DB_feed_pump_A
DB_feed_pump_B
Drain
Drain_closed
Drain_closed_disp
Drain_open
Drain_open_disp
EMER_STOP_off
Feed_pump_A
Feed_pump_A_fault
Feed_pump_A_maint
Feed_pump_A_off
Feed_pump_A_on
Feed_pump_A_start
Feed_pump_A_stop
Feed_pump_B
Feed_pump_B_fault
Feed_pump_B_maint
Feed_pump_B_off
Feed_pump_B_on
Feed_pump_B_start
Feed_pump_B_stop
Feed_valve_A
Feed_valve_B
Flow_A
Flow_B
Inlet_valve_A
Inlet_valve_B
Motor_block
Reset_maint
Tank_above_min
Tank_below_max
Tank_empty_disp
Tank_max_disp
Tank_min_disp
Tank_not_empty
Valve_block
Address Data
Type
Q 8.0 BOOL
Q 8.3 BOOL
Q 8.4 BOOL
Q 8.2 BOOL
Q 8.1 BOOL
I 1.0 BOOL
I 1.1 BOOL
I 1.2 BOOL
DB 3
FB 1
DB 1
FB 1
DB 2
FB 1
Q 9.5 BOOL
I 0.7 BOOL
Q 9.7 BOOL
I 0.6 BOOL
Q 9.6 BOOL
I 1.6 BOOL
Q 4.4 BOOL
Q 4.5 BOOL
Q 4.6 BOOL
Q 4.3 BOOL
Q 4.2 BOOL
I 0.0 BOOL
I 0.1 BOOL
Q 5.4 BOOL
Q 5.5 BOOL
Q 5.6 BOOL
Q 5.3 BOOL
Q 5.2 BOOL
I 0.3 BOOL
I 0.4 BOOL
Q 4.1 BOOL
Q 5.1 BOOL
I 0.2 BOOL
I 0.5 BOOL
Q 4.0 BOOL
Q 5.0 BOOL
FB 1
FB 1
I 1.7 BOOL
I 1.4 BOOL
I 1.3 BOOL
Q 9.2 BOOL
Q 9.0 BOOL
Q 9.1 BOOL
I 1.5 BOOL
FC 1
FC 1
Comment
Activates the agitator
Display lamp for "Agitator motor fault"
Display lamp for "Agitator motor maintenance"
Display lamp for "Agitator OFF"
Display lamp for "Agitator ON"
Feedback signal from the agitator motor
Start pushbutton agitator
Stop pushbutton agitator
Instance DB for controlling agitator motor
Instance DB for controlling feed pump A
Instance DB for controlling feed pump B
Activates the drain valve
Pushbutton for closing drain valve
Display lamp for "Drain valve closed"
Pushbutton for opening drain valve
Display lamp for "Drain valve open"
EMERGENCY STOP switch
Activates the feed pump for ingredient A
Display lamp for "Feed pump A fault"
Display lamp for "Feed pump A maintenance"
Display lamp for "Feed pump OFF ingredient A"
Display lamp for "Feed pump ON ingredient A"
Start pushbutton feed pump for ingredient A
Stop pushbutton feed pump for ingredient A
Activates the feed pump for ingredient B
Display lamp for "Feed pump B fault"
Display lamp for "Feed pump B maintenance"
Display lamp for "Feed pump OFF ingredient B"
Display lamp for "Feed pump ON ingredient B"
Start pushbutton feed pump for ingredient B
Stop pushbutton feed pump for ingredient B
Activates the feed valve for ingredient A
Activates the feed valve for ingredient B
Ingredient A flows
Ingredient B flows
Activates the inlet valve for ingredient A
Activates the inlet valve for ingredient B
FB for controlling pumps and agitator motor
Reset pushbutton for maintenance display (all
Sensor "Mixing tank above minimum level"
Sensor "Mixing tank not full"
Display lamp for "Mixing tank empty"
Display lamp for "Mixing tank full"
Display lamp for "Mixing tank below minimum l
Sensor "Mixing tank not empty"
FC for controlling valves
( FB ) Function Block -
FB1 . OB FB
. LAD/STL/FBD
FB
.
: .
(Start)
(Stop)
(Response)
(Response_Time) .
.
(Timer_NO)
(Fault)
(Timer_BCD)
(Start_Dsp)
(Stop_Dsp)
(Starts)
(Maint)
(Reset_Maint)
LAD
AND
OR .
. Start
.
.
A #Motor
L #Response_Time
SD #Timer_No
AN #Motor
R #Timer_No
L #Timer_No
T #Timer_bin
LC #Timer_No
T #Timer_BCD
A #Timer_No
AN #Response
S #Fault
R #Motor
A #Motor
FP #Start_Edge
JCN lab1
L #Starts
+1
T #Starts
lab1: NOP 0
A #Reset_Maint
A #Maint
JCN END
L0
T #Starts
END: NOP 0
DB -
. DB1 ,DB2 , DB3 DB
FB DB . Instance FB1
.
FC -
. ( ) ( ) FC
: FC
. LAD FC1
Network 1 : Open/Close and Latching
OB1 -
: OB1
. OB1
OB1 .
. Enable_motor .
LAD/STL/FBD . STL
A
L
SD
AN
R
A
=
Q
4.4
S5T#1S
T 13
Q
4.4
T 13
T 13
#Enable_Valve
AN I
0.2
AN Q
4.4
= #Close_Valve_Fulfilled
CALL FC 1
Open
:=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Feed_Valve_A_Open
Dsp_Closed:=#Feed_Valve_A_Closed
Valve :=Q4.1
AN I
0.2
AN Q
4.4
= #Close_Valve_Fulfilled
CALL FC 1
Open
:=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Feed_Valve_A_Open
Dsp_Closed:=#Feed_Valve_A_Closed
Valve :=Q4.1
A "EMER_STOP_off"
A "Tank_below_max"
AN "Drain"
= #Enable_Motor
AN "Flow_A"
AN "Feed_pump_A"
= #Close_Valve_Fulfilled
CALL "Valve_block"
Open :=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Feed_Valve_A_Open
Dsp_Closed:=#Feed_Valve_A_Closed
Valve :="Feed_Valve_A"
A I
1.6
A I
1.3
AN Q
9.5
= #Enable_Motor
A "EMER_STOP_off"
A "Tank_below_max"
AN "Drain"
= "Enable_Motor
A I
0.3
A #Enable_Motor
= #Start_Fulfilled
A(
O I
0.4
ON #Enable_Motor
)
= #Stop_Fulfilled
CALL FB 1 , DB2
Start
:=#Start_Fulfilled
Stop
:=#Stop_Fulfilled
Response :=I0.5
Reset_Maint :=I1.7
Timer_No :=T14
Response_Time:=S5T#7S
Fault
:=Q5.5
Start_Dsp :=Q5.2
Stop_Dsp :=Q5.3
Maint
:=Q5.6
Motor
:=Q5.4
A Q
5.4
L S5T#1S
SD T 15
AN Q
5.4
R T 15
A T 15
= #Enable_Valve
A "Feed_pump_B"
L S5T#1S
SD T 15
AN "Feed_pump_B"
R T 15
A T 15
= #Enable_Valve
AN I
0.5
AN Q
5.4
= #Close_Valve_Fulfilled
CALL FC 1
Open
:=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Inlet_Valve_B_Open
Dsp_Closed:=#Inlet_Valve_B_Closed
Valve :=Q5.0
AN "Flow_B"
AN "Feed_pump_B"
= #Close_Valve_Fulfilled
CALL "Valve_block"
Open :=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Inlet_Valve_B_Open
Dsp_Closed:=#Inlet_Valve_B_Closed
Valve :="Inlet_Valve_B"
AN I
0.5
AN Q
5.4
= #Close_Valve_Fulfilled
CALL FC 1
Open
:=#Enable_Valve
Close :=#Close_Valve_Fulfilled
Dsp_Open :=#Feed_Valve_B_Open
Dsp_Closed:=#Feed_Valve_B_Closed
Valve :=Q5.1
A I
1.6
A I
1.4
AN Q
9.5
= #Enable_Motor
A I
1.1
A #Enable_Motor
= #Start_Fulfilled
A(
O I
1.2
ON #Enable_Motor
)
= #Stop_Fulfilled
CALL FB 1 , DB3
Start
:=#Start_Fulfilled
Stop
:=#Stop_Fulfilled
Response :=I1.0
Reset_Maint :=I1.7
Timer_No :=T16
Response_Time:=S5T#10S
Fault
:=Q8.3
Start_Dsp :=Q8.1
Stop_Dsp :=Q8.2
Maint
:=Q8.4
Motor
:=Q8.0
A I
1.6
A I
1.5
AN Q
8.0
= #Enable_Valve
A I
0.6
A #Enable_Valve
= #Open_Drain
A(
O I
0.7
ON #Enable_Valve
)
= #Close_Drain
CALL FC 1
Open
:=#Open_Drain
Close :=#Close_Drain
Dsp_Open :=Q9.6
Dsp_Closed:=Q9.7
Valve :=Q9.5
AN
=
AN
=
AN
=
I
Q
I
Q
I
Q
1.3
9.0
1.4
9.1
1.5
9.2
Upload
PLC Download -
On-Line -
Hwconfig
PLC On-Line -
LAD/STL/FBD
PLC On-Line -
PLC
Upload
. Download PLC
Upload PLC
. PLC Download .
. On-Line
PLC LAD/STL/FBD Hwconfig Simatic Manger
: . Upload Download
:
. PLC LAD/STL/FBD
. PLC Hwconfig
. Toolbars
Upload
Download
Download
: PLC Download
Load Memory x
. Work Memory
. VAT UDT x
PLC x
.
. x
. Overwrite Yes
. . RUN PLC x
. RUN-P STOP PLC
LAD/STL/FBD x
Simatic Manager Blocks . PLC
.
PLC . x
. SF Stop PLC .
Blocks Simatic Manager PLC x
. .
Simatic Manager x
.
. Step7 x
. PLC .
.
.
Station Upload OK PLC
. SimatiC Manager
PLC On-Line
PLC Upload x
. Archive .
. Upload . UDT VAT x
. Temp x
Simatic Manager PLC On-Line -
.
. PLC MPI x
.
x
. PLC
. PLC . Delete x
Off-Line Simatic Manager x
. PLC Paste
. View > On line Simatic Manager
Update .
. F5 View
PLC On-Line
: Hwconfig On-Line
Meaning
Symbol
STARTUP
STOP
RUN
HOLD
PLC On-Line
CPU
CPU
CPU
PII Load Memory CPU
General
Diagnostic Buffer
Memory
Scan Cycle Time
Time System
Performance Data
...
CPU
Communication
.
Istack CPU
Bstack
Stacks
PLC On-Line
On-Line
PLC PLC .
Stop RUN . On-Line .
.
FBD LAD
.
PLC On-Line
( ). On line
. Online
1
IEC1131
IEC1131
Scope
Normative references
Definitions
Functional characteristics
Basic functional structure of a programmable controller system
Characteristics of the CPU function
Characteristics of the interface function to sensors and actuators
Characteristics of the communication function
Characteristics of the human-machine interface (HMI) function
Characteristics of the programming, debugging, monitoring, testing and
documentation functions
Characteristics of the power supply functions
Availability and reliability
General
Scope
Object of the Standard
Object of This Part
Compliance With This Standard
Type Tests
Normative References
Definitions
Analog Input
Analog Output
Accessible
Basic PLC (-system)
Battery
Clearance
Coating, Protective
Comparative Tracking index (CTI)
Creepage Distance
Current Sinking
Current Sourcing
Digital Input, Type 1
Digital Input, Type 2
Digital Input, Type 3
Digital Output
Earth
2.17
2.18
2.19
2.20
2.21
2.22
2.23
2.24
2.25
2.26
2.27
2.28
2.29
2.30
2.31
2.32
2.33
2.34
2.35
2.36
2.37
2.38
2.39
2.40
2.41
2.42
2.43
2.44
2.45
2.46
2.47
2.48
2.49
2.50
2.51
2.52
2.53
2.54
2.55
2.56
2.57
2.58
2.59
3
3.1
3.2
3.3
3.4
3.5
4
4.1
4.2
4.3
4.4
4.5
4.6
IEC1131
IEC1131
4.7
4.8
4.9
4.10
4.11
4.12
4.13
5
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
6
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
7
7.1
7.2
7.3
7.4
7.5
8
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
9
IEC1131
10
10.1
10.2
10.3
10.4
10.5
10.6
10.7
10.8
10.9
10.10
10.11
10.12
10.13
10.14
10.15
10.16
10.17
10.18
11
11.1
11.2
11.3
12
12.1
12.2
12.3
13
13.1
13.2
Annex
Annex
Annex
C.1
C.2
Annex
Annex
Annex
A
B
C
D
E
F
Safety Requirements
Protection Against Electrical Shock
Protection Against the Spread of Fire
Limited Power Circuits
Clearance and Creepage Distances Requirements
Flame Retardant Requirements for Non-Metallic Materials
Temperature Limits
Enclosures
Field Wiring Terminals Constructional Requirements
Provisions for Protective Earthing
Wiring
Switching Devices
Components
Battery Requirements
Maximum Voltage and Minimum Voltage
Markings and Identification
Requirements for Safety Type Tests and Verifications
Requirements for Safety Routine Tests and Verifications
Requirements for Information on Safety
Safety Type Tests and Verifications
Safety Related Mechanical Tests and Verifications
Safety Related Electrical Tests
Single Fault Condition Test General
Safety Routine Tests
Dielectric Withstand Test
Dielectric Withstand Verification Test
Protective Earthing Test
Safety Information to be Provided by the Manufacturer
Information on Evaluation of Enclosures for Open Equipment (power dissipation)
Information on Mechanical Terminal Connection
(Informative) Illustration of PLC-system Hardware Definitions
(Informative) Digital Input Standard Operating Range Equations
(Normative) Test Tools
Jointed Test Finger
Test Pins
(Informative) Zone C EMC Immunity Levels
(Informative) Overvoltage Example
(Informative) Bibliography
1.
1.1
1.2
1.3
1.4
1.5
2.
2.1
General
Scope
Normative references
Definitions
Overview and general requirements
Compliance
Common elements
Use of printed characters
IEC1131
2.2
2.3
2.4
2.5
2.6
2.7
3.
3.1
3.2
3.3
4.
4.1
4.2
4.3
ANNEX
A.1
A.2
ANNEX
B.0
B.1
B.2
B.3
ANNEX
ANNEX
ANNEX
ANNEX
F.1
F.2
F.3
F.4
F.5
F.6
F.7
F.8
F.9
F.10
F.11
ANNEX
ANNEX
C
D
E
F
G
H
IEC 61131- 4
User Guidelines
1
1.1
1.2
1.3
2
2.1
2.2
General
Scope
References
Use of this report
Definitions
Application program (user program)
Automated system
2.3
2.4
2.5
3
3.1
3.2
3.3
3.4
3.5
3.6
3.7
4
4.1
4.2
4.3
4.4
4.5
4.6
4.7
5
5.1
5.2
5.3
5.4
5.5
6
6.1
6.2
6.3
6.4
6.5
6.6
6.7
7.
7.1
7.2
7.3
7.4
7.5
8
8.1
8.2
8.3
8.4
9
9.1
9.2
9.3
9.4
Annex A
A.1
A.2
A.3
A.4
A.5
A.6
IEC1131
PLC-system
Programmable controller (PLC)
Programmable controller system (PLC-system)
Key elements of IEC 61131-1, Part 1: General information
PLC hardware model
Basic functional structure of a PLC system
CPU function
Programming languages
Availability and reliability
Re-start of PLC operating system
Documents supplied to the user
Key elements of IEC 61131-2: Part 2 - Equipment requirements and testing
Scope of Part 2
Definitions
Functional requirements
Electromagnetic compatibility (EMC) requirements
Safety requirements for PLC equipment
Information to be provided by the manufacturer
Compliance with IEC 61131-2 standard
Key elements of IEC61131-3: Part 3 - Programming Languages
Technical contents of Part 3
Common Elements
Programming languages
Applications program development
Implementation
Key Elements of IEC61131-5, Part 5 - Communication
Scope of Part 5
Technical contents of IEC61131-5 and the PLC model
Communication Model
PLC communication services
Application functions
Communication function blocks
Compliance
Key elements of IEC61131-7, Part 7 - Fuzzy Logic programming
General outline of Part 7
Integration of fuzzy control application into the programmable controllers
Fuzzy Control Language (FCL)
Exchange of fuzzy control programs
Compliance
General rules for installation
Environmental conditions
Field wiring
Electromagnetic compatibility
User system markings
PLC in Functional safety applications
Using a PLC in a safety-related application
Safety-related system Safety requirements
PLC requirements in a safety-related system
Integration of PLC into safety-related system
User checklists
Equipment data
General information checklist
Equipment requirements checklist
Checklist on programming languages
Checklist on communication
Checklist on Fuzzy control language
IEC1131
A.7
A.8
Annex
C1
C2
C2.1
C2.2
C2.3
C2.4
C3
C3.1
C3.2
C3.3
C4
C5
C5.1
C5.2
C5.3
Annex
Annex
Annex
Annex
Annex
C
D
E
F
G
Checklist on installation
Checklist on safety-related application
Comparism of EN and IEC61131
Advance Planning
Variable Naming Conventions / Methodologies
Naming Methodologies
Use of Upper & Lower Case
Consistent Project Prefixes, Suffixes and Acronyms
Sequential Function Chart (SFC) step naming
Structure / Organization
Program Structure by area / process flow
Structured Variables (Data Types) for multiple devices
Data Arrays for data storage & Manipulation
Use of the Appropriate Language
DFB requirements
Device Control
Frequently used Functions
Special Functions
Example of PLC software implementation
Example of PLC communications implementation
Example of PLC fuzzy control language implementation
Example of a PLC system in safety-related application
Reference standards
Scope
Normative references
Definitions
Symbols and abbreviations
Models
PC Network communication model
PC functional model
PC hardware model
Software model
PC communication services
PC subsystems and their status
Application specific functions
PC communication function blocks
Overview of the communication function blocks
Semantic of communication FB parameters
Device verification
Polled data acquisition
Programmed data acquisition
Parametric control
Interlocked control
Programmed alarm report
Connection management
Example for the use of communication function blocks
Compliance and implementer specific features and parameters
Compliance
Implementation specific features and parameters
IEC1131
Annex A
A.1
A.2
A.3
A.4
A.5
Annex B
B.1
B.2
Annex C
Index
(informative)
General
Scope
Normative references
Overview
Introduction to IEC 61131-3
General considerations
Overcoming historical limitations
Basic features in IEC 61131-3
New features in the second edition of IEC 61131-3
Software engineering considerations
Application guidelines
Use of data types
Data passing
Use of function blocks
Differences between function block instances and functions
Use of indirectly referenced function block instances
Recursion within programmable controller programming languages
Single and multiple invocation
Language specific features
Use of SFC elements
Scheduling, concurrency, and synchronization mechanisms
Communication facilities in ISO/IEC 9506/5 and IEC 61131-5
IEC1131
3.12
4.
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5.
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.8.1
5.8.2
5.8.3
5.8.4
5.9
5.10
5.11
Annex A
A.1
A.2
A .3
A.3.1
A.3.2
A.3.3
A.3.4
A.3.5
A.3.6
A.3.7
A.3.8
A.3.9
A.3.10
A.3.11
A.3.12
A.3.13
A.3.14
A.3.15
A.3.16
A.3.17
ANNEX B
ANNEX C
2
ZM Z my { {Z{Z
Digitized for Analog Input and Output Values
Resolution
. Resolution
Resolution in Bits (+ Sign)
Units
Analog Value
Low-Order Byte
1xxxxxxx
Decimal
128
Hex
80
High-Order Byte
VZ 0 0 0 0 0 0 0
64
40
VZ 0 0 0 0 0 0 0
01xxxxxx
10
32
20
VZ 0 0 0 0 0 0 0
001xxxxx
11
16
10
VZ 0 0 0 0 0 0 0
0001xxxx
12
VZ 0 0 0 0 0 0 0
00001xxx
13
VZ 0 0 0 0 0 0 0
000001xx
14
VZ 0 0 0 0 0 0 0
0000001x
15
VZ 0 0 0 0 0 0 0
00000001
. X ( 1 0 ) VZ
:
. Resolution x
Resolution x
.
Resolution x
. .
.
-
Voltage Ranges
Measuring
Range
80 mV
> 94.071
94.071
:
80.003
80.000
60.000
:
60.000
80.000
80.003
:
94.74
94.074
187.50
250.00
250.01
:
293.98
293.98
375.00
500.00
500.02
:
587.96
587.96
0.750
1.000
1.00004
:
1.175
1.175
1.875
2.500
2.5001
:
2.93398
2.93398
20736
27648
27649
:
32512
32768
Range
Overflow
Overrange
Nominal
range
AF00
9400
H
H
H
93FF
Underrange
H
8000
H
Underflow
8100
Voltage and Current Measuring Ranges
Measuring
Range
5V
> 5.8794
5.8794
:
5.0002
5.00
3.75
:
Measuring
Range
10 V 10 mA
> 11.7589
11.7589
:
10.0004
10.00
7.50
:
Measuring
Range
3.2 mA
> 3.7628
3.7628
:
3.2001
3.200
2.400
:
Measuring
Range
20 mA
> 23.515
23.515
:
20.0007
20.000
14.998
:
32767
32511
:
27649
27648
20736
:
7FFFH
3.75
5.00
5.0002
:
5.8796
5.8796
7.50
10.00
10.0004
:
11.759
11.759
2.400
3.200
3.2001
:
3.7629
3.7629
14.998
20.000
20.0007
:
23.516
23.516
20736
27648
27649
:
32512
32768
AF00H
Units
Decimal
Range
Hex
7EFFH
:
6C01H
Overflow
Overrange
6C00H
5100H
:
Nominal range
9400H
93FFH
:
8100H
8000H
Underrange
Underflow
Measuring
Range
0 20 mA
> 23.515
23.515
:
20.0007
20.000
14.998
Measuring
Range
4 to 20 mA
> 22.810
22.810
:
20.0005
20.000
16.000
Decimal
32767
32511
:
27649
27648
20736
1.000
0.9999
:
0.2963
< 0.2963
0.000
-0.0007
:
3.5185
3.5185
4.000
3.9995
:
1.1852
< 1.1852
0
1
:
4864
32768
0H
Units
Hex
7FFFH
7EFFH
:
6C01H
Range
Overflow
Overrange
6C00H
5100H
Nominal range
FFFFH
:
ED00H
8000H
Underrange
Underflow
Resistance-Type Sensors
Measuring
Range
150 :
> 176.383
176.383
:
150.005
150.000
112.500
Measuring
Range
300 :
> 352.767
352.767
:
300.011
300.000
225.000
Measuring
Range
600 :
> 705.534
705.534
:
600.022
600.000
450.000
32767
32511
:
27649
27648
20736
7FFFH
0
1
:
4864
32768
0H
0.000
0.000
0.000
(negative values physically not possible)
Units
Range
Decimal
Hex
Overflow
7EFFH
:
Overrange
6C01H
6C00H
5100H
Nominal range
FFFFH
:
Underrange
ED00H
8000H
Underflow
Units
Decimal
32767
10000
:
8501
8500
:
2000
2001
:
2430
32768
Range
Hex
7FFFH
Overflow
2710H
:
Overrange
2135H
2134H
:
Nominal range
F830H
F82FH
:
Underrange
F682H
8000H
Underflow
Units
Decimal
Hex
32767
15500
:
13001
13000
:
12000
12001
:
14500
32768
7FFFH
3C8CH
:
32C9H
Range
Overflow
Overrange
32C8H
:
D120H
Nominal range
D11FH
:
C75CH
8000H
Underrange
Underflow
Standard Temperature Range, Ni 100
Standard
Temperature
Range Ni 100
250 C
>295.0
295.0
:
250.1
250.0
:
60.0
60.1
:
105.0
105,0
Units
Decimal
Range
Hex
7FFFH
32767
2950
:
2501
2500
:
600
601
:
1050
32768
Overflow
B86H
:
Overrange
9C5H
9C4H
:
Nominal range
FDA8H
FDA7H
:
Underrange
FBE6H
8000H
Underflow
Units
Range
Decimal
Hex
7FFFH
32767
29500
:
25001
25000
:
6000
6001
:
10500
32768
733CH
:
61A9H
Overflow
Overrange
61A8H
:
E890H
Nominal range
E88FH
:
D6FCH
8000H
Underrange
Underflow
Thermocouple Type K
Temperature
Range in C
Type K
>1622
1622
:
1373
1372
:
270
270
Units
Decimal
32767
16220
:
13730
13720
:
2700
2700
Hex
7FFFH
3FSCH
:
35A2H
Range
Overflow
Overrange
3598H
:
F574H
<F574H
Nominal range
Underrange
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in
the negative range (e. g. incorrect thermocouple type), the analog input module signals
underflow below F0C5H and Outputs 8000H
Thermocouple Type N
Temperature
Range in C
Type N
>1550
1550
:
1301
1300
:
270
270
Units
Decimal
32767
15500
:
13010
13000
:
2700
2700
Hexadecimal
7C8CH
3C8CH
:
32D2H
Range
Overflow
Overrange
32C8H
:
F574H
<F574H
Nominal range
Underrange
Thermocouple Type J
Temperature
Range inC
Type J
>1450
1450
:
1201
1200
:
210.0
210
Units
Decimal
32767
14500
:
12010
12000
:
2100
2100
Hexadecimal
7FFFH
38A4H
:
2EEAH
Range
Overflow
Overrange
2EE0H
:
F7CCH
<F7CCH
Nominal range
Underrange
Thermocouple Type E
Temperature
Range inC
Type E
>1201
1200
:
1001
1000
:
270
271
Units
Decimal
32767
12000
:
10010
10000
:
2700
2700
Hexadecimal
7FFFH
2EE0H
:
271AH
Range
Overflow
Overrange
2710H
:
F574H
<F574H
Nominal range
Underrange
Thermocouple Type L
Temperature
Range inC
Type L
Decimal
>1150
1150
:
901
900
:
200
200
32767
11500
:
9010
9000
:
2000
2000
Units
Range
Hexadecimal
7FFFH
2CECH
:
2332H
Overflow
Overrange
2328H
:
F830H
<F830H
Nominal range
Underrange
In the case of incorrect wiring (e. g. polarity reversal or open inputs) or of a sensor error in the
negative range (e. g. incorrect thermocouple type), the analog input module signals underflow
below F0C5H and Outputs 8000H
-
Voltage Output Ranges
Output
Range
0 to 10 V
0
11.7589
:
10.0004
10.0000
:
Output
Range
1 to 5 V
0
5.8794
:
5.0002
5.0000
:
Output
Range
10 V
0
11.7589
:
10.0004
10.0000
:
1.0000
Units
Decimal
Hex
>32511
32511
:
27649
27648
:
>7EFFH
0
:
0H
6912
6913
:
E500H
27648
27649
:
32512
32512
9400H
10.0000
10.0004
:
11.7589
0
:0.9999
0
7EFFH
:
6C01H
Range
Overflow
Overrange
6C00H
:
Nomial range
E4FFH
:
93FFH
:
8100H
<8100H
Underrange
Underflow
Output
Range
4 to 20 mA
0
22.81
:
20.005
20.000
:
Output
Range
20 mA
0
23.515
:
20.0007
20.000
4.000
>32511
32511
:
27649
27648
:
>7EFFH
0
:
0H
6912
6913
:
E500H
27648
27649
:
32512
32512
9400H
20.000
0
3.9995
0
0
Units
Decimal
Hex
:
23.515
0
7EFFH
:
6C01H
Range
Overflow
Overrange
6C00H
:
Nominal range
E4FFH
:
93FFH
:
8100H
<8100H
Underrange
Underflow
3
STL
S7-400 S7-300
STL
English
Mnemonics
+
=
)
+AR1
+AR2
+D
-D
*D
/D
?D
+I
-I
*I
/I
?I
+R
-R
*R
/R
?R
A
A(
ABS
ACOS
AD
AN
AN(
ASIN
ATAN
AW
BE
BEC
BEU
BLD
BTD
BTI
CAD
CALL
CALL
Program Elements
Catalog
Integer math Instruction
Description
Assign
Nesting Closed
Accumulator
Accumulator
Compare Double Integer (32-Bit) ==, <>, >, <, >=, <=
Compare
Compare
Compare
Compare Floating-Point Number (32-Bit) ==, <>, >, <, >=, <=
And
And Not
Program control
Block End
Program control
Program control
Program control
Convert
Convert
Convert
Program control
Block Call
Program control
STL
English
Mnemonics
CALL
CAR
CAW
CC
CD
CDB
CLR
COS
CU
DEC
DTB
DTR
ENT
EXP
FN
FP
FR
FR
INC
INVD
INVI
ITB
ITD
JBI
JC
JCB
JCN
JL
JM
JMZ
JN
JNB
JNBI
JO
JOS
JP
JPZ
JU
JUO
JZ
L
L DBLG
L DBNO
Program Elements
Catalog
Description
Program control
Load/Transfer
Convert
Program control
Conditional Call
Counters
Counter Down
Convert
Counters
Counter Up
Accumulator
Convert
Convert
Accumulator
Edge Negative
Edge Positive
Counters
Timers
Accumulator
Convert
Convert
Convert
Convert
Jumps
Jump if BR = 1
Jumps
Jump if RLO = 1
Jumps
Jumps
Jump if RLO = 0
Jumps
Jumps
Jump if Minus
Jumps
Jumps
Jumps
Jumps
Jump if BR = 0
Jumps
Jump if OV = 1
Jumps
Jump if OS = 1
Jumps
Jump if Plus
Jumps
Jumps
Jump Unconditional
Jumps
Jump if Unordered
Jumps
Jump if Zero
Load/Transfer
Load
Load/Transfer
Load/Transfer
STL
English
Mnemonics
L DILG
L DINO
L STW
L
Program Elements
Catalog
Load/Transfer
Description
Load/Transfer
Load/Transfer
Timers
Counters
LAR1
LAR1 <D>
LAR1 AR2
LAR2
LAR2 <D>
LC
Load/Transfer
Load Current Timer Value into ACCU 1 as Integer (the current timer
value can be a number from 0 to 255, for example, L T 32)
Load Current Counter Value into ACCU 1 (the current counter value
can be a number from 0 to 255, for example, L C 15)
Load Address Register 1 from ACCU 1
Load/Transfer
Load/Transfer
Load/Transfer
Load/Transfer
Counters
LC
Timers
LEAVE
LN
LOOP
MCR(
)MCR
MCRA
MCRD
MOD
NEGD
NEGI
NEGR
NOP 0
NOP 1
NOT
O
O(
OD
ON
ON(
OPN
OW
POP
POP
POP
PUSH
R
R
Accumulator
Load Current Counter Value into ACCU 1 as BCD (the current timer
value can be a number from 0 to 255, for example, LC C 15)
Load Current Timer Value into ACCU 1 as BCD (the current counter
alue can be a number from 0 to 255, for example, LC T 32)
Leave ACCU Stack
Timers
Jumps
Loop
Program control
Program control
End MCR
Program control
Program control
Convert
Convert
Convert
Accumulator
Null Instruction
Accumulator
Null Instruction
Negate RLO
Or
Or Not
DB call
OR Word (16-Bit)
Accumulator
Accumulator
Accumulator
Accumulator
Reset
Counters
STL
English
Mnemonics
Program Elements
Catalog
Description
RLD
RLDA
RND
RNDRND+
RRD
RRDA
S
S
Shift/Rotate
Shift/Rotate
Convert
Round
Convert
SAVE
SD
SE
SET
SF
SIN
SLD
SLW
SP
SQR
SQRT
SRD
SRW
SS
SSD
SSI
T
T
TAK
TAN
TAR1
TAR1
TAR1
TAR2
TAR2
TRUNC
UC
X
X(
XN
XN(
XOD
XOW
Convert
Shift/Rotate
Shift/Rotate
Set
Counters
Set Counter Preset Value (the current counter can be a number from
0 to 255, for example, S C 15)
Save RLO in BR Register
Timers
On-Delay Timer
Timers
Set
Timers
Off-Delay Timer
Shift/Rotate
Shift/Rotate
Timers
Pulse Timer
Shift/Rotate
Shift/Rotate
Timers
Shift/Rotate
Shift/Rotate
Load/Transfer
Transfer
Load/Transfer
Accumulator
Load/Transfer
Load/Transfer
Load/Transfer
Load/Transfer
Load/Transfer
Convert
Truncate
Program control
Unconditional Call
Exclusive Or
Exclusive Or Not
4
S7-400 Z Z cYf{ YmY Z
cYf{ YmY Z -1
Z SFC YmY Z -2
Z SFB YmY Z -3
S7-400
314
S7-400
Instr.
Address
ID
Description
I/Q
M
L
DBX
DIX
c [d]
c [AR1,m]
a.b
a.b
a.b
a.b
a.b
c [AR2,m]
O/ON
[AR1,m]
[AR2,m]
Parameter
I/Q
M
L
DBX
DIX
c [d]
c [AR1,m]
a.b
a.b
a.b
a.b
a.b
c [AR2,m]
X/XN
[AR1,m]
[AR2,m]
Parameter
I/Q
M
L
DBX
DIX
c [d]
c [AR1,m]
c [AR2,m]
[AR1,m]
[AR2,m]
Parameter
a.b
a.b
a.b
a.b
a.b
AND/AND NOT
Input/output
Bit memory
Local data bit
Data bit
Instance data bit
Memory-indirect, area-internal
Register-ind., area-internal
(AR1)
Register-ind., area-internal
(AR2)
Area-crossing (AR1)
Area-crossing (AR2)
Via parameter
OR/OR NOT
Input/output
Bit memory
Local data bit
Data bit
Instance data bit
Memory-indirect, area-internal
Register-ind., area-internal
(AR1)
Register-ind., area-internal
(AR2)
Area-crossing (AR1)
Area-crossing (AR2)
Via parameter
Exclusive OR/
Exclusive OR NOT
Input/output
Bit memory
Local data bit
Data bit
Instance data bit
Memory-indirect, area-internal
Register-ind., area-internal
(AR1)
Register-ind., area-internal
(AR2)
Area-crossing (AR1)
Area-crossing (AR2)
Via parameter
Length
in
Words
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
1*/2
1**/2
2
2
2
2
2
0.2/0.3
0.2/0.3
0.3
0.3
0.3
0.3+
0.3+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.08
0.08
0.08
0.08
0.08
0.08+
0.08+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.3+
0.1+
0.08+
0.1+
2
2
2
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
1*/2
1**/2
2
2
2
2
2
0.2/0.3
0.2/0.3
0.3
0.3
0.3
0.3+
0.3+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.08
0.08
0.08
0.08
0.08
0.08+
0.08+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.3+
0.1+
0.08+
0.1+
2
2
2
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
2
2
2
2
2
2
2
0.3
0.3
0.3
0.3
0.3
0.3+
0.3+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.08
0.08
0.08
0.08
0.08
0.08+
0.08+
0.1
0.1
0.1
0.1
0.1
0.1+
0.1+
0.3+
0.1+
0.08+
0.1+
2
2
2
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
0.1
0.1
0.08
0.1
AN(
0.1
0.1
0.08
0.1
O(
OR left parenthesis
0.1
0.1
0.08
0.1
ON(
0.1
0.1
0.08
0.1
X(
0.1
0.1
0.08
0.1
XN(
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
+ Plus time required for loading the address of the instruction (see page 20)
* With direct instruction addressing; Address area 0 to 127
** With direct instruction addressing; Address area 0 to 255
S7-400
Instr.
Address
ID
Description
Length
in
Words
CPU 412
CPU 414
Execution Time in s
CPU 416
CPU 417
0.1
0.1
0.08
0.1
1 /2
2
1)
0,3
0.3+
0.1
0.1+
0.08
0.08+
0.1
0.1+
1 /2
2
1)
0,3
0.3+
0.1
0.1+
0.08
0.08+
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
1 /2
2
1)
1 /2
2
1)
0.3
0.3+
0.3
0.3+
0.1
0.1+
0.1
0.1+
0.08
0.08+
0.08
0.08+
0.1
0.1+
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
2
2
2
2
0.3
0.3+
0.3
0.3+
0.1
0.1+
0.1
0.1+
0.08
0.08+
0.08
0.08+
0.1
0.1+
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
O/ON
X/XN
T
T
f
[e]
C
C
f
[e]
Timer
para.
Counter
para.
T
T
C
C
f
[e]
f
[e]
Timer
para.
Counter
para.
T
T
C
C
Timer
para.
Counter
para.
AND/AND NOT
Timer
Timer, memory-indirect
addressing
Counter
Counter, memory-indirect
addressing
OR/OR NOT
Timer
Timer, memory-indirect addr.
Counter
Counter, memory-indirect
addressing
Timer/counter (addressing via
parameter)
f
[e]
f
[e]
EXCLUSIVE OR/EXCLUSIVE
OR NOT
Timer
Timer, memory-indirect addr.
Counter
Counter, mem.-indirect addr.
EXCLUSIVE OR
timer/counter (addressing
via parameter)
AW
W#16#p
OW
OW
W#16#p
XOW
XOW
W#16#p
AD
AD
DW#16#p
OD
OD
DW#16#p
XOD
XOD
+
1)
DW#16#p
AND ACCU2-L
0.1
0.1
0.08
0.1
0.2
0.1
0.08
0.1
OR ACCU2-L
0.1
0.1
0.08
0.1
OR 16-bit constant
0.2
0.1
0.08
0.1
EXCLUSIVE OR ACCU2-L
0.1
0.1
0.08
0.1
EXCLUSIVE OR 16-bit
constant
AND ACCU2
0.2
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.3
0.15
0.12
0.15
OR ACCU2
0.1
0.1
0.08
0.1
OR 32-bit constant
0.3
0.15
0.12
0.15
EXCLUSIVE OR ACCU2
0.1
0.1
0.08
0.1
EXCLUSIVE OR 32-bit
constant
0.3
0.15
0.12
0.15
Plus time required for loading the address of the instruction (see page 20)
With direct instruction addressing ;Address area 0 to 255
S7-400
Instr.
Address
ID
Description
Length
in
Words
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
AND/AND NOT
OR/OR-NOT
EXCLUSIVE OR/
EXCLUSIVE-OR-NOT
Result=0
(A1=0 and A0=0)
==0
0.1
0.1
0.08
0.1
>0
Result>0
(CC1=1 and CC0=0)
0.1
0.1
0.08
0.1
<0
Result<0
(CC1=0 and CC0=1)
0.1
0.1
0.08
0.1
<>0
Result<>0
((CC1=0 and CC0=1) or
(CC1=1 and
CC0=0))
Result>=0
((CC1=1 and CC0=0) or
(CC1=0 and
CC0=0))
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
>=0
<=0
Result<=0
((CC1=0 and CC0=1) or
(CC1=0 and
CC0=0))
0.1
0.1
0.08
0.1
UO
0.1
0.1
0.08
0.1
OS
AND OS=1
0.1
0.1
0.08
0.1
BR
AND BR=1
0.1
0.1
0.08
0.1
OV
AND OV=1
0.1
0.1
0.08
0.1
2
2
2
2
0.4
0.4
0.4
0.4
0.2
0.2
0.2
0.2
0.16
0.16
0.16
0.16
0.2
0.2
0.2
0.2
Edge-Triggered Instructions
FP/FN
I/Q
M
L
DBX
a.b
a.b
1)
a.b
a.b
DIX
a.b
2
0.4
0.2
0.16
0.2
c [d]
2
0.4+
0.2+
0.16+
0.2+
c [AR1,m]
2
0.4+
0.2+
0.16+
0.2+
c [AR2,m]
2
0.4+
0.2+
0.16+
0.2+
[AR1,m]
2
0.4+
0.2+
0.16+
0.2+
[AR2,m]
2
0.4+
0.2+
0.16+
0.2+
Parameter
2
0.4+
0.2+
0.16+
0.2+
Plus time required for loading the address of the instruction (see page 20)
1) Unnecessary if the bit being monitored is in the process image (local data of a block are only valid while the block is running).
I/Q
M
L
DBX
DIX
c [d]
c [AR1,m]
c [AR2,m]
[AR1,m]
[AR2,m]
Parameter
a.b
a.b
a.b
a.b
a.b
1 /2
2)
1 /2
2
2
2
2
1)
0.3/0.4
0.3/0.4
0.4
0.4
0.4
0.4+
0.2
0.2
0.2
0.2
0.2
0.2+
0.16
0.16
0.16
0.16
0.16
0.16+
0.2
0.2
0.2
0.2
0.2
0.2+
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
2
2
2
0.4+
0.4+
0.4+
0.2+
0.2+
0.2+
0.16+
0.16+
0.16+
0.2+
0.2+
0.2+
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
Assign RLO
1)
To input/output
1 /2
2)
To bit memory
1 /2
To local data bit
2
To data bit
2
To instance data bit
2
Memory-indirect, area2
internal
c [AR1,m]
Register-indirect, area2
internal (AR1)
c [AR2,m]
Register-indirect, area2
internal (AR2)
[AR1,m]
Area-crossing (AR1)
2
[AR2,m]
Area-crossing (AR2)
2
Parameter
Via parameter
2
Plus time required for loading the address of the instruction (see page 20)
With direct instruction addressing; Address area 0 to 127
With direct instruction addressing; Address area 0 to 255
I/Q
M
L
DBX
DIX
c [d]
a.b
a.b
a.b
a.b
a.b
Set RLO to 0
Set RLO to 1
Negate RLO
Save RLO to the BR bit
Timer Instructions
SP
Tf
T [e]
SE
Tf
1)
Timer para.
T [e]
2
1)
Timer para.
SD
Tf
T [e]
2
Start timer as ON delay on
edge
change from 0 to 1
Timer para.
SS
Tf
T [e]
Tf
T [e]
Timer para.
FR
Tf
T [e]
Timer para.
Tf
T [e]
1)
1 /2
2
Start timer as retentive ON
delay
on edge change from 0 to
1
Timer para.
SF
1
1
1
1
1)
1 /2
2
Start timer as OFF delay on
edge
change from 0 to 1
1)
1 /2
2
1)
Timer para.
2
Plus time required for loading the address of the instruction (see page 20)
With direct instruction addressing Timer No.: 0 to 255
0.3/0.4
0.3/0.4
0.4
0.4
0.4
0.4+
0.2
0.2
0.2
0.2
0.2
0.2+
0.16
0.16
0.16
0.16
0.16
0.16+
0.2
0.2
0.2
0.2
0.2
0.2+
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
0.4+
0.4+
0.4+
0.2+
0.2+
0.2+
0.16+
0.16+
0.16+
0.2+
0.2+
0.2+
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.08
0.08
0.08
0.08
0.1
0.1
0.1
0.1
0.3/0.4
0.3+0.4+
0.2
0.2+
0.16
0.16+
0.2
0.2+
0.4+
0.2+
0.16+
0.2+
0.3/0.4
0.2
0.16
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
0.3/0.4
0.2
0.16
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
0.3/0.4
0.2
0.16
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
0.3/0.4
0.2
0.16
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
0.3/0.4
0.4+
0.2
0.2+
0.16
0.16+
0.2
0.2+
0.4+
0.3/0.4
0.4+
0.2+
0.2
0.2+
0.16+
0.16
0.16+
0.2+
0.2
0.2+
0.4+
0.2+
0.16+
0.2+
S7-400
Length
in
Words
Instr.
Address
ID
Description
Counter Instructions
S
CU
Cf
C [e]
Counter para.
Cf
C [e]
Counter para.
Cf
C [e]
Counter para.
CD
Cf
C [e]
Counter para.
FR
C [e]
Counter para.
Load Instructions
L
CPU 417
0)
0.3/0.4
0.4+
0.4+
0.3/0.4
0.4+
0.2
0.2+
0.2+
0.2
0.2+
0.16
0.16+
0.16+
0.16
0.16+
0.2
0.2+
0.2+
0.2
0.2+
2
0)
1 /2
0.4+
0.3/0.4
0.2+
0.2
0.16+
0.16
0.2+
0.2
0.4+
0.4+
0.2+
0.2+
0.16+
0.16+
0.2+
0.2+
1 /2
0.3/0.4
0.2
0.16
0.2
0.4+
0.4+
0.2+
0.2+
0.16+
0.16+
0.2+
0.2+
Increment counter by 1 on
edge
change from 0 to 1
Decrement counter by 1 on
edge
change from 0 to 1
0)
0.3/0.4
0.2
0.16
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
1 /2
1)
1 /2
2
3)
1 /2
2
2
2
2
0.2/0.3
0.2/0.3
0.3
0.2/0.3
0.3
0.3
0.3
0.3+
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1+
0.08
0.08
0.08
0.08
0.08
0.08
0.08
0.08+
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
2
2
2
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
1 /2
1)
1 /2
2
1)
0.2/0.3
0.2/0.3
0.3
0.1
0.1
0.1
0.08
0.08
0.08
0.1
0.1
0.1
3)
IW
QW
PIW
MW
LW
a
a
1 /2
2
0.2/0.3
0.3
0.1
0.1
0.08
0.08
0.1
0.1
DBW
DIW
a
a
Data word
Instance data word
... into ACCU1-L
2
2
0.3
0.3
0.1
0.1
0.08
0.08
0.1
0.1
Memory-indirect, areainternal
Register-indirect, areainternal (AR1)
Register-indirect, areainternal (AR2)
Area-crossing (AR1)
Area-crossing (AR2)
Via parameter
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
a
a
a
a
a
a
a
g [AR2,m]
B[AR1,m]
B[AR2,m]
Parameter
h [d]
h [AR1,m]
h [AR2,m]
W[AR1,m]
W[AR2,m]
Parameter
0)
1)
2)
3)
CPU 416
Load ...
Input byte
Output byte
2)
Peripheral input byte
Bit memory byte
Local data byte
Data byte
Instance data byte
Memory-indirect, areainternal
Register-indirect, areainternal (AR1)
Register-indirect, areainternal (AR2)
Area-crossing (AR1)
Area-crossing (AR2)
Via parameter
Load ...
Input word
Output word
2)
Peripheral input word
IB
QB
PIB
MB
LB
DBB
DIB
g [d]
g [AR1,m]
CPU 414
0)
Cf
Execution Time in s
CPU 412
1)
0.3+
0.1+
0.08+
0.1+
2
2
2
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
Plus time required for loading the address of the instruction (see page 20)
With direct instruction addressing Counter No.: 0 to 255
With indirect instruction addressing; Address area 0 to 127
The following peripheral acknowledgement time must be observed with CPU 414-4H and CPU 417-4H: solo 37 s, redundant 67 s
With direct instruction addressing; Address area 0 to 255
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
IDa
QD
PID
a
a
Load ...
1)
Input double word
1 /2
1)
Output double word
1 /2
Peripheral input double word 2
MD
LD
a
a
DBD
DID
a
a
i [d]
i [AR1,m]
i [AR2,m]
D[AR1,m]
D[AR2,m]
Parameter
k8
k16
k32
Parameter
2#n
B#16#p
W#16#p
DW#16#p
x
xx
xxx
xxxx
D# time
value
S5T# time value
TOD# time value
T# time value
C# count value
B# (b1, b2)
B# (b1, b2, b3,
b4)
P# bit
pointer
L# integer
Real number
+
1)
2)
3)
0.3/0.4
0.3/0.4
0.3/0.4
0.2
0.2
0.2
0.16
0.16
0.16
0.2
0.2
0.2
1 /2
2
0.3/0.4
0.4
0.2
0.2
0.16
0.16
0.2
0.2
2
2
0.4
0.4
0.2
0.2
0.16
0.16
0.2
0.2
0.4+
0.2+
0.16+
0.2+
0.4+
0.2+
0.16+
0.2+
2)
3)
0.4+
0.2+
0.16+
0.2+
2
2
2
0.4+
0.4+
0.4+
0.2+
0.2+
0.2+
0.16+
0.16+
0.16+
0.2+
0.2+
0.2+
2
2
3
2
0.2
0.2
0.3
0.2/0.3+
0.1
0.1
0.15
0.1+
0.08
0.08
0.12
0.08+
0.1
0.1
0.15
0.1+
0.2
0.1
0.08
0.1
0.3
0.15
0.12
0.15
0.1
0.1
0.08
0.1
0.2
0.1
0.08
0.1
0.3
0.15
0.12
0.15
2
2
3
3
3
0.2
0.2
0.3
0.3
0.3
0.1
0.1
0.15
0.15
0.15
0.08
0.08
0.12
0.12
0.12
0.1
0.1
0.15
0.15
0.15
0.2
0.1
0.08
0.1
3
2
3
2
0.3
0.2
0.3
0.2
0.15
0.1
0.15
0.1
0.12
0.08
0.12
0.08
0.15
0.1
0.15
0.1
0.2
0.1
0.08
0.1
0.3
0.15
0.12
0.15
0.3
0.15
0.12
0.15
0.3
0.3
0.15
0.15
0.12
0.12
0.15
0.15
Plus time required for loading the address of the instruction (see page 20)
With indirect instruction addressing; Address area 0 to 127
The following peripheral acknowledgement time must be observed with CPU 414-4H and CPU 417-4H: solo 37 s, redundant 67 s
With direct instruction addressing; Address area 0 to 255
S7-400
Length
in
Words
Instr.
Address
ID
Description
LC
1)
Tf
T (e)
1 /2
2
Timer para.
Cf
C (e)
Counter para.
Tf
T (e)
Timer para.
Cf
C (e)
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
0.2/0.3
0.3+
0.1
0.1+
0.08
0.08+
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.2/0.3
0.3+
0.1
0.1+
0.08
0.08+
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
1 /2
2
0.3
0.3+
0.3
0.3+
0.24
0.24+
0.3
0.3+
0.3+
0.3+
0.24+
0.3+
1 /2
2
0.3
0.3+
0.3
0.3+
0.24
0.24+
0.3
0.3+
0.3+
0.3+
0.24+
0.3+
1 /2
1)
1 /2
2
1)
0.2/0.3
0.2/0.3
0.3
0.1
0.1
0.1
0.08
0.08
0.08
0.1
0.1
0.1
3)
0.2/0.3
0.3
0.3
0.3
0.3+
0.1
0.1
0.1
0.1
0.1+
0.08
0.08
0.08
0.08
0.08+
0.1
0.1
0.1
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
1)
1 /2
2
1)
1)
Counter para.
Transfer Instructions
T
IB
QB
PQB
a
a
a
MB
LB
DBB
DIB
g [d]
a
a
a
a
Transfer contents of
ACCU1-LL to ...
input byte
output byte
2)
peripheral output byte
The following peripheral acknowledgement time must be observed with CPU 414-4H and CPU 417-4H: solo 29 s, redundant 58 s
0.2/0.3
0.2/0.3
0.3
0.2/0.3
0.3
0.3
0.3
0.3+
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1+
0.08
0.08
0.08
0.08
0.08
0.08
0.08
0.08+
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.1+
0.08+
0.1+
0.3+
0.3+
0.3+
0.1+
0.1+
0.1+
0.08+
0.08+
0.08+
0.1+
0.1+
0.1+
The following peripheral acknowledgement time must be observed with CPU 414-4H and CPU 417-4H: solo 32 s, redundant 61 s
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
ID
QD
PQD
a
a
a
Transfer contents of
ACCU1 to ...
1)
Input double word
1 /2
1)
Output double word
1 /2
2)
periph. output double word 2
MD
LD
a
a
DBD
DID
a
a
0.3/0.4
0.3/0.4
0.4
0.2
0.2
0.2
0.16
0.16
0.16
0.2
0.2
0.2
1 /2
2
0.3/0.4
0.4
0.2
0.2
0.16
0.16
0.2
0.2
2
2
0.4
0.4
0.2
0.2
0.16
0.16
0.2
0.2
3)
i [d]
Memory-indirect, area
2
0.4+
0.2+
0.16+
0.2+
internal
i [AR1,m]
Register-ind., area internal
2
0.4+
0.2+
0.16+
0.2+
(AR1)
i [AR2,m]
Register-ind., area internal
2
0.4+
0.2+
0.16+
0.2+
(AR2)
D[AR1,m]
Area-crossing (AR1)
2
0.4+
0.2+
0.16+
0.2+
D[AR2,m]
Area-crossing (AR2)
2
0.4+
0.2+
0.16+
0.2+
Parameter
Via parameter
2
0.4+
0.2+
0.16+
0.2+
Plus time required for loading the address of the instruction (see page 20)
With direct instruction addressing; Address area 0 to 127
The following peripheral acknowledgement time must be observed with CPU 414-4H and CPU 417-4H: solo 36s, redundant 65 s
3) With direct instruction addressing; Address area 0 to 255
LAR2
AR2
DBD
DID
m
LD
MD
DBD
DID
m
LD
MD
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
TAR1
AR2
DBD
DID
LD
MD
TAR2
DBD
DID
LD
MD
CAR
1
1
2
2
3
2
2
0.2
0.2
0.4
0.4
0.3
0.4
0.4
0.2
0.2
0.3
0.3
0.2
0.3
0.3
0.16
0.16
0.24
0.24
0.16
0.24
0.24
0.2
0.2
0.3
0.3
0.2
0.3
0.3
1
2
2
3
2
2
0.2
0.4
0.4
0.3
0.4
0.4
0.2
0.3
0.3
0.2
0.3
0.3
0.16
0.24
0.24
0.16
0.24
0.24
0.2
0.3
0.3
0.2
0.3
0.3
1
1
2
2
2
2
0.1
0.2
0.4
0.4
0.4
0.4
0.1
0.2
0.2
0.2
0.2
0.2
0.08
0.16
0.16
0.16
0.16
0.16
0.1
0.2
0.2
0.2
0.2
0.2
1
2
2
2
2
0.1
0.4
0.4
0.4
0.4
0.1
0.2
0.2
0.2
0.2
0.08
0.16
0.16
0.16
0.16
0.1
0.2
0.2
0.2
0.2
0.4
0.4
0.32
0.4
0.1
0.1
0.1
0.1
0.08
0.08
0.1
0.1
STW
STW
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
DBNO
DINO
DBLG
DILG
0.1
0.1
0.1
0.1
0.08
0.08
0.1
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.8
0.8
0.64
0.8
0.8
0.8
0.64
0.8
+D
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
1.3
1.3
1.04
1.3
1.3
1.3
1.04
1.3
1.3
1.3
1.04
1.3
[(ACCU2):(ACCU1)]
Add 2 real numbers (32 bits) 1
(ACCU1)=(ACCU2)+(ACCU1)
0.6
0.6
0.48
0.6
0.6
0.6
0.48
0.6
1.4
1.4
1.12
1.4
2.1
2.1
1.68
2.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
/I
/D
MOD
*R
/R
NEGR
ABS
72
40
37 - 39
40
SQR
1.4
1.4
1.12
1.4
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
LN
63
35
33
35
EXP
63
35
32 - 34
35
56
31
30
31
ASIN
117 - 133
65 - 74
62 - 70
65 - 74
COS
58
32
30
32
ACOS
122 - 139
68 - 77
65 - 72
68 - 77
TAN
58 - 63
32 - 35
30 - 33
32 - 35
ATAN
43 - 58
24 - 32
23 - 30
24 - 32
Adding Constants
+
i8
0.1
0.1
0.08
0.1
i16
0.2
0.1
0.08
0.1
i32
0.3
0.15
0.12
0.15
0.2
0.2
0.16
0.2
0.2
0.2
0.16
0.2
0.2
0.2
0.16
0.2
0.2
0.2
0.16
0.2
+AR1
m (0 to
4095)
+AR2
+AR2
m (0 to
4095)
ACCU2-L=ACCU1-L
0.1
0.1
0.08
0.1
<>I
ACCU2-L_ACCU1-L
0.1
0.1
0.08
0.1
<I
ACCU2-L<ACCU1-L
0.1
0.1
0.08
0.1
<=I
ACCU2-L<=ACCU1-L
0.1
0.1
0.08
0.1
>I
ACCU2-L>ACCU1-L
0.1
0.1
0.08
0.1
>=I
ACCU2-L>=ACCU1-L
0.1
0.1
0.08
0.1
S7-400
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
0.1
CPU 414
0.1
CPU 416
0.08
CPU 417
==D
ACCU2=ACCU1
0.1
<>D
ACCU2_ACCU1
0.1
0.1
0.08
0.1
<D
ACCU2<ACCU1
0.1
0.1
0.08
0.1
<=D
ACCU2<=ACCU1
0.1
0.1
0.08
0.1
>D
ACCU2>ACCU1
0.1
0.1
0.08
0.1
>=D
ACCU2>=ACCU1
0.1
0.1
0.08
0.1
==R
ACCU2=ACCU1
0.1
0.1
0.08
0.1
<>R
ACCU2_ACCU1
0.1
0.1
0.08
0.1
<R
ACCU2<ACCU1
0.1
0.1
0.08
0.1
<=R
ACCU2<=ACCU1
0.1
0.1
0.08
0.1
>R
ACCU2>ACCU1
0.1
0.1
0.08
0.1
>=R
ACCU2>=ACCU1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.08
0.1
RLDA
Shift Instructions
SLW
1)
SLW
0 ... 15
SLD
SLD
SRW
0 ... 32
1)
SRW
0 ... 15
SLD
SLD
SRW
0 ... 32
1)
SRW
0 ... 15
SRD
SRD
SSI
0 ... 32
1)
SSI
0 ... 15
SSD
1)
Rotate Instructions
RLD
RLD
RRD
RRD
RLDA
0 ... 32
0 ... 32
0.1
S7-400
Length
in
Words
Instr.
Address
ID
Description
0.1
Execution Time in s
CPU 412
0.1
CPU 414
0.08
CPU 416
CPU 417
0.1
RRDA
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
ENT
0.1
0.1
0.08
0.1
LEAVE
0.1
0.1
0.08
0.1
PUSH
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
1
1
0.1
0.1
0.1
0.1
0.08
0.08
0.1
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.3
0.3
0.24
0.3
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.2
0.2
0.16
0.2
0.4
0.4
0.32
0.4
CAD
TAK
POP
INC
DEC
k8
k8
k8
NOP
0
1
DTR
ITD
ITB
DTB
RND+
RND
RND-
TRUNC
0.4
0.4
0.32
0.4
0.4
0.4
0.32
0.4
0.4
0.4
0.32
0.4
S7-400
326
Length
in
Words
Instr.
Address
ID
Description
Execution Time in s
CPU 412
CPU 414
CPU 416
CPU 417
INVI
0.1
0.1
0.08
0.1
INVD
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
NEGI
NEGD
1)
CALL
FB q, DB q
CALL
SFB q,
DB q
CALL
FC q
Unconditional call of a
function,
with parameter transfer
CALL
SFC q
UC
FB q
FC q
FB [e]
FC [e]
Parameter
FB q
CC
OPN
1)
1 /2
1)
1 /2
2
2
2
1)
FC q
FB [e]
FC [e]
Parameter
DB
DI
DB
DI
Parameter
1 /2
q
q
[e]
[e]
8.2
3)
3.2
3)
2.56
3)
XX
8.2
3)
3.2
3)
2.56
3)
XX
4.6
3)
1.8
3)
1.44
3)
XX
4.6
3)
1.8
3)
1.44
3)
XX
2.1/2.2
2.1/2.2
2.2+
2.2+
2.2+
1.4
1.4
1.4+
1.4+
1.4+
2.3/2.4/0.4
4)
1.4/0.4
2.3/2.4/0.4
4)
2.4+/0.4
4)
2.4+/0.4
4)
2.4+/0.4
4)
1.12
1.12
1.12+
1.12+
1.12+
4)
1.12/0.32
1.4/0.4
4)
1.4+/0.4
4)
1.4+/0.4
4)
1.4+/0.4
4)
0.6/0.7
0.7
0.7+
0.7+
0.7+
2.8
2.8
2.2
1)
0.4
1.4
1.4
1.4+
1.4+
1.4+
4)
1.4/04
1.12/0.32
4)
1.12+/0.32
4)
1.12+/0.32
4)
1.12+/0.32
4)
1.4/0.4
4)
1.4+/0.4
4)
1.4+/0.4
4)
1.4+/0.4
0.3
0.3
0.3+
0.3+
0.3+
0.24
0.24
0.24+
0.24+
0.24+
0.3
0.3
0.3+
0.3+
0.3+
2.0
2.0
1.76
1)
0.32
1.60
1.60
2.2
1)
0.4
2.0
2.0
0.2
0.16
4)
Plus time required for loading the address of the instruction (see page 20)
With direct instruction (DB) addressing; Block No. 0 to 255
Depending on RLO, sets RLO = 1
Plus time required for supplying parameters
4) If call is not executed
End block
End block unconditionally
End block conditionally if
RLO = 1
1
1
3.0
1)
0.4
0.2
4)
S7-400
327
Length
in
Words
Instr.
Address
ID
Jump Instructions
JU
JC
JCN
JCB
LABEL
LABEL
LABEL
LABEL
JNB
LABEL
JBI
JNBI
JO
LABEL
LABEL
LABEL
JOS
LABEL
JUO
LABEL
JZ
LABEL
JP
LABEL
JM
LABEL
JN
LABEL
JMZ
LABEL
JPZ
LABEL
JL
LABEL
LOOP
Description
1)
Jump unconditionally
1 /2
1)
Jump if RLO = 1
1 /2
Jump if RLO = 0
2
Jump if RLO = 1.
2
Save the RLO in the BR bit
Jump if RLO = 0.
2
Save the RLO in the BR bit
Jump if BR = 1
2
Jump if BR = 0
2
1)
Jump on stored overflow
1 /2
(OV = 1)
Jump on stored overflow
2
(OS = 1)
Jump if unordered math
2
instruction (CC1=1 and
CC0=1)
1)
Jump if result = 0
1 /2
(CC1=0 and CC0=0)
1)
Jump if result > 0
1 /2
(CC1=1 and CC0=0)
1)
Jump if result < 0
1 /2
(CC1=0 and CC0=1)
Jump if result _ 0 (CC1=1 and 11)/2
CC0=0) or (CC1=0 and
CC0=1)
Jump if result _ 0 (CC1=0 and 2
CC0=1) or (CC1=0 and
CC0=0)
Jump if result _ 0 (CC1=1 and 2
CC0=0) or (CC1=0 and
CC0=0)
Jump distributor
2
LABEL
Execution Time in s
CPU 412
0.5/0.6
2)
0.5/0.6
2)
0.6/0.2
2)
0.6/0.2
0.6/0.2
CPU 414
0.5
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
CPU 416
0.4
2)
0.4/0.16
2)
0.4/0.16
2)
0.4/0.16
2)
0.4/0.16
2)
0.4/0.16
2)
0.4/0.16
2)
0.4/0.16
0.6/0.2
0.5/0.2
2)
2)
0.6/0.2
0.5/0.2
2)
2)
0.5/0.6/0.2 0.5/0.2
CPU 417
0.5
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.5/0.2
2)
0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.5/0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.5/0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.5/0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.5/0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.6/0.2
2)
0.5/0.2
2)
0.4/0.16
2)
0.5/0.2
2)
0.8
0.6/0.2
0.7
1)
0.5/0.2
0.56
1)
0.4/0.08
0.7
1)
0.5/0.2
2)
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
1
1
0.1
0.1
0.1
0.1
0.08
0.08
0.1
0.1
0.1
0.1
0.08
0.1
0.1
0.1
0.08
0.1
1)
S7-400
System Functions
SFC
NO.
SFC
Name
SET_CLK
READ_CLK
SET_RTM
CTRL_RTM
READ_RTM
GADR_LGC
6
7
RD_SINFO
DP_PRAL
EN_MSG
10
DIS_MSG
11
DPSYC_FR
1
2
3
4
5
11
DPSYC_FR
12
D_ACT_DP
12
D_ACT_DP
12
D_ACT_DP
12
D_ACT_DP
12
D_ACT_DP
Function
Set clock
Read clock
Set run-time meter
Start and stop run-time meter
Read run-time meter
Find logical address of a channel
Rack 0
internal DP
Read start information of current OB
Trigger a process interrupt at the DP
master First call
Intermediate call
Enable block-related, symbol-related, and
group status messages.
First call, REQ = 1
Last call
Disable block-related, symbol-related, and
group status messages.
First call, REQ = 1
Last call
Synchronize groups of DP Slaves
First call, internal DP interface,
REQ = 1
Intermediate call, internal DP interface,
1)
BUSY = 1
1)
Last call, internal DP interface, BUSY=0
First call, external DP interface, REQ=1
Intermediate call, external DP interface,
1)
BUSY = 1
Last call, external DP interface,
1)
BUSY= 0
Deactivate and activate DP slaves via
integrated DP interface, MODE = 0
Deactivate and activate DP slaves via
integrated DP interface, MODE = 1
First call
Intermediate call
Last call
Deactivate and activate DP slaves via
integrated DP interface, MODE = 2
First call
Intermediate call
Last call
Deactivate and activate DP slaves via
external DP interface, MODE = 0
Execution Time in
s
CPU
CPU
416
417
CPU
412
CPU
414
249
29
26
23
30
39
CPU
414-H
417-H
(SOLO)
289
29
25
22
29
38
CPU
414-H
417-H
(Redun)
288
54
26
22
58
38
340
40
35
30
41
55
249
29
26
23
30
39
215
23
20
18
23
31
66
54
294
46
38
208
36
30
166
46
38
208
46
39
--
46
39
--
43
176
30
122
24
97
30
122
-128
-232
61
176
44
122
34
97
44
122
39
128
62
232
61
170
44
110
34
90
44
110
39
--
63
--
51 + n*
4
51 + n*
4
94
64 + n*
4
64 + n*
4
117
36 + n*
3
36 +
n* 3
71
50 + n*
3
50 + n*
3
76
28 + n*
2
28 + n*
2
60
39 + n*
2
39 + n*
2
61
36 + n*
3
36 + n*
3
71
50 + n*
3
50 + n*
3
76
--
--
--
--
---
---
--
--
--
--
269
179
142
179
--
--
114
231
378
73
167
268
59
121
202
73
167
268
----
----
113
72
58
72
--
--
119
X
76
X
62
X
76
X
---
---
--
--
X
X
X
X
X
X
X
X
X
X
X
X
----
----
X
300
X
200
X
165
X
200
-210
-290
-83
-56
-45
-56
79
70
79
96
94
86
181
67
62
156
54
50
137
67
62
156
88
76
152
122
99
209
S7-400
329
SFC
NO.
15
17
SFC
Name
DPWR_DAT
Function
CPU
412
CPU
414
1)
57 /
2)
61
1)
67 /
2)
97
1)
62 /
2)
67
1)
150 /
2)
181
305
96 /127
88 /94
178 /
2)
209
440
ALARM_SQ
84 /91
2)
1)
2)
1)
2)
1)
1)
Execution Time in
s
CPU
CPU
416
417
1)
45 /
2)
49
1)
53 /
2)
78
1)
50 /
2)
54
1)
130 /
2)
154
240
1)
57 /
2)
61
1)
67 /
2)
97
1)
62 /
2)
67
1)
150 /
2)
181
305
ALARM_SC
20
BLKMOV
21
FILL
22
CREAT_DB
23
24
25
DEL_DB
TEST_DB
COMPRESS
26
UPDAT_PI
27
UPDAT_PO
28
29
30
31
32
33
34
35
36
37
38
SET_TINT
CAN_TINT
ACT_TINT
QRY_TINT
SRT_DINT
CAN_DINT
QRY_DINT
MP_ ALM
MSK_FLT
DMSK_FLT
READ_ERR
39
DIS_IRT
40
41
1)
CPU
414-H
417-H
(SOLO)
1)
72 /
2)
76
1)
88 /
2)
119
1)
2)
77 /83
171 /
2)
201
266
CPU
414-H
417-H
(Redun)
1)
94 /
2)
98
1)
110 /
2)
142
1)
100 /
2)
105
1)
193 /
2)
224
358
90
275
156
365
97
163
1)
85
60
46
60
56
82
60 + n *
0.3
41 + n *
0.13
32 + n *
0.23
41 + n *
0.13
42 + n *
0.17
42 + n *
0.17
1400 +
n* 1.0
60 + n *
0.15
1160 +
n* 0.7
44 + n *
0.13
1100 +
n* 0.7
34 + n *
0.1
1160 +
n * 0.7
44 + n *
0.13
1124 +
n * 1.0
45 + n *
0.12
2065 +
n * 1.98
45 + n *
0.12
142
94
72
94
606
400
320
400
155 + n * 424 + n *
0.1
0.1
2877
13601
122
47
112
81
32
78
64
25
63
81
32
78
179
68
93
625
248
173
32
45
23
35
18
29
23
35
22
67
22
103
70
45
59
35
51
29
59
35
155
54
192
81
66
108
40
73
44
65
41
43
240
30
31
32
55
75
29
53
34
46
30
33
171
22
23
23
48
60
22
41
27
36
23
26
138
17
18
18
55
75
29
53
34
46
30
33
171
22
23
23
122
74
34
51
33
44
36
32
-21
22
23
149
98
34
75
34
44
36
32
-21
23
23
S7-400
SFC
NO.
SFC
Name
42
EN_AIRT
51
RDSYSST
Function
CPU
412
CPU
414
Execution Time in
s
CPU
CPU
416
417
CPU
414-H
417-H
(SOLO)
18
CPU
414-H
417-H
(Redun)
18
cannot be measured
47
WAIT
Delay program execution
13 - 18
7 - 15
4 - 11
7 - 15
6 - 13
6 - 13
in addition to waiting time
48
SNC_RTCB
Synchronize slave clocks
25
19
14
19
18
41
49
LGC_GADR
Find slot with logical address
55
40
31
40
41
41
50
RD_LGADR
Find all logical addresses of a block
146
101
80
101
104
104
(run-time entry for 1 DI 32 in the central
rack)
When cancelling the last delay, the SFC 42 runtime depends on the priority class in which the SFC 42 is called. The specified runtime
refers to the call in OB 1. It decreases while the priority class number increases.
51
RDSYSST
51
RDSYSST
51
51
51
51
RDSYSST
RDSYSST
RDSYSST
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
618
493
395
493
477
477
140
97
77
97
97
97
224
170
135
170
169
168
175
145
317
125
100
235
100
80
187
125
100
235
123
99
233
122
99
232
190 215
145
185
135 155
100
134
108 123
80
105
135 155
100
134
185
145
220
134
100
145
105
80
120
170
745
196
117
480
425
165 185
142
858
98
133
134
100
145
134
100
145
133
99
144
93
480
425
117
99
145
117
99
145
117
99
144
118 128
100
740
94 - 102
78
765
118 128
100
740
196 347
153
322
110 250
106
216
110 135
85
175
110 250
106
216
225
206
1225
150
136
1010
120
110
1055
150
136
1010
210 590
195 215
225 640
(225/
375)+
n*34
930 1510
145 410
135 150
155 440
(155/
260)+
n*23
795 1285
115 330
110 120
125 390
(125/
245)+
n*18
835 1390
145 410
135 150
155 440
(155/
260)+
n*23
795 1285
155
107
85
107
98
947
98
947
107
225
106
--
151
136
1298
--1297
(155/
305)+
n*23
1037 1697
108
107
S7-400
331
SFC
NO.
51
SFC
Name
RDSYSST
Function
51
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
Execution Time in
s
CPU
CPU
416
417
CPU
412
CPU
414
225 660
160 490
125 390
160 490
210 225
235 720
(235/
375)+
n*45
158
210
148 158
165 515
(165/
260)+
n*35
110
147
118 128
130 470
(130/
245)+
n*25
87
117
148 158
165 515
(165/
260)+
n*35
110
147
535 +
n*52
145
200
450 +
n*35
100
140
443 +
n*28
80
111
175
205
125
150
CPU
CPU
414-H
414-H
417-H
417-H
(SOLO) (Redun)
157 - 432 160 - 450
148 - 155 148 - 158
165 - 560 165 - 560
(165/
305)+
n*35
44
147
(165/
305)+
n*35
108
147
450 +
n*35
100
140
540 +
n*36
101
139
540 +
n*36
100
138
100
120
125
150
125
157
125
181
235
425
190 225
128 155
102 135
128 155
210 395
190 225
128 305
128 155
102 255
102 135
128 305
128 155
190 390
190 225
190 240
160
145 295
130 160
130 170
112
115 235
102 135
102 145
90
145 295
130 160
130 170
112
190 220
128 150
102 125
128 150
210 305
128 225
102 185
128 225
190 220
128 150
102 125
128 150
210 310
145 225
115 180
145 225
190 220
130 150
102 125
130 150
190 225
130 155
102 130
130 155
160
112
90
112
113
111
112
S7-400
SFC
NO.
51
51
SFC
Name
RDSYSST
RDSYSST
Function
51
RDSYSST
CPU
414
CPU
414-H
417-H
(SOLO)
--
CPU
414-H
417-H
(Redun)
--
660 + n*
22
508 + n* 408 + n*
19
16
508 + n*
19
570 + n*
70
427 + n* 365 + n*
60
40
405 + n*
24
--
--
580 + n*
138
428 + n* 344 + n*
22
18
428 + n*
22
--
--
585 + n*
72
430 + n*
60
370 + n
* 40
430 + n*
60
--
--
354 + n*
30
250 + n* 200 + n*
26
21
250 + n*
26
--
--
centralized
of one module with logical base address
(0C91)
200 315
180
145
180
177
242
315
225
180
225
224
289
200 315
145 240
130 190
145 240
242
305
--
--
--
--
148
148
--
--
--
--
167
167
distributed
of one module with logical base address
(0C91)
Module Status Information partial list of a
module (distributed) with a logical base
address (4C91)
first call
distributed
of all modules in the specified distributed
I/O station (0D91)
RDSYSST
CPU
412
Execution Time in
s
CPU
CPU
416
417
local
of all modules in the specified rack
(n = number of the DS) (0D91)
51
377 + n*
13
275 + n* 240 + n*
16
10
275 + n
* 16
260 + n * 405 + n *
20
23
330 390
250 300
200 240
250 300
305
408 - 420
560
180
435
127
350
100
435
127
-130
-154
900
725
585
725
712
743
180
127
103
127
131
155
940
745
600
745
725
757
160
195 525
113
138 410
90
110 330
113
138 410
195 + n*
14.5
195 1270
138 + n* 110 + n*
12
9.5
138 110 1530
1095
113
113
140 - 412 140 - 412
138 + n* 140 + n*
12
12
138 140 1530
1540
140 + n*
12
140 1540
S7-400
333
SFC
NO.
SFC
Name
51
51
Function
CPU
412
CPU
414
138 1530
CPU
414-H
417-H
(SOLO)
140 1540
CPU
414-H
417-H
(Redun)
140 1540
195 1270
138 1530
110 1095
167
--
90
--
114
114
167
--
90
--
114
114
406
286
233
286
300
360
distributed
First call
392
270
217
270
278
356
distributed
Intermediate call, REQ = 0
215
150
120
150
153
152
distributed
Last call
Diagnostic Data DS 1 partial list
Display via graphical address (00B2)
Display a 16-byte long DS 1
Diagnostic Data DS 1 partial list
Display via logical address (00B3)
Display a 16-byte long DS 1 local
405
165
132
165
170
169
408
300
250
300
313
375
447
324
268
324
340
402
395
270
218
270
272
356
RDSYSST
51
RDSYSST
51
RDSYSST
51
RDSYSST
218
150
120
150
153
153
257
178
142
178
182
182
385
266
213
266
272
351
--
--
115
--
149
148
246
186
170
128
135
102
170
128
174
75
173
100
107
75
60
75
74
98
180
125
95
125
126
153
200
135
105
135
121
121
485
345
280
345
360
418
370
260
210
260
268
347
distributed
Intermediate/last call, REQ = 0
175
115
90
115
122
122
WR_USMSG
54
RD_DPARAM
55
WR_PARM
Execution Time in
s
CPU
CPU
416
417
S7-400
SFC
NO.
56
57
58
59
SFC
Name
WR_DPARM
PARM_MOD
WR_REC
RD_REC
Function
GD_SND
61
GD_RCV
62
CONTROL
64
65
TIME_TCK
X_SEND
66
X_RCV
CPU
414
336
CPU
414-H
417-H
(SOLO)
353
CPU
414-H
417-H
(Redun)
411
445
336
280
300
205
165
205
217
296
145
770
100
580
80
490
100
580
106
609
106
695
300
205
165
205
215
295
145
100
80
100
104
104
390 + n*
3.13
322
Execution Time in
s
CPU
CPU
416
417
CPU
412
60
140
138
198 + n*
0.35
90
70
215 + n* 171 + n*
0.26
0.23
90
72
91
72
267 + n* 218 + n*
2.90
2.71
217
172
90
70
132 + n* 106 + n*
0.33
0.27
90
95
215 + n* 208 + n*
0.26
0.26
90
95
91
95
267 + n* 282 + n*
2.90
2.97
217
212
90
95
132 + n* 138 + n*
0.33
0.33
94
208 + n*
0.29
94
95
342 + n*
3.13
264
94
138 + n*
0.33
304
204
163
204
198
197
139
91
72
91
95
94
200 + n*
0.33
295
132 + n* 105 + n*
0.2
0.2
215
175
132 + n* 136 + n*
0.2
0.33
215
--
136 + n*
0.27
--
910
145
640
105
515
85
640
105
---
---
116
87
69
87
107
136
24
860 910
19
710 740
15
765 795
19
710 740
19
--
47
--
590 635
400 430
320 345
400 430
--
--
Intermediate call
(1-76 bytes)
180
130
100
130
--
--
285
92
195
65
155
55
195
65
---
---
275 315
190 220
150 175
190 220
--
--
S7-400
335
SFC
NO.
67
SFC
Name
X_GET
Function
CPU
412
CPU
414
645
CPU
414-H
417-H
(SOLO)
--
CPU
414-H
417-H
(Redun)
--
760
645
715
490
335
265
335
--
--
Intermediate call
(1-76 bytes)
195
135
110
135
--
--
450 490
880 925
310 340
725 755
245 270
780 810
310 340
725 755
--
--
--
--
610 655
415 445
330 360
415 445
--
--
Intermediate call
(1-76 bytes)
195
135
110
135
--
--
300
205
162
205
--
--
220
160
125
160
--
--
X_PUT
69
72
73
74
X_ABORT
I_GET
I_PUT
I_ABORT
1)
79
SET
80
RSET
81
UBLKMOV
90
H_CTRL
100
SET_CLKS
1)
1)
Execution Time in
s
CPU
CPU
416
417
125
90
70
90
--
--
365
815
375
680
75 - 500
745
375
680
---
---
505
345
275
345
--
--
205
145
115
145
--
--
460 505
315 345
250 275
315 345
--
--
690 980
430 800
340 840
430 800
--
--
625 665
205
310
425 455
145
215
340 365
115
170
425 455
145
215
--
--
---
---
225
160
125
160
--
--
125
365
90
380
75
70 / 503
90
380
---
---
43 +
n * 0.39
43 +
n * 0.39
62 + n*
0.30
--
28 +
n * 0.32
28 +
n * 0.32
44 + n*
0.17
--
23 +
n * 0.26
23 +
n * 0.26
33 + n*
0.17
--
28 +
n * 0.32
28 +
n * 0.32
44 + n*
0.17
--
53 +
n * 1.35
53 +
n * 1.35
43 + n*
0.17
19 - 21
80 +
n * 1.32
80 +
n * 1.32
42 + n*
0.17
19 - 21
370
263
227
263
439
1169
125
375
84
266
67
232
84
266
192
442
403
1167
Measured with I/O modules of the type Binary Simulator C79459-A1002-A1, Release 1 in the central rack
S7-400
SFC
NO.
105
0)
SFC
Name
READ_SI
Function
CPU
412
CPU
414
Execution Time in
s
CPU
CPU
416
417
CPU
414-H
417-H
(SOLO)
117 0)
3205
136 1)
3802
137 1)
2901
137 2)
3802
145 1)
6954
147 1)
2668
145 2)
6974
CPU
414-H
417-H
(Redun)
117 0)
3206
303 1)
3971
304 1)
3069
305 2)
3970
507 1)
23875
510 1)
3033
507 2)
23906
1)
2)
Depending on the number of active messages (assigned system resources) and on the number of assigned instances with the desired
CMP_ID.
107
108
ALARM_DQ
ALARM_D
497
336
267
336
349
566
145
98
78
98
101
157
499
337
266
337
350
548
146
98
78
98
101
156
S7-400
337
System Function Blocks
SFB
NO.
0
1
2
3
4
5
8
12
SFB
Name
CTU
CTD
CTUD
TP
TON
TOF
USEND
URCV
BSEND
Function
CPU
412
CPU
414
26
25
29
34
34
36
473 737
16
17
19
23
23
24
318 509
13
13
15
18
18
19
253 407
JOB checked
159
107
152
Count up
Count down
Count up and down
Generate pulse
Generate on-delay
Generate off-delay
Send data without coordination
(one send parameter supplied)
JOB activated (1 - 440 bytes)
JOB finished
(NDR = 1; 1 - 440 bytes)
Send data block by block
JOB activated (1 - 3000 bytes)
JOB checked
13
14
BRCV
GET
Execution Time in
s
CPU
CPU
416
417
16
17
19
23
23
24
317 509
CPU
414-H
417-H
(SOLO)
17
17
19
24
24
20
330 436
CPU
414-H
417-H
(Redun)
16
17
19
52
52
53
425 542
86
108
115
145
103
82
104
107
137
137
93
74
94
100
130
137
93
74
94
100
130
345 610
386
232 421
258
186 337
207
233 421
258
243 363
264
314 435
323
171
115
92
116
122
152
165
110
88
111
115
145
203
138
110
139
145
175
JOB checked
161
110
88
111
117
147
JOB finished
162
109
87
110
113
143
336
227
183
228
227
297
JOB checked
JOB finished (NDR = 1; 1 - 450 bytes)
161
109
87
110
116
146
344 626
498 748
161
231 431
337 513
108
185 345
269 410
87
232 432
337 515
109
243 369
349 458
116
314 441
443 552
146
15
PUT
154
104
83
105
108
138
16
513 757
160
338 516
107
271 414
86
339 518
108
354 462
115
449 545
145
19
START
20
STOP
153
103
82
104
107
137
497
333
265
333
339
408
169
114
91
115
121
151
164
110
88
111
115
146
472
314
251
314
322
384
169
114
91
115
121
151
164
110
88
111
115
146
S7-400
SFB
NO.
21
22
23
32
33
34
35
SFB
Name
RESUME
STATUS
USTATUS
DRUM
ALARM
ALARM_8
ALARM_8P
Function
37
52
52
NOTIFY
AR_SEND
RDREC
RDREC
Execution Time in
s
CPU
CPU
416
417
CPU
412
CPU
414
332
CPU
414-H
417-H
(SOLO)
339
CPU
414-H
417-H
(Redun)
399
496
334
265
169
114
91
115
121
151
164
268
110
88
111
115
145
183
146
184
188
258
161
108
87
109
116
146
604
404
323
404
415
486
137
93
74
94
100
131
137
93
74
94
100
130
604
52
581 843
404
33
386 587
323
26
307 470
404
33
385 589
415
35
392 518
486
62
527 652
JOB checked
205
136
109
137
141
171
207
416
137
278
110
222
138
279
136
278
166
372
203
135
108
136
140
170
206
137
109
138
135
166
580 842
384 587
308 469
385 597
392 517
526 651
204
136
108
137
140
170
207
561 823
137
373 580
110
301 462
138
379 578
135
384 510
166
519 644
JOB checked
186
125
100
126
133
163
191
388
128
258
102
208
129
258
130
265
160
328
173
116
92
116
123
155
167
111
88
112
115
147
341
221
177
221
228
269
173
111
89
111
117
114
JOB finished
Implement sequencer
Generate block-related message with
acknowledgment
JOB activated, SIG = 0> 1
(1 - 420 bytes)
36
Last call
236
157
127
157
164
161
323
211
170
211
213
210
174
112
90
112
117
114
Last call
238
154
124
154
161
158
S7-400
339
SFB
NO.
53
53
SFB
Name
WRREC
WRREC
54
RALRM
54
RALRM
Function
CPU
414
354
234
170
110
88
110
116
112
Last call
171
110
89
110
116
113
339
224
180
224
226
223
170
110
89
110
116
113
Last call
172
111
89
111
117
113
133
81
70
81
83
83
250
164
135
164
245
245
257
171
140
171
251
251
--
--
--
--
242
242
429
290
234
290
458
458
704
499
413
499
747
747
--
--
--
--
460
460
215
138
111
138
143
143
619
472
414
472
567
567
OB 70
54
RALRM
54
RALRM
Execution Time in
s
CPU
CPU
416
417
CPU
412
187
234
CPU
414-H
417-H
(SOLO)
241
CPU
414-H
417-H
(Redun)
281
5
f Z ] d
Sysytem Blocks
f Z ] d
342
List of SFCs
No.
Short Name
Function
SFC 0
SET_CLK
SFC 1
READ_CLK
SFC 2
SET_RTM
SFC 3
CTRL_RTM
SFC 4
READ_RTM
SFC 5
GADR_LGC
SFC 6
RD_SINFO
SFC 7
DP_PRAL
SFC 9
EN_MSG
SFC 10
DIS_MSG
SFC 11
DPSYC_FR
SFC 12
D_ACT_DP
SFC 13
DPNRM_DG
SFC 14
DPRD_DAT
SFC 15
DPWR_DAT
SFC 17
ALARM_SQ
SFC 18
ALARM_S
SFC 19
ALARM_SC
Query the Acknowledgment Status of the last ALARM_SQ Entering State Message
SFC 20
BLKMOV
Copy Variables
SFC 21
FILL
SFC 22
CREAT_DB
SFC 23
DEL_DB
SFC 24
TEST_DB
SFC 25
COMPRESS
SFC 26
UPDAT_PI
SFC 27
UPDAT_PO
SFC 28
SET_TINT
SFC 29
CAN_TINT
SFC 30
ACT_TINT
SFC 31
QRY_TINT
SFC 32
SRT_DINT
SFC 33
CAN_DINT
SFC 34
QRY_DINT
SFC 35
MP_ALM
SFC 36
MSK_FLT
SFC 37
DMSK_FLT
SFC 38
READ_ERR
SFC 39
DIS_IRT
SFC 40
EN_IRT
SFC 41
DIS_AIRT
SFC 42
SFC 43
EN_AIRT
RE_TRIGR
f Z ] d
No.
Short Name
SFC 44
REPL_VAL
Function
Transfer Substitute Value to Accumulator 1
SFC 46
STP
SFC 47
WAIT
SFC 48
SNC_RTCB
SFC 49
LGC_GADR
SFC 50
RD_LGADR
SFC 51
RDSYSST
SFC 52
WR_USMSG
SFC 54
RD_PARM
SFC 55
WR_PARM
SFC 56
WR_DPARM
SFC 57
PARM_MOD
SFC 58
WR_REC
SFC 59
RD_REC
SFC 60
GD_SND
Send a GD Packet
SFC 61
GD_RCV
SFC 62
CONTROL
SFC 63 *
AB_CALL
SFC 64
TIME_TCK
SFC 65
X_SEND
SFC 66
X_RCV
SFC 67
X_GET
SFC 68
X_PUT
SFC 69
X_ABORT
SFC 72
I_GET
SFC 73
I_PUT
SFC 74
I_ABORT
SFC 78
OB_RT
SFC 79
SET
SFC 80
RSET
SFC 81
UBLKMOV
SFC 82
CREA_DBL
SFC 83
READ_DBL
SFC 84
WRIT_DBL
SFC 87
C_DIAG
SFC 90
H_CTRL
SFC 100
SET_CLKS
SFC 101
RTM
SFC 102
RD_DPARA
Redefined Parameters
SFC 103
DP_TOPOL
SFC 104
CiR
Controlling CiR
SFC 105
READ_SI
SFC 106
DEL_SI
SFC 107
ALARM_DQ
SFC 108
ALARM_D
SFC 126
SYNC_PI
SFC 127
SYNC_PO
* SFC 63 "AB_CALL" only exists for CPU 614. For a detailed description, refer to the corresponding Manual
f Z ] d
List of SFBs
No.
SFB 0
SFB 1
SFB 2
SFB 3
SFB 4
SFB 5
SFB 8
SFB 9
SFB 12
SFB 13
SFB 14
SFB 15
SFB 16
SFB 19
SFB 20
SFB 21
SFB 22
SFB 23
SFB 29 *
SFB 30 *
SFB 31
SFB 32
SFB 33
SFB 34
SFB 35
SFB 36
SFB 37
SFB 38 *
SFB 39 *
SFB 41
SFB 42
SFB 43
SFB 44
SFB 46
SFB 47
SFB 48
SFB 49
SFB 52
Short Name
CTU
CTD
CTUD
TP
TON
TOF
USEND
URCV
BSEND
BRCV
GET
PUT
PRINT
START
STOP
RESUME
STATUS
USTATUS
HS_COUNT
FREQ_MES
NOTIFY_8P
DRUM
ALARM
ALARM_8
ALARM_8P
NOTIFY
AR_SEND
HSC_A_B
POS
CONT_C 1)
CONT_S 1)
PULSEGEN 1)
ANALOG 2)
DIGITAL 2)
COUNT 2)
FREQUENC 2)
PULSE 2)
RDREC
Function
Count Up
Count Down
Count Up/Down
Generate a Pulse
Generate an On Delay
Generate an Off Delay
Uncoordinated Sending of Data
Uncoordinated Receiving of Data
Sending Segmented Data
Receiving Segmented Data
Read Data from a Remote CPU
Write Data to a Remote CPU
Send Data to Printer
Initiate a Warm or Cold Restart on a Remote Device
Changing a Remote Device to the STOP State
Initiate a Hot Restart on a Remote Device
Query the Status of a Remote Partner
Receive the Status of a Remote Device
Counter (high-speed counter, integrated function)
Frequency Meter (frequency meter, integrated function
Generating block related messages without acknowledgement indication
Implement a Sequencer
Generate Block-Related Messages with Acknowledgment Display
Generate Block-Related Messages without Values for 8 Signals
Generate Block-Related Messages with Values for 8 Signals
Generate Block-Related Messages without Acknowledgment Display
Send Archive Data
Counter A/B (integrated function)
Position (integrated function)
Continuous Control
Step Control
Pulse Generation
Positioning with Analog Output
Positioning with Digital Output
Controlling the Counter
Controlling the Frequency Measurement
Controlling Pulse Width Modulation
Reading a Data Record from a DP Slave
SFB 53
SFB 54
SFB 60
SFB 61
SFB 62
SFB 63
SFB 64
SFB 65
SFB 75
WRREC
RALRM
2)
SEND_PTP
2)
RCV_PTP
2)
RES_RECV
2)
SEND_RK
2)
FETCH_RK
2)
SERVE_RK
SALRM
SFB 29 "HS_COUNT" and SFB 30 "FREQ_MES" only exist on the CPU 312 IFM and
CPU 314 IFM. SFBs 38 "HSC_A_B" and 39 "POS" only exist on the CPU 314 IFM
1) SFBs 41 "CONT_C," 42 "CONT_S" and 43 "PULSEGEN" only exist on the CPU 314 IFM
2) SFBs 44 to 49 and 60 to 65 only exist on the S7-300C CPUs
6
S5 S7
S5 S7 ] Zf{ d cYf{ Z
346
S5 S7
Data Class
Data Types in S5
Data Types in S7
BOOL,
BYTE,
WORD,
DWORD,
Integer,
Double integer,
Floating point,
Time value,
ASCII character
BOOL,
BYTE,
WORD,
DWORD,
INT,
DINT,
REAL,
S5TIME,
TIME, DATE; TIME_OF_DAY,
CHAR
DATE_AND_TIME,
STRING,
ARRAY,
STRUCT
Parameter types
Timers,
Counters,
Blocks
TIMER,
COUNTER,
BLOCK_FC, BLOCK_FB,
BLOCK_DB, BLOCK_SDB,
POINTER,
ANY
S5 S7
Formats in S5
Example
Formats in S7
Example
KB
L KB 10
K8
L B#16# A
KF
L KF 10
K16
L 10
KH
L KH FFFF
16#
L 16# FFFF
KM
L KM 1111111111111111
2#
L 2# 11111111_11111111
KY
L KY 10,12
B#
L B# (10,12)
KT
L KT 10.0
S5TIME# (S5T#)
L S5TIME# 100ms
KC
L KC 30
C#
L C#30
DH
L DH FFFF FFFF
16#
L DW#16# FFFF_FFFF
KS
L KS WW
xx
L WW
KG
L KG +234 +09
Floating Point
L +2.34 E+08
S5 S7 ] Zf{ d cYf{ Z
S7 S5 OB
Function
S5
S7
Main program
Free cycle
OB1
OB1
Interrupts
Time-delay
(delayed)
interrupt
OB6
OB20 to OB23
Time-of-day
(clock-controlled)
interrupt
OB9
OB10 to OB17
Hardware interrupts
OB2 to OB5
OB40 to OB47
Process interrupts
OB2 to OB9
Replaced by hardware
interrupts
Cyclic (timed)
interrupts
OB10 to OB18
OB30 to OB38
Multicomputing
interrupt
OB60
Manual complete
(cold)
restart
OB100
OB21 (S5-115U)
OB20 (S5-135U)
OB100
Manual (warm)
restart
OB101
Automatic (warm)
restart
OB22
OB101
Errors
Error
OB19 to OB35
Other
Processing in STOP
mode
OB39
Background
processing
OB90
Startup
S5 S7 ] Zf{ d cYf{ Z
348
S5 S7
Instruction Type
Accumulator
instructions
S5
TAK, ENT, I, D, ADDBN,
ADDKF, ADDDH
S7
TAK, ENT, INC, DEC, +,
Address register
instructions /
Register instructions
New in S7:
CAW, CAD, PUSH,POP, LEAVE
New in S7:
LAR1, LAR2,
TAR1, TAR2,
+AR1, +AR2,
CAR
A, AN, O, ON, A(,
O(, ), O, S, R, =
Timer instructions
New in S7:
X, XN, X(, XN(,FP, FN, NOT, SET,CLR,
SAVE
SP, SE, SD, SS, SF,
FR, S T
Counter instructions
L, LC, T
L PIB, L PIW,
T PQB, T PQW
LY GB / GW / GD /CB / CW /
CD,LW GW / GD / CW /
CD,TY GB / GW / GD /
CB / CW / CD,TW GW / GD /
CW /CD
+F, F, xF, :F, +D,D
Integer math
instructions
Floating-point math
instructions
Comparison
instructions
Conversion
instructions
+G, G, xG, :G
New in S7:
MOD
+R, R, *R, /R
New in S7:
ITD, RND+, RND, TRUNC, INVD, NEGR
S5 S7 ] Zf{ d cYf{ Z
S5 S7
Instruction Type
Word logic
instructions
Data block
instructions
Logic control
instructions, jump
Block instructions
Command output
instructions/ Master
control relay
instructions
S5
AW, OW, XOW
New in S7:
AD, OD, XOD
SLW, SLD, SRW,
SRD, SSI, SSD,
RLD, RRD
G, CX
New in S7:
RLDA, RRDA
OPN
G, GX
SFC22
New in S7:
CDB
L DBLG, L DBNO,L DILG, L DINO
JU, JC, JN, JZ, JP,
JM, JO, JOS
S7
New in S7:
JCN, JCB, JNB,JBI, JNBI, JMZ,
JPZ, JUO, LOOP, JL
CALL, BE, BEU,
BEC
New in S7:
MCRA, MCRD,
MCR(, )MCR
Stop commands
SFC46
Processing functions
DO <Formal parameter>
DO FW, DO DW
DO RS
LIR, TIR, LDI, TDI
Memory-indirect addressing
Area-crossing register-indirect addressing
SFC20
SFC39 to 42
Page commands
Math functions
Null instructions
BLD xxx
NOP 0, NOP 1
BLD xxx
NOP 0, NOP 1
Absolute memory
addressing
Block transfers
Interrupt commands
mY ]Z
351
Siemens
x
Siemens
Siemens
x
From S5 to S7
Siemens
Siemens
x
Siemens
x
Siemens
x
Siemens
Siemens
x
Siemens
Siemens
x
Siemens
x
Siemens
x
Siemens
Siemens
x
FAQ
x
PLC History
x
www.ad.siemens.de
www.plcs.net
PLC
Step7
www.plcopen.org