EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
8.8 Program control operations
S7-1200 Programmable controller
318 System Manual, V4.2, 09/2016, A5E02486680-AK
8.8.10.3
CASE statement
Table 8- 155 Elements of the CASE statement
SCL
Description
CASE "Test_Value" OF
"ValueList": Statement[; Statement, ...]
"ValueList": Statement[; Statement, ...]
[ELSE
Else-statement[; Else-statement, ...]]
END_CASE;
The CASE statement executes one of several
groups of statements, depending on the value
of an expression.
Table 8- 156 Parameters
Parameter
Description
"Test_Value"
Required. Any numeric expression of data type Int
"ValueList" Required. A single value or a comma-separated list of values or ranges of values. (Use two
periods to define a range of values: 2..8) The following example illustrates the different vari-
ants of the value list:
1: Statement_A;
2, 4: Statement _B;
3, 5..7,9: Statement _C;
Statement Required. One or more statements that are executed when "Test_Value" matches any value
in the value list
Else-statement Optional. One or more statements that are executed if no match with a value of the "Val-
ueList" stated matches

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals