104BWeb server
11.3 User-defined web pages
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
505
Examples
<!-- AWP_In_Variable Name='"Level'", Name='"Weight"', Name='"Temp"'
-->
<--! AWP_Out_Variable Name='HEADER:Status', Use='"Status"',
Name='HEADER:Location', Use="Location",
Name='COOKIE_VALUE:name', Use="my_cookie" -->
<!-- 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
marks.
●
For variable names that are data block tags, enclose the data block name in double
quotation marks. The tag is outside of the quotation marks.
●
For variable names that are direct I/O addresses, memory addresses, or alias names, do
not use quotation marks around the read variable.
●
For tag names or data block tag names that contain a backslash, precede the backslash
with another backslash.
●
If a tag name or data block tag name contains a colon, less than sign, greater than sign,
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.
Table 11- 1 Examples of Read variables
Data block name
Tag name
Read command
n/a
ABC:DEF
<!--AWP_Out_Variable Name='special_tag'
Use ='"ABC:DEF"' -->
:=special_tag:
n/a
T\
:="T\\":
n/a
A \B 'C :D
<!--AWP_Out_Variable
Name='another_special_tag' Use='"A \\B \'C
:D"' -->
:=another_special_tag:
n/a
a<b
<!--AWP_Out_Variable Name='a_less_than_b'
Use='"a<b"' -->
:=a_less_than_b:
Data_block_1
Tag_1
:="Data_block_1".Tag_1: