Technical data

Creating STL Source Files
13.3 Structure of Blocks in STL Source Files
Programming with STEP 7
286 Manual, 05/2010, A5E02789666-01
13.3 Structure of Blocks in STL Source Files
The blocks in STL source files are structured using keywords. Depending on the type of block,
there are differences in the structure of:
Logic blocks
Data blocks
User-defined data types (UDT)
13.3.1 Structure of Logic Blocks in STL Source Files
A logic block is made up of the following sections, each of which is identified by the corresponding
keyword:
Block start,
identified by keyword and block number or block name, for example
- "ORGANIZATION_BLOCK OB1" for an organization block,
- "FUNCTION_BLOCK FB6" for a function block, or
- "FUNCTION FC1 : INT" for a function. With functions the function type is also specified.
This can be an elementary or complex data type (with the exception of ARRAY and
STRUCT) and defines the data type of the return value (RET_VAL). If no value is to be
returned, the keyword VOID is given.
Optional block title introduced by the keyword "TITLE" (max. length of title: 64 characters)
Additional comments, beginning with a double slash // at the start of the line
Block properties (optional)
Variable declaration section
Code section, beginning with "BEGIN." The code section consists of one or more networks that
are identified by "NETWORK." You cannot enter a network number.
Optional network for each network used, introduced by the keyword "TITLE =" (max. length of
title: 64 characters)
Additional comments for each network, beginning with a double slash // at the start of the line
Block end, identified by END_ORGANIZATION_BLOCK, END_FUNCTION_BLOCK, or
END_FUNCTION
A blank must be placed between the block type and the block number. The symbolic block
name can be identified by quotation marks to ensure that the symbolic names of local variables
and names in the symbol table remain unique.