hit counter script

Siemens SIMATIC S7 System Manual page 147

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

In the section of the SCL code block you can declare the following types of parameters:
● Input, Output, InOut, and Ret_Val: These parameters define the input tags, output tags,
● Static (FBs only; the illustration above is for an FC): Static tags are used for storage of
● Temp: These parameters are the temporary tags that are used during the execution of
If you call the SCL code block from another code block, the parameters of the SCL code
block appear as inputs or outputs.
In this example, the tags for "Start" and "On" (from the project tag table) correspond to
"StartStopSwitch" and "RunYesNo" in the declaration table of the SCL program.
Constructing an SCL expression
An SCL expression is a formula for calculating a value. The expression consists of operands
and operators (such as *, /, + or -). The operands can be tags, constants, or expressions.
The evaluation of the expression occurs in a certain order, which is defined by the following
factors:
● Every operator has a pre-defined priority, with the highest-priority operation performed
● For operators with equal priority, the operators are processed in a left-to-right sequence.
● You use parentheses to designate a series of operators to be evaluated together.
The result of an expression can be used either for assigning a value to a tag used by your
program, as a condition to be used by a control statement, or as parameters for another SCL
instruction or for calling a code block.
Table 6- 2
Operators in SCL
Type
Parentheses
Math
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
and return value for the code block. The tag name that you enter here is used locally
during the execution of the code block. You typically would not use the global tag name in
the tag table.
static intermediate results in the instance data block. Static data is retained until
overwritten, which may be after several cycles. The names of the blocks, which are called
in this code block as multi-instance, are also stored in the static local data.
the code block.
first.
Operation
Expression
(
)
Power
Sign (unary plus)
Sign (unary minus)
Multiplication
Division
99BProgramming concepts
6.5 Programming language
Operator
( , )
**
+
-
*
/ or DIV
Priority
1
2
3
3
4
4
147

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents

Save PDF