We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 15
‘SIEMENS
Symbolic Addressing
eae Esurance! seen ere
Contents Page
Objectives 2
Absolute and Symboitc Addressing 3
Symooie Adsressing 4
The Symbol Tabie 5
Eat. Find and Replace 6
View: Fier 7
View: Sort 8
Edting Symootsin the LADISTUFBD Eaitor 8
‘Symbol Information in the LADISTLIFBD Eator 10
‘Symbol Selection in the LADISTUIFBD Editor ”
Symbol Table Export 2
‘Symoo! Table: Import 3
Exercise 1 Importing @ Symbol Table 4
Lacing Symbols 15
SITRAIN vrango ST-SERV
‘Automaton ana indus! Solutions Page 1
‘Symbolic AgaressingSIEMENS.
|
Objectives
Upon completion of the chapter the participant wil.
know the difference between absolute and symbolic addressing
know the difference between local and global symbols
know the difference between leading symbols and leading
absolute addresses
be able to edit @ global symbol table
be able to use the Block Ecitor to eait global symbols,
SIMATIC S7
SITRAIN Training tor ST-SERV1
Automation ane industia! Solutions Page 2 Symbolic AddressingSIEMENS.
Absolute and Symbolic Addressing
(rman 24 characters)
a loo |
8.0
A 04 A M_FORW"
0205 MOTOR_FOR’
cal Fete Call “COUNT”
Symbol Address Data Type | Comment
MOTOR_FOR 205 BOOL Motor moves forward
count | Fore Fo1s Count botties
| SYSTEM_oN 00 BOOL ‘Switch system on
| SYSTEM_ON 08.0 BooL Indicator: System is "On" |
| [MFoRw 04 BOoL Pushbutton: Motor forward
VS ——~ |
(trax. 80 characters)
SIMATIC S7
Absolute
‘Addressing
‘Symbolic
Addressing
Bt ane
In absolute addressing, you specify the address (such as input | 1.0) directly. In
this case you don't need a symbol table, but the program is harder to reac
in symbolic addressing, you use symbols (such as MOTOR_ON) instead of the
absolute addresses
You store the symbols for inputs, outputs, timers, counters, bit memories and
blocks in the symbol table
SITRAIN Training or
Automaton and indutia!Sohitons
Page 3
ST-SERV?
Symbolic AddressingSIEMENS,
Symbolic Addressing
DB Components Declaration part ofthe OB | Program Edito
| [Where are symbols used? _| Where are they stored? | With what are they created?
Global Di ‘Symbol Table ‘Symbol Editor
Inputs |
+ Outputs
= Bitmem., timers, counters.
= Peripheral 0 |
| Local Block Data: Declaration part of the Program Editor
= Block parameters block |
+ local temporary data |
Jump Labels | Code section of the Program Editor |
| block
Block Names: ‘Symbol Table ‘Symbol Editor
- 08
2 FB
te |
* 0B
VAT |
:uoT
SIMATIC S7
Global Symbols Global symo's are declared in the symbol table and can be used in all blocks of
a program,
‘The name in the symbol table must be unique, that is, a symbolic name must
‘appear only once in the table.
Local Symbols Local symbols are declared in the deciaration part of @ block. They can be used
‘only within that block,
‘The same symbolic name can be used again in the declaration patt of another
biock
Notes The LAD/STUFED Editor always displays symbols declared in the global
‘symbo! table in quotation marks. Local address symbols (local variables and
parameters) are always displayed with a # (hash or pound mark)
‘You don't have to include the quotation marks or the hash mark when you enter
symbolic addresses. The program editor automatically adas these for you
Abbreviations ~ OB Organization biocks (administration blocks)
+ FC Functions (are used for program structuring)
= FB Function blocks (instantiation)
= DB Data blocks (store process data in the $7)
- VAT Variable tables (monitoring instrument for process variables)
~ UDT Universal data types (dedicated individual data structures in S7)
SITRAIN Training tor ST-SERV?
Automaton ang industria! Solutions Page 4 Symbolic AddressingSIEMENS
The Symbol! Table
SIMATIC S7 BR Sean
Opening the Every "S7 program’ has ts own symbol table You can open a symbol table
‘Symbol Table. from the SIMATIC® Manager with a double-click on the "Symbols" icon
You can also open the symbol table from the LAD/STLIFBD Esitor using the
Options > Symbol Table menu option,
Table Structure _in the symbo! table, ¢ line ss created for every variable You can then enter the
‘symbol name, the address, the data type and 2 comment for the variable in the
columns A blank jine is automatically added at the end of the table for defining @
new symbol
‘Status" Column —_Invai symbol definitions are marked as follows in this column’
= The symbol name or address is identical to another entry in the symbol table.
XX The symbol is incomplete (the symbol name and/or the address is missing)
Note ‘As soon as @ symbol table has been created, its avallable to all other tools
(such a8 LADISTLIFBD Eaitor, HW-Config, and Monitor/Modity Variables)
The “Flag” symbo! in the first column indicates that the address has a particular
attribute. You have attributes, for example,
> with the direct control of an address
= reference to use as communications vatiable
~ reference to use as message variable etc.
Please don't use any special characters in the symbol names,
SITRAIN Training to: ST-SERV1
‘Automation and indus Solutions Pages Symbolic AddressingSIEMENS
| Edit: Find and Replace
SIMATIC S7
Find and Replace A number of options are available for finding and replacing text in the current
‘wancow
+ Find what
Enter the text you are looking for.
+ Repiace with
Enter the replacement text
+ Etom cursor down
‘Searches downwards to the last line in the symbol table.
+ From cursor up
Searches upwards to the frst line in the symbol table.
+ Match case
Only searches for the specified text with identical use of uppercase and
lowercase letters
+ Find whole words only:
Searches for the specified text as a separate word, not as part of a longer
wor
+ All
Searches through the whole symbo! table, starting from the cursor position,
+ Selection
Searches only the selected symbol lines
Note When looking for addresses, you must insert a wildcard after the address
Identifier, otnerwise the adaress cannot be found. There are two wildcards that
can be used
+ Asterisk (*] for no character, or one or more unspecified characters,
+ Question mark () for one unspecified character
xampie: replace all outputs with address 8 with adaress 4
Find what Replace with
arse aa
SITRAIN Training or ST-SERV1
‘Automauon and Indust Solitons Page 6 Symbolic AddressingSIEMENS
View: Filter
| ee ES eet Bor Gens Hebets Heo lL
oe kee Co oe
SIMATIC S7
View: Filter
Examples
Only the symbols which meet the active fiter criteria {"symbo! properties") are
Gispiayed in the current window
‘You can apply several crteria at once, The following fiter criteria can be linked
with one another
Name, Address, Data Type, Comment, Operator Control & Monitoring,
Communication, Message and Monitoring,
Permissible wildcards are * for several characters and ? for one character
+ Name: M*
(Only the names that begin with "MI" and that contain any number of additional
characters are displayed in the symbol tabie.
+ Name: SENSOR_?
Only the names that begin with "SENSOR_" and that contain one other
character are dispiayed in the symbol table
+ Address: =
Only the inputs are displayed.
+ Valid, invalia
‘The symbols must be unique, that 's, a symbol or an address must exist only
once in the symbol table
\¥ 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 symbols or addresses more quickly, you can display only these ines
of the symbo' table by selecting the menu option View > Filter and the attribute
vali
SITRAIN Tramning for
ST-SERV
Automaton and industil Solutions Page 7 Symbolic AddressingSIEMENS
SIMATIC $7 me game Aitmanssd woes
Sort ‘The entries in the symbol table can be displayed in alphabetical order. You use
the View > Sort menu option to specify the column to be used 2s the point of
reference for sorting in the current window.
There is an alternative way to sort
1. Click the column heading "Symbol, Address, Data type or Comment" for
sorting in ascending order in this column. Answer "Yes" when prompted
2. Click the column heading once more for sorting in descending order in this
column. Answer "Yes" when prompted
SITRAIN Tearing or
‘Automation and ngusial Soktions Page 8 ‘Symbolic AddressingSIEMENS,
Editing Symbols in the LAD/STL/FBD Editor
2
Die NG) a) cies ol joie fo 2) | Ge Hl allow! [4
ae 5 SS
BERR ee ose
SIMATIC S7 or Bae
Edit Symbols Eait Symbols enables you to assign symbolic names to absolute addresses at a
later te. These assigned names are automatically entered into the symbol
table.
What to do There are two ways to get to the “Edit Symbols" from the LAD,STL.FBD editor
+ highlight an address field and choose Edit > Symbols . or
+ Tight mouse click the address field and select Edit Symbols
Enter the Symbol name, Data Type and Comment you want to assign to that
address and then OK
Note If you assign @ name that is already in the symbol table, it will be displayed in 2
different color. Ouplicate names cannot be used in the symbol table
SITRAIN Trang tor ST-SERV1
Automation and industal Solutions Page 9 Symbolic AddressingSIEMENS
‘Symbol Information in the LAD/STL/FBD Editor
SIMATIC S7 me ya SITRAM neg
Addressing Inthe LAD/STLIFBD Editor you can choose to display the addresses in one of
the following two ways when you select the View > Display with > Symbolic
Representation menu option
+ Symbolic Addressing or
+ Absolute Addressing
‘You can dispiay the symbolic and absolute address assignments used in the
‘network along wih their comments by selecting the View > Display with >
‘Symbo! information menu option
The assignments are found under the network in LADIFSD and in STL they are
found in the statement line
‘Symbol Information in the LAD/STL/FBD Editor settings you can select whether the symbol
Information for the addresses is to be displayed directly at the address (see right
picture) or at the lower edge of the network (see left picture}
Note It you posttion the mouse pointer on an address, a "Toottip" appears with the
symbol information for this address,
SITRAIN Trang for ST-SERV1
Automaton and indus Solutions Page 10 Symbolic AddressingSIEMENS
Symbol Selection in the LAD/STL/FBD Editor
a. HEE
saisaicacct] |
SIMATIC S7 Sei Foon
Introduction You can use the View > Display with > Symbol Selection menu option to
simply writing a symbolic program
When you label the adddress and you enter the first letter of a symbol name, a
section of the symbol table pops up that starts with this letter
All valid addresses for this block are displayed. These can be all global variables
(even those deciared in data blocks), local variables (temporary and static) and
the parameters of the affected block
SITRAIN traning tor ‘ST-SERV?
‘Automaton and industria! Sokaions Page 11 ‘Symbolic Addressing‘SIEMENS
Symbol Table: Export
Srct Where do you want to store te table? |
A tine se el
ime Ramtareg—3
Tnwnich format de you wantta dove |
the'abie? ly
SIMATIC S7
General
The Symbol Table > Export menu option enables you to store symbol tables in
different fle formats so that you can work on them with other programs You can
‘select the following fle formats
+ ASCII Format (*. ASC}
Notepad
= Word
+ Data Interchange Format (* DIF)
EXCEL
+ System Data Format (* SOF)
ACCESS
+ Assignment List (* SEQ)
- STEP 5 assignment ist
SITRAIN Training or
‘Automaton and industial Solutions Page 12 ‘Symbolic Addressing
ST-SERV?SIEMENS
Symbol Table: Import
ioe ie ee He
on Se
— ol Sele resoy pet here)
Neto evince tt 8208 Sd
SIMATIC $7 Bh FE ese
General The Symbol Table ~ import menu option enables you to import symbol tables
that were created with other user programs
What to Do 1. Activate the Symbol Table > Import menu option
Select the file format in the "import" dialog window
‘You wil find the same formats as for Export.
3. Select the directory path in the "Look in’ lst box
4. Enter the file name in the "File Name” box
5. Click the “Open” button
File Types ‘You can impor the following file formats
+ ASCII Format (*, ASC)
+ Notepad
~ Word
+ Data Interchange Format (* DIF)
EXCEL
+ System Data Format (* SDF)
ACCESS
+ Assignment List (* SEQ)
5 assignment lst
SITRAIN Tramning tor ST-SERV
[utomabon and Inoustsl Sokaions Page 13, Symbolic AddressingSIEMENS
Exercise: Creating a Symbol Table for the Conveyor Model
Bay 2 BAYS LBt
188 187
‘oer 608s OBT O84
SIMATIC $7
Task Include the addresses as seen in the slide into the existing symbol table
What to Do 1. Inthe SIMATIC Manager select the $7 program called “Demo_1
2. Start the Symbol Editor by double-clicking the symbol table icor
3. Complete the symbol table (see slide)
4. Save your symbol table
Ackr, Pushbution (P8) Bay
Acker Bushbstion #
Ack Pushbuttr
nls
Prowinvty Swatch fer Bay 1 (iI
Pros:mty Satoh ter Bay 7 (IN)
Proximity Swati for
DEO tm
indveatr hgh Ba 1
Indicator ight Bly 2 a2
lruwatcn ight “Bay 3 gH,
Humber of Parts OK
Contactor fer Casey
Contactar for
Bell mest RIGHT
ie move LEFT
0) pen
SITRAIN Tramng ST-SERV?
Automaton ordinal Solatons Page 14 Symbolic AagressingSIEMENS,
Leading Symbols
Absolute Value
Address Priority a ae |
coerce
Address Prionty: |
Symbols |
‘Symbol Table
‘id Entry
CISystEm = a8.0
New Entry
USSystem = 44
eee Se coca foe led
Introduction if youwant to change the assignments in the symbol table of an already existing
rogram, you can aiso decide whether the absolute address or the symbolic
adress has priory
Selection In the SIMATIC® Manager, right mouse click the "Blocks" object of an S7
program. Select the Object Properties menu option and then tne "Blocks! tab
You can choose between "Absolute Value" of "Symbor" in the "Address priority
fee
Address Priority: With ths setting, the absolute address of an operand does net cnange if you
Absolute Value change the adress assignment in the sympa table later on
Address Priority:
Symbol
In the example above, the output Q8.0 (symbol name "L_SYSTEM") was
changed to output Q4 + in the symbol table, With the "Adress Priory Absolute
Value" setting, the program continues to use the output Q8 0
With this setting, the absolute address of the operand is changed to the
‘new entry in the symbol table (functionality: “Rewire with Address Priority
Symbor’)
In the example above, the output 8 0 (symbol name "L_SYSTEM") was
‘changes fo output Q41 in the symbol table. With the "Address Priorty
Symbols" setting, the address is changes from 8.0 to Q4.1 throughout the
entire program
For this, the block with the changed address must be opened of the “Check
Block Consistency" function must be used
‘The changed address also keeps its symbol name. That way you can change
the absolute addresses in an ex:sting symbolic user program.
SITRAIN Trainog for
ST-SERV1
Page 15 ‘Symbolic Addressing