WinCC Advanced V14 SP1 - Addressing Variables in Global Data Blocks
WinCC Advanced V14 SP1 - Addressing Variables in Global Data Blocks
Description
Tags in global data blocks can be addressed in symbolic or absolute form. For symbolic
addressing, you use the name of the data block and the name of the tag, separated by a dot.
The name of the data block is enclosed in quotation marks.
For absolute addressing, you use the number of the data block and the absolute address of the
tags in the data block, separated by a dot. The address identifier % is set automatically as prefix
for the absolute address.
The S7-1200/1500 provides you with an option of accessing a data block that is not yet known
during programming. For this purpose, create a block parameter of data type DB_ANY in the
block interface of the accessing block. The data block name or data block number is transferred
to this parameter during runtime. In order to access the internal tags of the data block, use the
name of the block parameter of data type DB_ANY and the absolute address of the tag, separated
by a dot.
Note
Transfer DB with memory reserve to the parameter DB_ANY.
It is not possible to transfer a DB with memory reserve to a block parameter of data type
"DB_ANY".
Note
Addressing DB tags in absolute form
Absolute addressing is not possible for the following tags:
• Tags in blocks with optimized access.
• Tags of data type LWORD, LINT, ULINT, LREAL, LTIME, LTOD and LDT.
Best practice is to use the more convenient symbolic addressing for these tags.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
11/14/2024
WinCC Advanced V14 SP1
Addressing variables in global data blocks
Extended options for addressing ARRAY DBs are available in the "Move" section of the
"Instructions" task card. These instructions give you the option, for example, to also address the
DB name indirectly.
Syntax
"<DBname>".TagName
%<DBnumber>.absoluteAddress
#<DBAny_name>.%absoluteAddress
"<ArrayDBname".THIS[#i].<Component>.<ComponentElement>
SCL:
"<ArrayDBname"."THIS"[#i].<Component>.<ComponentElement>
The following table show the possible absolute addresses of tags in data blocks:
Example
The following examples show the addressing of tags in global data blocks:
Addressing Description
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
11/14/2024
WinCC Advanced V14 SP1
Addressing variables in global data blocks
Addressing Description
See also
→ Using the DB_ANY data type (S7-1200, S7-1500)
→ Addressing individual characters of a STRING or WSTRING (S7-1200, S7-1500)
→ Addressing PLC data types (UDT)
→ Addressing STRUCT components
→ Addressing ARRAY components
→ Addressing areas of a tag with slice access (S7-1200, S7-1500)
→ Basics of indirect addressing (S7-1200, S7-1500)
→ Addressing instance data
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
11/14/2024