Technical data

Creating STL Source Files
13.4 Syntax and Formats for Blocks in STL Source Files
Programming with STEP 7
290 Manual, 05/2010, A5E02789666-01
13.4.3 Format Table of Functions
The following table shows a brief list of the format for functions in an STL source file:
Structure Description
"FUNCTION" fc_no : fc_type or
fc_name : fc_type
fc_no is the block number, for example FC5;
fc_name is the symbolic name of the block as defined in the
symbol table;
fc_type is the data type of the return value (RET_VAL) of the
function. This can be an elementary or complex data type (with
the exception of ARRAY and STRUCT) or VOID.
If you want to use system attributes
for the return value (RET_VAL), you must enter the system
attributes for parameters in front of the colon for the data
declaration.
[TITLE= ]
Block title (entries longer than 64 characters are cut off)
[Block comment] Comments can be entered after "//"
[System attributes for blocks] System attributes for blocks
[Block properties] Block properties
Variable declaration section Declaration of input, output, and in/out parameters, and
temporary variables
"BEGIN" Keyword to separate the variable declaration section from the
list of STL instructions
NETWORK Start of a network
[TITLE= ] Network title (max. 64 characters)
[Network comment] Comments can be entered after "//"
List of STL instructions Block instructions
"END_FUNCTION" Keyword to end function