P4: PLC for SINUMERIK 828D
14.3 Programming
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1113
Direct addressing for data blocks
• Absolute addressing
The direct, absolute address of the variables in their data block number comprises the absolute input from the
number of the data block (e.g. DB9000) a period and the address of the variables.
The selection is made using the menu command "View" > "DB address representation (Ctrl+B)":
Example:
DB9000.DBB0
• Symbolic addressing
The variables of the data blocks can be assigned names in the symbol table. When using the variable it is
sufficient to specify this name from the symbol table.
If no name is assigned to the DB variable in the symbol table, then the symbolic address comprises the DB
name (e.g. myDB_9000) and the name of the variables in the data block (e.g. Vcorrection1).
Figure 14-4 Symbolic address representation
The menu command "View" > "Symbolic addressing" (Ctrl+Y)" is used to switch over between absolute and
symbolic representation.
Indirect addressing for data blocks
You may be able to simplify the programming if data blocks with the same structure are used in your program.
You can indirectly address the data blocks using the accumulators AC0 to AC3. The accumulators are used to
tell the program which data block is to be handled. The value in the AC is then treated as index.
For example, for axis DBs, the program text can be somewhat reduced by not having to write a dedicated
program for each axis, but instead access the appropriate axis via the various data blocks and the index (AC).
The value in AC is treated as an index. This is the reason that it starts at 0 for the first axis. Indirect addressing is
only possible using ACs. It is not possible to display the actual data value in the program status of the
Programming Tool PLC828. The absolute address cannot be determined. V addresses cannot be used for
indirect addressing.
Figure 14-5 Indirect addressing
Address
Name of the
variables in the data
block
Entry in the
symbol table
Absolute
representation
Symbolic representation
DB9000.DBX0.0
Vcorrection1
FeedCorrAx1
DB9000.DBX0.0
FeedCorrAx1
DB9000.DBX0.0
Vcorrection1
DB9000.DBX0.0
myDB_9000. Vcorrection1
)HHG&RUU$[
P\'%B9FRUUHFWLRQ
P\'%B>$&@9FRUUHFWLRQ