Technical data
Creating STL Source Files
13.2 Rules for Programming in STL Source Files
Programming with STEP 7
280 Manual, 05/2010, A5E02789666-01
13.2 Rules for Programming in STL Source Files
13.2.1 Rules for Entering Statements in STL Source Files
An STL source file consists mainly of continuous text. To enable the file to be compiled into blocks,
you must observe certain structures and syntax rules.
The following general guidelines apply to creating user programs as STL source files:
Topic Rule
Syntax The syntax of the STL statements is the same as in the incremental Statement List
editor. One exception to this is the CALL instruction.
CALL In a source file, you enter parameters in brackets. The individual parameters are
separated by a comma.
Example: FC call (one line)
CALL FC10 (param1 :=I0.0,param2 :=I0.1);
Example: FB call (one line)
CALL FB10, DB100 (para1 :=I0.0,para2 :=I0.1);
Example: FB call (more than one line)
CALL FB10, DB100 (
para1 :=I0.0,
para2 :=I0.1);
Note:
When calling a block, transfer the parameters in the defined order in the ASCII Editor.
Otherwise the comment assignment for these lines may not match in the STL and
source file views.
Upper/lower case The editor in this application is not case-sensitive, the exception to this being system
attributes and jump labels. When entering strings (data type STRING) you must also
observe upper and lower case.
Keywords are shown in upper case. When compiled, upper and lower case are not
observed; therefore you can enter keywords in upper or lower case or a mixture of the
two.
Semicolon Designate the end of every STL statement and every variable declaration with a
semicolon (;). You can enter more than one statement per line.
Double slash (//) Begin every comment with a double slash (//) and end the comment with RETURN (or
line feed).