s Preface, Contents Bit Logic Instructions 1 Comparison Instructions 2 Conversion Instructions 3 Counter Instructions 4 Data Block Instructions
Contents Statement List (STL) for S7-300 and S7-400 Programming x A5E00706960-01 10.10 Call Multiple Instance...
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-6 A5E00706960-01 7.6 /I Divide ACCU 2 by ACCU 1 as Integer (1
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-7 Example: 13 divided by 4 Contents of ACCU 2-L bef
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-8 A5E00706960-01 7.7 + Add Integer Constant (16, 32-Bit) Form
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-9 Example 3 STL Explanation L MD20 L MD24 +D
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-10 A5E00706960-01 7.8 +D Add ACCU 1 and ACCU 2 as Double Inte
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-11 7.9 -D Subtract ACCU 1 from ACCU 2 as Double
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-12 A5E00706960-01 7.10 *D Multiply ACCU 1 and ACCU 2 as Doubl
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-13 7.11 /D Divide ACCU 2 by ACCU 1 as Double In
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-14 A5E00706960-01 Example STL Explanation L ID10 //Load the v
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-15 7.12 MOD Division Remainder Double Integer (
Contents Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 xi 14 Accumulator Instructions 14-1 14.1 Overview of Accumulator and
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-16 A5E00706960-01 Example STL Explanation L ID10 //Load the va
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-1 8 Floating-Point Math Instructions 8.1 Overview of Floating-Point Math In
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-2 A5E00706960-01 8.2 Evaluating the Bits of the Status Wo
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-3 8.3 Floating-Point Math Instructions: Ba
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-4 A5E00706960-01 Status word BR CC 1 CC 0 OV OS O
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-5 8.3.2 -R Subtract ACCU 1 from ACCU 2
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-6 A5E00706960-01 Example STL Explanation OPN DB10 L
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-7 8.3.3 *R Multiply ACCU 1 and ACCU 2 a
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-8 A5E00706960-01 8.3.4 /R Divide ACCU 2 by ACCU 1 as a
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-9 8.3.5 ABS Absolute Value of a Floatin
Contents Statement List (STL) for S7-300 and S7-400 Programming xii A5E00706960-01
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-10 A5E00706960-01 8.4 Floating-Point Math Instructions: E
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-11 8.4.2 SQRT Generate the Square Root
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-12 A5E00706960-01 8.4.3 EXP Generate the Exponential V
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-13 8.4.4 LN Generate the Natural Logari
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-14 A5E00706960-01 8.4.5 SIN Generate the Sine of Angle
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-15 8.4.6 COS Generate the Cosine of Ang
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-16 A5E00706960-01 8.4.7 TAN Generate the Tangent of An
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-17 8.4.8 ASIN Generate the Arc Sine of
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-18 A5E00706960-01 8.4.9 ACOS Generate the Arc Cosine o
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 8-19 8.4.10 ATAN Generate the Arc Tangent
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-1 1 Bit Logic Instructions 1.1 Overview of Bit Logic Instructions Descripti
Floating-Point Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 8-20 A5E00706960-01
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-1 9 Load and Transfer Instructions 9.1 Overview of Load and Transfer Instru
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-2 A5E00706960-01 9.2 L Load Format L <address> A
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-3 Contents of ACCU 1 Contents of ACCU 1 A
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-4 A5E00706960-01 9.3 L STW Load Status Word into ACCU 1
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-5 9.4 LAR1 Load Address Register 1 from A
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-6 A5E00706960-01 9.5 LAR1 <D> Load Address Registe
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-7 9.6 LAR1 AR2 Load Address Register 1 fr
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-8 A5E00706960-01 9.8 LAR2 <D> Load Address Registe
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-9 9.9 T Transfer Format T <address>
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-2 A5E00706960-01 You can terminate a Boolean bit logic string by usi
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-10 A5E00706960-01 9.10 T STW Transfer ACCU 1 into Status
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-11 9.11 CAR Exchange Address Register 1 w
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-12 A5E00706960-01 9.13 TAR1 <D> Transfer Address R
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 9-13 9.14 TAR1 AR2 Transfer Address Registe
Load and Transfer Instructions Statement List (STL) for S7-300 and S7-400 Programming 9-14 A5E00706960-01 9.16 TAR2 <D> Transfer Address R
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-1 10 Program Control Instructions 10.1 Overview of Program Control Instruc
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-2 A5E00706960-01 10.2 BE Block End Format BE Description
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-3 10.3 BEC Block End Conditional Format BE
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-4 A5E00706960-01 10.4 BEU Block End Unconditional Format
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-5 10.5 CALL Block Call Format CALL <log
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-3 1.2 A And Format A <Bit> Address Data
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-6 A5E00706960-01 The IN parameters can be specified as consta
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-7 10.6 Call FB Format CALL FB n1, DB n1 Descri
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-8 A5E00706960-01 Example 1: FB99 call with instance data bloc
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-9 10.7 Call FC Format CALL FC n Note If you
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-10 A5E00706960-01 Example: Assigning parameters to the FC6 ca
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-11 10.8 Call SFB Format CALL SFB n1, DB n2 Des
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-12 A5E00706960-01 Example CALL SFB4,DB4 Formal parameter
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-13 10.9 Call SFC Format CALL SFC n Note If
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-14 A5E00706960-01 10.10 Call Multiple Instance Format CALL #
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-15 10.12 CC Conditional Call Format CC <
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-4 A5E00706960-01 1.3 AN And Not Format N <Bit> Address
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-16 A5E00706960-01 10.13 UC Unconditional Call Format UC &
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-17 10.14 MCR (Master Control Relay) Important
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-18 A5E00706960-01 MCRA - Activate MCR Area, MCRD - Deactivat
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-19 10.15 Important Notes on Using MCR Function
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-20 A5E00706960-01 10.16 MCR( Save RLO in MCR Stack, Begin
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-21 Example STL Explanation MCRA //Activat
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-22 A5E00706960-01 10.17 )MCR End MCR Important Notes on U
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 10-23 10.18 MCRA Activate MCR Area Important
Program Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 10-24 A5E00706960-01 10.19 MCRD Deactivate MCR Area Importan
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-1 11 Shift and Rotate Instructions 11.1 Shift Instructions 11.1.1 Overview
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-5 1.4 O Or Format O <Bit> Address Data t
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-2 A5E00706960-01 11.1.2 SSI Shift Sign Integer (16-Bit)
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-3 Example 1 STL Explanation L MW4 //Load
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-4 A5E00706960-01 11.1.3 SSD Shift Sign Double Integer (3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-5 Examples Contents ACCU1-H ACCU1-L Bit 3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-6 A5E00706960-01 11.1.4 SLW Shift Left Word (16-Bit) For
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-7 Examples Contents ACCU1-H ACCU1-L Bit 3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-8 A5E00706960-01 11.1.5 SRW Shift Right Word (16-Bit) Fo
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-9 Examples Contents ACCU1-H ACCU1-L Bit 3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-10 A5E00706960-01 11.1.6 SLD Shift Left Double Word (32-
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-11 Examples Contents ACCU1-H ACCU1-L Bit
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-6 A5E00706960-01 1.5 ON Or Not Format ON <Bit> Address D
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-12 A5E00706960-01 11.1.7 SRD Shift Right Double Word (32
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-13 Examples Contents ACCU1-H ACCU1-L Bit
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-14 A5E00706960-01 11.2 Rotate Instructions 11.2.1 Overview o
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-15 11.2.2 RLD Rotate Left Double Word (32
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-16 A5E00706960-01 Examples Contents ACCU1-H ACCU1-L Bit
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-17 11.2.3 RRD Rotate Right Double Word (3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-18 A5E00706960-01 Examples Contents ACCU1-H ACCU1-L Bit 3
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 11-19 11.2.4 RLDA Rotate ACCU 1 Left via CC
Shift and Rotate Instructions Statement List (STL) for S7-300 and S7-400 Programming 11-20 A5E00706960-01 11.2.5 RRDA Rotate ACCU 1 Right via CC
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-1 12 Timer Instructions 12.1 Overview of Timer Instructions Description Yo
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-7 1.6 X Exclusive Or Format X <Bit> Addres
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-2 A5E00706960-01 12.2 Location of a Timer in Memory and Components of
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-3 Time Base Bits 12 and 13 of the timer word contain the
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-4 A5E00706960-01 Choosing the right Timer This overview is intended to
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-5 12.3 FR Enable Timer (Free) Format FR <timer>
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-6 A5E00706960-01 RLO at enable inputRLO at start inputRLO at reset inpu
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-7 12.4 L Load Current Timer Value into ACCU 1 as Int
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-8 A5E00706960-01 20212223242526272829210211212213214215Time value (0 to
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-9 12.5 LC Load Current Timer Value into ACCU 1 as BC
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-10 A5E00706960-01 20212223242526272829210211212213214215Time value (0 t
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-11 12.6 R Reset Timer Format R <timer> Addre
Siemens AG Automation and Drives Postfach 4848 90437 NÜRNBERG GERMANY A5E00706960-01 03/2006 Copyright © Siemens AG 2006 Technical data subject to
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-8 A5E00706960-01 1.7 XN Exclusive Or Not Format XN <Bit>
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-12 A5E00706960-01 12.7 SP Pulse Timer Format SP <timer> Ad
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-13 I 2.0I 2.1I 2.2Q 4.0 t = programmed time intervalt
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-14 A5E00706960-01 12.8 SE Extended Pulse Timer Format SE <timer
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-15 t = programmed time intervalI 2.0I 2.1I 2.2Q 4.0 t
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-16 A5E00706960-01 12.9 SD On-Delay Timer Format SD <timer>
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-17 I 2.0I 2.1I 2.2 t =programmed time interval ttQ 4.
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-18 A5E00706960-01 12.10 SS Retentive On-Delay Timer Format SS <
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-19 I 2.0I 2.1I 2.2t = programmed time intervalQ 4.0tStar
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-20 A5E00706960-01 12.11 SF Off-Delay Timer Format SF <timer>
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 12-21 t = programmed time intervalI 2.0I 2.1I 2.2Q 4.0
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-9 1.8 O And before Or Format O Description The O
Timer Instructions Statement List (STL) for S7-300 and S7-400 Programming 12-22 A5E00706960-01
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-1 13 Word Logic Instructions 13.1 Overview of Word Logic Instructions Desc
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-2 A5E00706960-01 13.2 AW AND Word (16-Bit) Format AW AW <c
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-3 Examples Bit 15 . . . . . . . . . . 0 ACCU
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-4 A5E00706960-01 13.3 OW OR Word (16-Bit) Format OW OW <co
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-5 Examples Bit 15 . . . . . . . . . . 0 ACCU
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-6 A5E00706960-01 13.4 XOW Exclusive OR Word (16-Bit) Format X
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-7 Examples Bit 15 . . . . . . . . . . 0 ACCU
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-8 A5E00706960-01 13.5 AD AND Double Word (32-Bit) Format AD A
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-9 Examples Bit 31 . . . . . . . . . . . .
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-10 A5E00706960-01 1.9 A( And with Nesting Open Format A( Descri
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-10 A5E00706960-01 13.6 OD OR Double Word (32-Bit) Format OD O
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-11 Examples Bit 31 . . . . . . . . . . . .
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-12 A5E00706960-01 13.7 XOD Exclusive OR Double Word (32-Bit) F
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 13-13 Examples Bit 31 . . . . . . . . . . . .
Word Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 13-14 A5E00706960-01
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-1 14 Accumulator Instructions 14.1 Overview of Accumulator and Address Regi
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-2 A5E00706960-01 14.2 TAK Toggle ACCU 1 with ACCU 2 Format TA
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-3 14.3 POP CPU with Two ACCUs Format POP Descri
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-4 A5E00706960-01 14.4 POP CPU with Four ACCUs Format POP Desc
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-5 14.5 PUSH CPU with Two ACCUs Format PUSH Desc
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-11 1.10 AN( And Not with Nesting Open Format AN(
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-6 A5E00706960-01 14.6 PUSH CPU with Four ACCUs Format PUSH De
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-7 14.7 ENT Enter ACCU Stack Format ENT Descript
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-8 A5E00706960-01 14.9 INC Increment ACCU 1-L-L Format INC <
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-9 14.10 DEC Decrement ACCU 1-L-L Format DEC <
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-10 A5E00706960-01 14.11 +AR1 Add ACCU 1 to Address Register 1
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-11 14.12 +AR2 Add ACCU 1 to Address Register 2
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-12 A5E00706960-01 14.13 BLD Program Display Instruction (Null
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 14-13 14.15 NOP 1 Null Instruction Format NOP 1 De
Accumulator Instructions Statement List (STL) for S7-300 and S7-400 Programming 14-14 A5E00706960-01
A Overview of All STL Instructions A.1 STL Instructions Sorted According to German Mnemonics (SIMATIC) German Mnemonics English Mnemonics Program
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-12 A5E00706960-01 1.12 ON( Or Not with Nesting Open Format ON(
Overview of All STL Instructions German Mnemonics English Mnemonics Program Elements Catalog Description ? R ? R Compare Compare Floating-Point Nu
Overview of All STL Instructions German Mnemonics English Mnemonics Program Elements Catalog Description INVD INVD Convert Ones Complement Double
Overview of All STL Instructions German Mnemonics English Mnemonics Program Elements Catalog Description NEGI NEGI Convert Twos Complement Integer
Overview of All STL Instructions German Mnemonics English Mnemonics Program Elements Catalog Description SET SET Bit logic Instruction Set SI SP
Overview of All STL Instructions German Mnemonics English Mnemonics Program Elements Catalog Description TAR1 TAR1 Load/Transfer Transfer Address Regi
Overview of All STL Instructions A.2 STL Instructions Sorted According to English Mnemonics (International) English Mnemonics German Mnemonics Pro
Overview of All STL Instructions English Mnemonics German Mnemonics Program Elements Catalog Description ACOS ACOS Floating point Instruction Generat
Overview of All STL Instructions English Mnemonics German Mnemonics Program Elements Catalog Description FR FR Timers Enable Timer (Free) INC
Overview of All STL Instructions English Mnemonics German Mnemonics Program Elements Catalog Description LC LC Counters Load Current Counter Valu
Overview of All STL Instructions English Mnemonics German Mnemonics Program Elements Catalog Description R R Timers Reset Timer (the current timer
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-13 1.14 XN( Exclusive Or Not with Nesting Open Fo
Overview of All STL Instructions English Mnemonics German Mnemonics Program Elements Catalog Description TAR2 TAR2 Load/Transfer Transfer Address Reg
B Programming Examples B.1 Overview of Programming Examples Practical Applications Each statement list instruction triggers a specific operation. Wh
Programming Examples B.2 Example: Bit Logic Instructions Example 1: Controlling a Conveyor Belt The following figure shows a conveyor belt that can b
Programming Examples Absolute and symbolic Programming You can write a program to control the conveyor belt using absolute values or symbols that rep
Programming Examples Statement List to control the Conveyor Belt STL Explanation O I 1.1 //Pressing either start switch turns the motor on. O I 1.3
Programming Examples Absolute and symbolic Programming You can write a program to activate a direction display for the conveyor belt system using abs
Programming Examples Statement List (STL) for S7-300 and S7-400 Programming B-6 A5E00706960-01 Statement List STL Explanation A I 0.0 //If th
Programming Examples B.3 Example: Timer Instructions Clock Pulse Generator You can use a clock pulse generator or flasher relay when you need to pro
Programming Examples The negated (inverted) RLO: 01250 ms Every 250 ms the RLO bit is 0. Then the BEC statement does not end the processing of the bl
Programming Examples Signal states of the Bits of Memory MB 101 Scan Cycle Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Time Value in ms
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-14 A5E00706960-01 1.15 ) Nesting Closed Format ) Description )
Programming Examples B.4 Example: Counter and Comparison Instructions Storage Area with Counter and Comparator The following figure shows a system wi
Programming Examples Statement List that Activates the Indicator Lamps on the Display Panel STL Explanation A I 0.0 //Each pulse generated by p
Programming Examples B.5 Example: Integer Math Instructions Solving a Math Problem The sample program shows you how to use three integer math instruc
Programming Examples B.6 Example: Word Logic Instructions Heating an Oven The operator of the oven starts the oven heating by pushing the start push
Programming Examples Statement List (STL) for S7-300 and S7-400 Programming B-14 A5E00706960-01
C Parameter Transfer The parameters of a block are transferred as a value. With function blocks a copy of the actual parameter value in the instance
Parameter Transfer Statement List (STL) for S7-300 and S7-400 Programming C-2 A5E00706960-01
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 Index-1 Index ) ) ... 1-
Index Statement List (STL) for S7-300 and S7-400 Programming Index-2 A5E00706960-01 CAW ... 3-13 C
Index Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 Index-3 I -I ...
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-15 Example Statement List ProgramA(OI 0.0O M 10.0)=Q
Index Statement List (STL) for S7-300 and S7-400 Programming Index-4 A5E00706960-01 Multiply ACCU 1 and ACCU 2 as Integer (16-Bit) ...
Index Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 Index-5 SLD... 11-10, 11-11 SLW..
Index Statement List (STL) for S7-300 and S7-400 Programming Index-6 A5E00706960-01
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-16 A5E00706960-01 1.16 = Assign Format <Bit> Address D
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-17 1.17 R Reset Format R <Bit> Address D
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 iii Preface Purpose This manual is your guide to creating user programs in the
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-18 A5E00706960-01 1.18 S Set Format S <Bit> Address Dat
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-19 1.19 NOT Negate RLO Format NOT Description N
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-20 A5E00706960-01 1.20 SET Set RLO (=1) Format SET Description
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-21 1.21 CLR Clear RLO (=0) Format CLR Descriptio
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-22 A5E00706960-01 1.22 SAVE Save RLO in BR Register Format SAVE
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-23 1.23 FN Edge Negative Format FN <Bit> A
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-24 A5E00706960-01 Example If the programmable logic controller dete
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 1-25 1.24 FP Edge Positive Format FP <Bit>
Bit Logic Instructions Statement List (STL) for S7-300 and S7-400 Programming 1-26 A5E00706960-01 Example If the programmable logic controller dete
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 2-1 2 Comparison Instructions 2.1 Overview of Comparison Instructions Descript
Preface Statement List (STL) for S7-300 and S7-400 Programming iv A5E00706960-01 Requirements To use the Statement List manual effectively, you shou
Comparison Instructions Statement List (STL) for S7-300 and S7-400 Programming 2-2 A5E00706960-01 2.2 ? I Compare Integer (16-Bit) Format ==I, &l
Comparison Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 2-3 2.3 ? D Compare Double Integer (32-Bit) Format =
Comparison Instructions Statement List (STL) for S7-300 and S7-400 Programming 2-4 A5E00706960-01 2.4 ? R Compare Floating-Point Number (32-Bit)
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-1 3 Conversion Instructions 3.1 Overview of Conversion Instructions Descript
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-2 A5E00706960-01 3.2 BTI BCD to Integer (16-Bit) Format BTI Des
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-3 3.3 ITB Integer (16-Bit) to BCD Format ITB Desc
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-4 A5E00706960-01 3.4 BTD BCD to Integer (32-Bit) Format BTD Des
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-5 3.5 ITD Integer (16 Bit) to Double Integer (32-
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-6 A5E00706960-01 3.6 DTB Double Integer (32-Bit) to BCD Format
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-7 3.7 DTR Double Integer (32-Bit) to Floating-Poin
Preface Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 v Online Help The manual is complemented by an online help which is in
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-8 A5E00706960-01 3.8 INVI Ones Complement Integer (16-Bit) Form
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-9 3.9 INVD Ones Complement Double Integer (32-Bit
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-10 A5E00706960-01 3.10 NEGI Twos Complement Integer (16-Bit) Fo
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-11 3.11 NEGD Twos Complement Double Integer (32-B
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-12 A5E00706960-01 3.12 NEGR Negate Floating-Point Number (32-Bi
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-13 3.13 CAW Change Byte Sequence in ACCU 1-L (16-
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-14 A5E00706960-01 3.14 CAD Change Byte Sequence in ACCU 1 (32-B
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-15 3.15 RND Round Format RND Description RND (co
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-16 A5E00706960-01 3.16 TRUNC Truncate Format TRUNC Description
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 3-17 3.17 RND+ Round to Upper Double Integer Format
Preface Statement List (STL) for S7-300 and S7-400 Programming vi A5E00706960-01 Technical Support You can reach the Technical Support for all A&am
Conversion Instructions Statement List (STL) for S7-300 and S7-400 Programming 3-18 A5E00706960-01 3.18 RND- Round to Lower Double Integer Forma
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 4-1 4 Counter Instructions 4.1 Overview of Counter Instructions Description
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming 4-2 A5E00706960-01 4.2 FR Enable Counter (Free) Format FR <counte
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 4-3 4.3 L Load Current Counter Value into ACCU 1 Form
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming 4-4 A5E00706960-01 4.4 LC Load Current Counter Value into ACCU 1 as
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 4-5 4.5 R Reset Counter Format R <counter> Add
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming 4-6 A5E00706960-01 4.6 S Set Counter Preset Value Format S <count
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 4-7 4.7 CU Counter Up Format CU <counter> Addr
Counter Instructions Statement List (STL) for S7-300 and S7-400 Programming 4-8 A5E00706960-01 4.8 CD Counter Down Format CD <counter> Ad
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 5-1 5 Data Block Instructions 5.1 Overview of Data Block Instructions Descri
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 vii Contents 1 Bit Logic Instructions 1-1 1.1 Overview of Bit Logic Instructio
Data Block Instructions Statement List (STL) for S7-300 and S7-400 Programming 5-2 A5E00706960-01 5.2 OPN Open a Data Block Format OPN <data
Data Block Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 5-3 5.3 CDB Exchange Shared DB and Instance DB For
Data Block Instructions Statement List (STL) for S7-300 and S7-400 Programming 5-4 A5E00706960-01 5.4 L DBLG Load Length of Shared DB in ACCU 1
Data Block Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 5-5 5.6 L DILG Load Length of Instance DB in ACCU
Data Block Instructions Statement List (STL) for S7-300 and S7-400 Programming 5-6 A5E00706960-01
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-1 6 Logic Control Instructions 6.1 Overview of Logic Control Instructions D
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-2 A5E00706960-01 The following jump instructions interrupt the
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-3 6.2 JU Jump Unconditional Format JU <ju
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-4 A5E00706960-01 6.3 JL Jump to Labels Format JL <jump la
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-5 6.4 JC Jump if RLO = 1 Format JC <jump l
Contents Statement List (STL) for S7-300 and S7-400 Programming viii A5E00706960-01 3.16 TRUNC Truncate...
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-6 A5E00706960-01 6.5 JCN Jump if RLO = 0 Format JCN <jump
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-7 6.6 JCB Jump if RLO = 1 with BR Format JCB
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-8 A5E00706960-01 6.7 JNB Jump if RLO = 0 with BR Format JNB
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-9 6.8 JBI Jump if BR = 1 Format JBI <jump
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-10 A5E00706960-01 6.9 JNBI Jump if BR = 0 Format JNBI <ju
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-11 6.10 JO Jump if OV = 1 Format JO <jump
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-12 A5E00706960-01 6.11 JOS Jump if OS = 1 Format JOS <ju
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-13 6.12 JZ Jump if Zero Format JZ <jump la
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-14 A5E00706960-01 6.13 JN Jump if Not Zero Format JN <jum
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-15 6.14 JP Jump if Plus Format JP <jump la
Contents Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 ix 8 Floating-Point Math Instructions 8-1 8.1 Overview of Floating-P
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-16 A5E00706960-01 6.15 JM Jump if Minus Format JM <jump l
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-17 6.16 JPZ Jump if Plus or Zero Format JPZ &
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-18 A5E00706960-01 6.17 JMZ Jump if Minus or Zero Format JMZ
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 6-19 6.18 JUO Jump if Unordered Format JUO <
Logic Control Instructions Statement List (STL) for S7-300 and S7-400 Programming 6-20 A5E00706960-01 6.19 LOOP Loop Format LOOP <jump label&
Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-1 7 Integer Math Instructions 7.1 Overview of Integer Math Instructions De
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-2 A5E00706960-01 7.2 Evaluating the Bits of the Status Word with
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-3 7.3 +I Add ACCU 1 and ACCU 2 as Integer (16-B
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming 7-4 A5E00706960-01 7.4 -I Subtract ACCU 1 from ACCU 2 as Intege
Integer Math Instructions Statement List (STL) for S7-300 and S7-400 Programming A5E00706960-01 7-5 7.5 *I Multiply ACCU 1 and ACCU 2 as Integer
Comments to this Manuals