Handling Tag Names That Contain Special Characters - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
Examples
<--! AWP_Out_Variable Name='HEADER:Status', Use='"Status"',
11.6.2.11

Handling tag names that contain special characters

When specifying variable names in user-defined Web pages, you must take special care if
tag names contain characters that have special meanings.
Reading variables
You use the following syntax to read a variable (Page 629):
:=:
The following rules apply to reading variables:
● For variable names from the PLC tag table, enclose the tag name in double quotation
● For variable names that are data block tags, enclose the data block name in double
● For variable names that are direct I/O addresses, memory addresses, or alias names, do
● For tag names or data block tag names that contain a backslash, precede the backslash
● If a tag name or data block tag name contains a colon, less than sign, greater than sign,
Table 11- 1
Data block name
n/a
n/a
n/a
n/a
Data_block_1
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Name='HEADER:Location', Use="Location",
Name='COOKIE_VALUE:name', Use="my_cookie" -->
marks.
quotation marks. The tag is outside of the quotation marks.
not use quotation marks around the read variable.
with another backslash.
or ampersand define an alias that has no special characters for the read variable, and
read the variable using the alias. Precede colons in tag names in a Use clause with a
backslash.
Examples of Read variables
Tag name
ABC:DEF
T\
A \B 'C :D
a
Tag_1
Read command
:=special_tag:
:="T\\":
:=another_special_tag:
:=a_less_than_b:
:="Data_block_1".Tag_1:
Web server
11.6 User-defined Web pages
639
Table of Contents
loading

Table of Contents