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

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Examples
<!-- AWP_In_Variable Name='"Level'", Name='"Weight"', Name='"Temp"'
-->
<--! AWP_Out_Variable Name='HEADER:Status', Use='"Status"',
<!-- AWP_In_Variable Name='Alarm' Use='"Data_block_10".Alarm' -->
11.3.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 495):
:=<Varname>:
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, 11/2011, A5E02486680-05
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<b
Tag_1
Read command
<!--AWP_Out_Variable Name='special_tag'
Use ='"ABC:DEF"' -->
:=special_tag:
:="T\\":
<!--AWP_Out_Variable
Name='another_special_tag' Use='"A \\B \'C
:D"' -->
:=another_special_tag:
<!--AWP_Out_Variable Name='a_less_than_b'
Use='"a<b"' -->
:=a_less_than_b:
:="Data_block_1".Tag_1:
104BWeb server
11.3 User-defined web pages
505

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents