s7400 Parameter Manual en-US en-US
s7400 Parameter Manual en-US en-US
___________________
Automation ___________________
Addressing 2
3
___________________
Instruction list
SIMATIC
___________________
SSL partial list 4
PCS 7 process control system
Instruction List CPU 410-5H
Process Automation
Parameter Manual
05/2013
A5E31664440-AA
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
1 Overview................................................................................................................................................. 5
1.1 Validity Range of the Instructions List ............................................................................................ 5
1.2 Address Identifiers and Parameter Ranges ................................................................................... 5
1.3 Constants ....................................................................................................................................... 7
1.4 Abbreviations ................................................................................................................................. 7
1.5 Registers ........................................................................................................................................ 8
1.6 Status Word ................................................................................................................................... 9
2 Addressing ............................................................................................................................................ 11
2.1 Address types ..............................................................................................................................11
2.2 Examples of addressing ...............................................................................................................13
2.3 Examples of how to calculate the pointer ....................................................................................14
2.4 Execution Times with Indirect Addressing ...................................................................................15
3 Instruction list ........................................................................................................................................ 17
3.1 Logic instructions .........................................................................................................................18
3.1.1 Bit logic instructions .....................................................................................................................18
3.1.2 Bit logic instructions with parenthetical expressions ....................................................................21
3.1.3 ORing of AND functions ...............................................................................................................22
3.1.4 Logic Instructions with Timers and Counters ...............................................................................22
3.1.5 Word Logic Instructions with the Contents of Accumulator 1 ......................................................24
3.1.6 Logic Instructions Using AND, OR and EXCLUSIVE OR ............................................................25
3.2 EdgeTriggered Instructions ..........................................................................................................27
3.3 Setting/Resetting Bit Addresses ..................................................................................................28
3.4 Instructions Directly Affecting the RLO ........................................................................................30
3.5 Timer Instructions.........................................................................................................................31
3.6 Counter Instructions .....................................................................................................................33
3.7 Load Instructions ..........................................................................................................................34
3.8 Load Instructions for Timers and Counters ..................................................................................37
3.9 Transfer Instructions ....................................................................................................................38
3.10 Load and Transfer Instructions for Address Registers ................................................................40
3.11 Load and Transfer Instructions for the Status Word ....................................................................41
3.12 Load Instructions for DB Number and DB Length .......................................................................42
3.13 Fixedpoint arithmetic (16/32 bit) / Floatingpoint arithmetic (32 bit) ..............................................42
3.14 Square root, Square (32bit) / Logarithm function (32bit) .............................................................44
1.3 Constants
Constant Description
B#16#
W#16# Hexadecimal constant
DW#16#
D#Date IEC date constant
L#Integer 32-bit integer constant
P#Bitpointer Pointer constant
S5T#Time S7 time constant 1)
T#Time Time constant
TOD#Time IEC time constant
C#Count value Counter constant (BCD coded)
2#n Binary constant
B (b1, b2) or B (b1, b2, b3, b4) Constant, 2 or 4 byte
1) For loading the S7 timers
1.4 Abbreviations
1.5 Registers
Table 1- 4 Designations:
Accumulator Bit
ACCUx (x = 1 to 2) Bit 0 to 31
ACCUx-L Bit 0 to 15
ACCUx-H Bit 16 to 31
ACCUx-LL Bit 0 to 7
ACCUx-LH Bit 8 to 15
ACCUx-HL Bit 16 to 23
ACCUx-HH Bit 24 to 31
1. access 2. access
Commands I Q M P L DB DI V I Q M P L DB DI V
A, AN, O, ON, X, XN, =, R, S, FP, FN -
Direct c 0.0 – – – – – – – – c c c – c c c –
Memory indirect c [AC D 0] – – AC – AC AC AC – c c c – c c c –
Memory indirect [#par] – – – – – – – – c c c RE RE c c c
via block
parameter
Register c[AR1, P#..] – – – – – – – – c c c – c c c –
indirect, area- c[AR2, P#..]
internal
Register [AR1, P#..] – – – – – – – – c c c RE c c c c
indirect, area- [AR2, P#..]
crossing
L, T -
Direct cB 0. cW 0. – – – – – – – – c c c c c c c –
cD 0
Memory indirect cB[AC D 0] – – AC – AC AC AC – c c c c c c c –
cW[AC D 0]
cD]AC D 0]
Memory indirect Bpar, Wpar, – – – – – – – – c c c c RE c c c
via block Dpar
parameter
Register cB[AR1, P#..] – – – – – – – – c c c c c c c –
indirect, area- cW[AR1, P#..]
internal
cD[AR1, P#..]
cB[AR2, P#..]
cW[AR2, P#..]
cD[AR2, P#..]
Register B[AR1, P#..] – – – – – – – – c c c c c c c c
indirect, area- W[AR1, P#..]
crossing
D[AR1, P#..]
B[AR2, P#..]
W[AR2, P#..]
D[AR2, P#..]
1. access 2. access
Commands I Q M P L DB DI V I Q M P L DB DI V
SP, SE, SD, SS, SF, R, FR, L, LC, A, AN, O, ON, X, XN -
Direct T0 – – – – – – – – – – – – – – – –
Memory indirect T[AC W 0] – – AC – AC AC AC – – – – – – – – –
Memory indirect #Tpar – – – – – – – – – – – – – – – –
via block
parameter
S, CU, CD, R, FR, L, LC, A, AN, O, ON, X, XN -
Direct C0 – – – – – – – – – – – – – – – –
Memory indirect C[AC W 0] – – AC – AC AC AC – – – – – – – – –
Memory indirect #Zpar – – – – – – – – – – – – – – – –
via block
parameter
UC, CC -
Direct FB 0. FC 0 – – – – – – – – – – – – – – – –
Memory indirect FB[AC W 0], – – AC – AC AC AC – – – – – – – – –
FC[AC W 0]
Memory indirect FBpar, – – – – – – – – – – – – – – – –
via block #FCpar
parameter
OPN -
Direct DB 0, DI 0 – – – – – – – – – – – – – – – –
Memory indirect DB[AC W 0], – – AC – AC AC AC – – – – – – – – –
DI[AC W 0]
Memory indirect DBpar, – – – – – – – – – – – – – – – –
via block #FCpar 1)
parameter
1) The STL syntax prohibits opening the 2nd data block as block parameter.
Definition of abbreviations
● c= address range (bit)
● AC= range of address memory cell;
● RE= Range error (invalid range)
See also
Abbreviations (Page 7)
Examples of addressing (Page 13)
The execution times given in chapter "List of instructions" are the execution times for the
second part of an instruction, i.e., for the actual
execution of an instruction.
You must then add the time required for loading the address to this execution time (see
following table).
The following table indicates the execution times for loading the address depending on the
location of the address.
Execution time in ns
Direct addressing Indirect addressing
18.75 Time for AI 46.88+
:
Execution time in ns
Direct addressing Indirect addressing
13,25 Time for AI 0+
:
See also
Bit logic instructions (Page 18)
Note
Execution times
For indirect addressing and special addresses, you have to also add to the execution times a
time for loading of the address or the respective address.
See also:
• Examples of addressing (Page 13)
• Address types (Page 11)
Additional information
Detailed descriptions of the function are included in the STEP 7 reference manuals.
See also
Address types (Page 11)
Logic Instructions with Timers and Counters (Page 22)
Status word for: A(, AN(, O(, ON(, X(, XN(, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - Yes - Yes Yes
Instruction affects: - - - - - 0 1 - 0
Status word for: O, ON, X, XN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes Yes
Instruction affects: - - - - - 0 Yes Yes 1
1) With direct addressing; address range 0 to 255
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
See also
Address types (Page 11)
Status word for: AW, OW, XOW, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - Yes - Yes Yes
Instruction affects: - Yes 0 0 - 0 1 - 0
Status word for: AW, OW, XOW, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes 0 0 - - - - -
Status word for: A, AN, O, ON, X, XN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - Yes Yes - - Yes - Yes Yes
Instruction affects: - - - - - Yes Yes Yes 1
Status word for: A, AN, O, ON, X, XN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - Yes Yes - - Yes - Yes Yes
Instruction affects: - - - - - Yes Yes Yes 1
Status word for: A, AN, O, ON, X, XN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - Yes Yes - - Yes - Yes Yes
Instruction affects: - - - - - Yes Yes Yes 1
Status word for: FP, FN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - Yes -
Instruction affects: - - - - - Yes 1
See also
Address types (Page 11)
The RLO value is written to the specified address identifier. Note the MCR dependency (see
Instructions for the Master Control Relay (MCR) (Page 58)).
See also
Address types (Page 11)
Status word for: SP, SE, SD, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes -
Instruction affects: - - - - 0 - - 0
1) With direct addressing; timer no.: 0 to 255
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
Status word for: SS, SF, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes -
Instruction affects: - - - - 0 - - 0
1) With direct addressing; timer no.: 0 to 255
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
See also
Address types (Page 11)
Status word for: CD, FR, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes -
Instruction affects: - - - - 0 - - 0
1) With direct addressing; counter no.: 0 to 255
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
See also
Address types (Page 11)
If the address used cannot be evenly divided by 4, the execution times for instructions
specified on this page are doubled.
1) Plus acknowledgment time of the I/O module (> 1 μs), bus runtimes and synchronization
time in redundant mode
2) With indirect addressing; address range 0 to 127
3) With direct addressing; address range 0 to 255
4) I, Q, P, M, L / DB, DI
+ Plus time for loading the address (see Constants (Page 7))
See also
Address types (Page 11)
See also
Address types (Page 11)
+ plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
If the address used cannot be evenly divided by 4, the execution times for instructions
specified on this page are doubled.
1) Plus acknowledgment time of the I/O module (> 1 μs), bus runtimes and synchronization
time in redundant mode
2) With direct addressing; address range 0 to 127
3) With direct addressing; address range 0 to 255
4) I, Q, P, M, L / DB, DI
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
See also
Address types (Page 11)
Transfer a double word from address register 1 (AR1) or address register 2 (AR2) to a
memory or a register. The contents of ACCU1
are first saved to ACCU2. The status word is not affected.
See also
Status Word (Page 9)
Status word for: +I, -I, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: *I, /I, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: +D, -D, *D, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: +I, -I, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: +R, -R, *R, /R, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: NEGR, ABS, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - - - - - - -
Status word for: SQRT, SQR, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: LN, EXP, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: SIN, ASIN, COS, ACOS, TAN, ATAN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
3.18 Comparison Instructions with Integers (16/32 bit) or with 32-bit real
numbers
Comparison Instructions (16-bit Integers)
Comparing the 16-bit integers in ACCU1-L and ACCU2-L. RLO=1 if the condition is satisfied.
Status word for: ==I, < >I, <I, <=I, >I, >=I, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes 0 - 0 Yes Yes 1
Status word for: ==I, < >I, <I, <=I, >I, >=I, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes 0 - 0 Yes Yes 1
Status word for: ==R, < >R, <R, <=R, >R, >=R, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes 0 Yes Yes 1
Status word for SLW, SLD, SRW BR CC1 CC0 OV OS OR STA RL /FC
O
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes 0 0 - - - - -
1) Number of places shifted: 0 to 16
Status word for SLW, SLD, SRW BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes 0 0 - - - - -
1) Number of places shifted: 0 to 16
Status word for: RLD, RRD, RLDA, RRDA, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes 0 0 - - - - -
Status word for: BTI, BTD, DTR, ITD, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - - - - - - -
Status word for: ITB, DTB, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - Yes Yes - - - -
Status word for: RND, RND-, RND+, TRUNC, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - Yes Yes - - - -
Status word for: INVI, INVD BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - - - - - - -
Status word for: NEGI, NEGD, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - Yes Yes Yes Yes - - - -
Status word for: UC, CC, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - 3) -
Instruction affects: - - - - 0 0 1 - 3) 0
1) With direct addressing, block no. 0 to 255
+ Plus time for loading the address (see Execution Times with Indirect Addressing (Page 15))
2) If call is not executed
3) CC instruction: Depending on RLO, sets RLO = 1
See also
System Functions (SFC) (Page 63)
System Function Blocks (SFB) (Page 74)
Status word for: BE, BEU BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - - 0 0 1 - 0
Status word for: JC, JCN, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes -
Instruction affects: - - - - - 0 1 1 0
Status word for: JCB, JNB, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - Yes -
Instruction affects: Yes - - - - 0 1 1 0
1) If jump is not executed
Status word for: JBI, JNBI, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: Yes - - - - - - - -
Instruction affects: - - - - - 0 1 - 0
1) If jump is not executed
Status word for: JBI, JNBI, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - Yes - - - - -
Instruction affects: - - - - - - - - -
Status word for: JUO, JZ, JP, JM, JN, JMZ, JPZ, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - Yes Yes - - - - - -
Instruction affects: - - - - - - - - -
1) If jump is not executed
Status word for: JL, LOOP, BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on: - - - - - - - - -
Instruction affects: - - - - - - - - -
1) If jump is not executed
Internal DP 4 4
6 RD_SINFO Read start information of current OB 3 3
9 EN_MSG Enable block-related, symbol-related, 11 29
and group status messages. First call, REQ = 1
Last call 3 13
10 DIS_MSG Disable block-related, symbol-related, 11 29
and group status messages.
First call, REQ = 1
Last call 3 13
13 DPNRM_DG Reading diagnostics data of a DP slave 20 31
First call
Intermediate call 7 8
Last call (28 bytes) 9 13
14 DPRD_DAT Read consistent user data 8 19
via integrated DP interface, 3 bytes
Via integrated DP interface, 8 24
32 bytes
Via external DP interface, 3 bytes 16 25
Via external DP interface, 32 bytes 36 42
Via integrated 9 19
PROFINET interface, 8 bytes
Via integrated 9 24
PROFINET interface, 32 bytes
AI 8 * 13 Bit 29 51
27 UPDAT_PO Update outputs 9 13
(runtime entry for 1 DO 32 in central controller)
AO 8 * 13 Bit 26 49
28 SET_TINT Set time-of-day interrupt 6 15
29 CAN_TINT Cancel time-of-day interrupt 15 92
30 ACT_TINT Activate time-of-day Interrupt 5 13
1) Depending on the size of the SYS_INST target area and the number of system resources still to be read
2) Depending on the number of active messages (assigned system resources)
3) Depending on the number of active messages (assigned system resources) and the number of assigned instances with
PROFIBUS DP:
xxyyH: DP subnet ID/station
no.
PROFINET IO:
Slot address of PROFINET IO
device:
Bit 15: is always = 1
Bit 11-14: PN IO subsystem ID
(value range 100-115; in which
only 0 to 15 must be specified)
Bit 0-10: Station number of the
PROFINET IO device
Rack/station status information
0092H Expected state of the rack in the central configuration or
stations of a subnet
0000H Information about the state of the rack in the central
configuration
DP master system ID Information about the state of the stations in the subnet
0292H Actual state of the rack in the central configuration or
stations of a subnet
0000H Information about the state of the rack in the central
configuration
DP master system ID Information about the state of the stations in the subnet
0292H Status of the backup batteries in a rack of a CPU after at
least one battery has failed
0292H Status of the overall battery backup status of all
racks/module racks of a CPU
0292H Status of the 24-V power supply to all racks/module racks
of a CPU
0F92H
PQB, 6
PQD, 6
PQW, 6
C
C, 6 Q
Q, 5
D QB, 5
QD, 5
DB, 5 QW, 5
DBB, 5
DBD, 5
DBW, 5 S
DBX, 5
DI, 5 System function blocks, SFB, 74
DIB, 5 System Functions, SFC, 63
DID, 5
DIW, 5
DIX, 5 T
T, 6
I
I, 5
IB, 5
ID, 6
IW, 6
L
L, 6
LB, 6
LD, 6
LW, 6
M
M, 6
MB, 6
MD, 6
MW, 6
P
PIB, 6
PID, 6
PIW, 6