Technical data
Programming with Symbols
3.2 Symbolic Programming
In the symbol table, you assign a symbolic name and the data type to all the
absolute addresses which you will address later on in your program; for example,
for input I 0.1 the symbolic name Key 1. These names apply to all parts of the
program and are known as global variables.
Using symbolic programming, you can considerably improve the legibility of the
S7 program you have created.
Working with the Symbol Editor
Navigate in the project window "Getting
Started" until you reach
S7 Program (1) and double-click to
open the Symbols component.
Your symbol table currently only
consists of the predefined organization
block OB1.
Click Cycle Execution and overwrite it
with "Main Program" for our example.
Enter "Green Light" and "Q 4.0" in
row 2. The data type is added
automatically.
Click in the comment column of row 1
or 2 to enter a comment on the symbol.
You complete your entries in a row by
pressing Enter, which then adds a new
row.
Enter "Red Light" and "Q 4.1" in row 3
and press Enter to complete the entry.
In this way, you can assign symbolic names to all
the absolute addresses of the inputs and outputs
which your program requires.
STEP 7 Getting Started
3-2
C79000-P7076-C48-01










