04/99
Symbolic Addressing
Getting Started with C7-621-AS-i
47
Symbolic Addressing
When programming with STEP 7 you work with operands such as I/O signals, bit memories, counters,
timers, data blocks and function blocks. So far you have addressed these operands in your program
absolutely (e.g. on DB46). However, it is helpful to assign symbolic names for them (e.g. on DB_OP, Belt
control). In the declaration section of the data block, you have already defined the symbolic alphanumeric
names for your data elements in the memory block DB1, and defined the DB1 via the structure of UDT1.
If the symbol name of the data block is accessed symbolically, this name must be entered in the symbol
list. This allows full symbolic access to a data element in the data block. To define the symbolic names,
proceed as follows:
In the SIMATIC Manager select in the
S7 Program(1)
folder the
Symbols
folder and open it with a
double click. The Symbol Editor with the symbol table is displayed.
In the symbol table, activate the first field in the
Symbol
column by clicking on it, and enter a symbol
name (e.g. DB_OP).
Jump to the
Address
column using the TAB key and assign an address (e.g. DB 46) to the symbol
name.
Skip the
Data type
column by pressing the TAB key twice. A default value (e.g. WORD) is
automatically entered for the data type and the
Comment
field becomes active.
Enter a comment in the comment field and press the TAB key again. The second field in the Symbol
column becomes active. Repeat the steps to enter additional symbol names. When you have
finished, save the symbol table and close the Symbol Editor.
Note
Although long symbolic names are more descriptive, they take longer to edit. With a combination of short
symbolic names and detailed comments, you can satisfy the requirements of both good program docu-
mentation and effective program creation.