Programming concepts
5.5 Symbol table
S7-200 SMART
100 System Manual, 09/2015, A5E03822230-AC
A symbol is a symbolic name you assign to a memory address or a constant. You can create
symbol names for the following memory types: I, Q, M, SM, AI, AQ, V, S, C, T, HC. Symbols
defined in the symbol table are global in scope. You can use your defined symbols in all of
the Program Organizational Units (Page 87) (POUs) of your program. If you make a variable
name assignment in a variable table (Page 104), the variable is local in scope. It only applies
to the POU where you defined it. This type of symbol is referred to as a "local variable" to
differentiate it from symbols that are global in scope. You can define symbols either before or
after you create your program logic.
Risks with STEP 7-Micro/WIN Version 4.0 or greater (.mwp files) with absolute special
memory (SM) addressing
If an earlier version of STEP 7-Micro/WIN (.mwp file) uses symbolic SM addressing in the
OB, and the System Symbols table is generated, the symbols will map properly to the new
addresses. However, if the .mwp file uses absolute SM addressing in the OB, those
absolute SM addresses will not map to the new SM addresses.
This incorrect mapping of SM addresses can result in unexpected machine or process
operation, which may cause death or serious injury to personnel, and/or damage to
equipment.
Delete the "S7-200 Symbols" table and generate a SMART "System Symbols" table. The
symbols in the
OB will map to the new SM address scheme in the SMART System Symbols
table.
To open a symbol table, use one of the following methods:
● Click the Symbol Table
button on the navigation bar (Page 23).
● Select "Symbol Table" from the component drop down list in the Windows area of the
View menu.
● Open the Symbol Table Folder in the project tree (Page 29), select a table name, then
press Enter or double-click the table name.
You can also use symbols from the System symbol table in your project. The pre-defined
table of system symbols provides access to commonly used PLC system functions. PLC
system symbols associate a function name with the PLC special memory locations used to
invoke that function.