Professional Documents
Culture Documents
Page
Training Center
for Automation and Drives
Page 1
2
3
5
6
7
10
12
13
ST-7PRO1
Symbols
Absolute
Add
Addressing
i
In absolute addressing, you specify the address (e.g. input I 1.0) direct. In this
case you dont
d t need
d a symbol
b l ttable,
bl b
butt th
the program iis h
harder
d tto read.
d
Symbolic
Addressing
Note
When you enter symbol names, you dont have to include quotation marks. The
Program
g
Editor adds these for yyou.
Training Center
for Automation and Drives
Page 2
ST-7PRO1
Symbols
Global Symbols
Global symbols declared in the symbol table can be used in all blocks of a program.
The name in the symbol table must be unique, that is, a symbolic name must only
appear once in the table.
Local Symbols
Local symbols are declared in the declaration part of a block. They can only be used
within that block.
The same symbolic name can be used again in the declaration part of another
block.
Training Center
for Automation and Drives
Page 3
ST-7PRO1
Symbols
Symbol Table
You open the symbol table by selecting the menu options Options -> Symbol Table
i th
in
the LAD/STL/FBD Edit
Editor.
You can also open the symbol table from the SIMATIC Manager: Select the
program in the left-hand pane of the project window and double-click the Symbols
object.
Table Structure
Note
The symbol table is a common database and can be used by different tools:
LAD/STL/FBD Editor
Monitoring and Modifying Variables
Display Reference Data
Training Center
for Automation and Drives
Page 4
ST-7PRO1
Symbols
A number of options are available for finding and replacing text in the current window:
Find what:
Enter the text you are looking for.
Replace with:
Enter the replacement text.
From cursor down:
Searches downwards to the last line in the symbol table.
From cursor up:
Searches upwards to the first line in the symbol table.
Match case:
Only searches for the specified text with identical use of upper-case and lowercase letters.
Find whole words only:
Searches for the specified text as a separate word, not as part of a longer
word.
All:
Searches through the whole symbol table, starting from the cursor position.
Selection:
S l ti
Searches only the selected symbol lines.
Note
When you are looking for addresses, you should insert a wildcard after the address
identifier, otherwise the address cannot be found.
Example of Find and Replace (replace all outputs with address 8. with address 4.):
Find what:
Q*8.**
Q*8
Training Center
for Automation and Drives
Replace with:
Q 4.
4
Page 5
ST-7PRO1
Symbols
Filter
Only the symbols which meet the active filter criteria (symbol properties") are
di l
displayed
d iin th
the currentt window.
i d
You can apply several criteria at once. The specified filter criteria are linked with
one another.
Symbol
Properties
You can select various filters and link them according to the following properties:
Name, Address, Data type, Comment, Operator control and monitoring,
Communication, Message.
Permissible wildcards are * and ?.
Examples
Name: M*
Only the names that begin with "M, and that contain any number of additional
characters, are displayed in the symbol table.
Name: SENSOR_?
Only the names that begin with "SENSOR_" and that contain one other character,
are displayed in the symbol table.
Address: E*.*
Only the inputs are displayed.
Valid, Invalid
Training Center
for Automation and Drives
The symbols must be unique, that is, a symbol or an address must only exist once
in the symbol table.
If a symbol or an address appears more than once, the lines in which it appears are
displayed in Bold". If your symbol table is long, and you want to find such
ambiguous
g
symbols
y
or addresses more q
quickly,
y yyou can display
p y only
y these lines of
the symbol table by selecting the menu options View -> Filter and the attribute
Invalid".
Page 6
ST-7PRO1
Symbols
Sort
Training Center
for Automation and Drives
The entries in the symbol table can be displayed in alphabetical order. You use the
menu options
ti
Vi
View
->
> Sort
S t to
t specify
if the
th column
l
tto be
b used
d as th
the point
i t off
reference for sorting in the current window.
There is an alternative way to sort:
1. Click on the column heading for sorting in ascending order in this column.
2. Click on the column heading once more for sorting in descending order in
this column.
Page 7
ST-7PRO1
Symbols
General
Training Center
for Automation and Drives
The menu option Symbol Table -> Export enables you to store symbol tables in a
diff
different
t fil
file fformatt so th
thatt you can work
k on th
them with
ith other
th programs. Y
You can
select the following file formats:
ASCII Format (*.ASC)
- Notepad
- Word
Data Interchange Format (*.DIF)
- EXCEL
System Data Format (*
( .SDF)
SDF)
- ACCESS
Assignment List (*.SEQ)
- STEP 5 assignment list
Page 8
ST-7PRO1
Symbols
General
The menu option Symbol Table -> Import enables you to import symbol tables that
were created
t d with
ith other
th user programs.
What to do:
1. Activate the menu options Symbol Table -> Import.
2. Select the file format in the Import dialog window.
You will find the same formats as for Export.
3. Select the directory path in the Find in:" list box.
4. Enter the file name in the File Name:" box
5 Confirm with "OK"
5.
OK .
File Types
Training Center
for Automation and Drives
Page 9
ST-7PRO1
Symbols
Edit Symbols
Training Center
for Automation and Drives
The menu option Edit -> Symbol, or a click with the right mouse button on the
address
dd
and
d th
then th
the menu option
ti Edit S
Symbol,
b l enables
bl you tto assign
i symbolic
b li
names to absolute addresses later on. The assigned names are automatically
entered in the symbol table.
Names that are already in the symbol table are displayed in a different color. They
cannot be used again in the symbol table.
Page 10
ST-7PRO1
Symbols
Addressing
In the LAD/STL/FBD Editor you can choose to display the addresses in one of the
f ll i ttwo ways b
following
by selecting
l ti th
the menu options
ti
Vi
View
->
> Display
Di l ->
> Symbolic
S b li
Representation:
Symbolic Addressing or
Absolute Addressing .
You can display the symbolic and absolute address assignments used in the
network by selecting the menu options View -> Display -> Symbol Information.
The assignments are found under the network in LAD/FBD and in STL they are
found in the statement line.
Note
If you position the mouse pointer on an address, a "Tooltip" appears with the symbol
information for this address.
Training Center
for Automation and Drives
Page 11
ST-7PRO1
Symbols
Introduction
You can use the menu options View -> Display -> Symbol Selection to simplify the
writing
iti off a symbolic
b li program.
When you label the adddress, a section of the symbol table pops up, as soon as
you enter the first letter of a symbol name. This section contains all symbols which
begin with this letter. By clicking on the desired symbol it is taken into your program.
Training Center
for Automation and Drives
Page 12
ST-7PRO1
Symbols
Introduction
If you want to change the assignments in the symbol table of an already existing
program, you can also
l d
decide
id whether
h th th
the absolute
b l t address
dd
or th
the symbolic
b li
address has priority.
Selection
In the SIMATIC Manager, select, with the right mouse button, the "Blocks" object of
an S7 program. Select the menu option Properties and then the "Blocks tab.
You can choose between "Absolute Value" or "Symbol" in the Priority" field.
Priority:
Absolute Value
With this setting, the absolute address of an operand does not change, if you
change
g the address assignment
g
in the symbol
y
table later on.
In the example above, the output Q8.0 (symbol name Plant On") was changed to
output Q4.0 in the symbol table. With the Priority: Absolute Value" setting, the
program continues to use the output Q8.0.
Priority: Symbol
With this setting, the absolute address of the operand is changed to the new entry in
the symbol table.
In the example above, the output Q8.0 (symbol name Plant On") was changed to
output Q4.0 in the symbol table. With the Priority: Symbols setting, the address is
changed from Q8.0 to Q4.0 throughout the entire program.
Th changed
The
h
d address
dd
also
l kkeeps itits symbol
b l name. Th
Thatt way you can change
h
th
the
absolute addresses in an existing symbolic user program.
Training Center
for Automation and Drives
Page 13
ST-7PRO1
Symbols
Goal
To create a symbol table representing the first part of the filling application.
What to Do
Result
Training Center
for Automation and Drives
The symbolic names are now displayed for all the addresses in the program to
which you have assigned names
names. You can return to absolute addresses by
deactivating the Symbolic Representation selection in the View menu.
Page 14
ST-7PRO1
Symbols