Scl Program Control Statements; Overview Of Scl Program Control Statements - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

7.8.9

SCL program control statements

7.8.9.1

Overview of SCL program control statements

Structured Control Language (SCL) provides three types of program control statements for
structuring your user program:
● Selective statements: A selective statement enables you to direct program execution into
● Loops: You can control loop execution using iteration statements. An iteration statement
● Program jumps: A program jump means an immediate jump to a specified jump
These program control statements use the syntax of the PASCAL programming language.
Table 7- 113 Types of SCL program control statements
Program control statement
Selective
IF-THEN statement
(Page 268)
CASE statement
(Page 269)
Loop
FOR statement
(Page 270)
WHILE-DO statement
(Page 271)
REPEAT-UNTIL
statement (Page 272)
Program jump
CONTINUE statement
(Page 273)
EXIT statement
(Page 273)
GOTO statement
(Page 274)
RETURN statement
(Page 274)
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
alternative sequences of statements.
specifies which parts of a program should be iterated depending on certain conditions.
destination and therefore to a different statement within the same block.
Description
Enables you to direct program execution into one of two alternative
branches, depending on a condition being TRUE or FALSE
Enables the selective execution into 1 of
on the value of a variable
Repeats a sequence of statements for as long as the control variable
remains within the specified value range
Repeats a sequence of statements while an execution condition
continues to be satisfied
Repeats a sequence of statements until a terminate condition is met
Stops the execution of the current loop iteration
Exits a loop at any point regardless of whether the terminate condition
is satisfied or not
Causes the program to jump immediately to a specified label
Causes the program to exit the block currently being executed and to
return to the calling block
Basic instructions
7.8 Program control operations
n
alternative branches, based
267

Advertisement

Table of Contents
loading

Table of Contents