Technical data
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 193
8 Defining Symbols
8.1 Absolute and Symbolic Addressing
In a STEP 7 program you work with addresses such as I/O signals, bit memory, counters, timers,
data blocks, and function blocks. You can access these addresses in your program absolutely, but
your programs will be much easier to read if you use symbols for the addresses (for example,
Motor_A_On, or other identifiers according to the code system used within your company or
industry). An address in your user program can then be accessed via this symbol.
Absolute Addresses
An absolute address comprises an address identifier and a memory location (for example, Q 4.0,
I 1.1, M 2.0, FB21).
Symbolic Addresses
You can make your program easier to read and simplify troubleshooting if you assign symbolic
names to the absolute addresses.
STEP 7 can translate the symbolic names into the required absolute addresses automatically. If
you would prefer to access ARRAYs, STRUCTs, data blocks, local data, logic blocks, and
user-defined data types using symbolic names, you must first assign symbolic names to the
absolute addresses before you can address the data symbolically.
You can, for example, assign the symbolic name MOTOR_ON to the address Q 4.0 and then use
MOTOR_ON as an address in a program statement. Using symbolic addresses it is easier to
recognize to what extent the elements in the program match the components of your process
control project.
Note
Two consecutive underline characters (for example, MOTOR__ON) are not permitted in a symbolic
name (variable ID).