Technical data

Defining Symbols
8.2 Shared and Local Symbols
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 195
8.2 Shared and Local Symbols
A symbol allows you to work with meaningful symbolic names instead of absolute addresses. The
combination of short symbols and longer comments can be used effectively to make programming
easier and program documentation better.
You should distinguish between local (block-specific) and shared symbols.
Shared Symbols Local Symbols
Validity Is valid in the whole user program,
Can be used by all blocks,
Has the same meaning in all blocks,
Must be unique in the whole user program.
Only known to the block in which
it was defined,
The same symbol can be used in
different blocks for different
purposes.
Permitted
characters
Letters, numbers, special characters,
Accents other than 0x00, 0xFF, and quotation
marks,
The symbol must be placed within quotation
marks if you use special characters.
Letters,
Numbers,
Underscore (_).
Use
You can define shared symbols for
:
I/O signals (I, IB, IW, ID, Q, QB, QW, QD)
I/O inputs and outputs (PI, PQ)
Bit memory (M, MB, MW, MD)
Timers (T)/ counters (C)
Logic blocks (OB, FB, FC, SFB, SFC)
Data blocks (DB)
User-defined data types (UDT)
Variable table (VAT)
You can define local symbols for:
Block parameters (input,
output, and in/out parameters),
Static data of a block,
Temporary data of a block.
Defined where? Symbol table Variable declaration table for the
block