Web server
12.7 User-defined Web pages
Examples
<-- AWP_In_Variable Name='SERVER:current_user_id'
Use='"Data_Block_10".server_user' -->
In this example, the special variable SERVER:current_user_id is written to the tag
"server_user" in data block "Data_Block_10".
<-- AWP_Out_Variable Name='Weight'
Use='"Data_Block_10".Tank_data.Weight' -->
In this example, the value in data block structure member Data_Block_10.Tank_data.Weight
can be referenced simply by "Weight" throughout the rest of the user-defined Web page.
<-- AWP_Out_Variable Name='Weight' Use='"Raw_Milk_Tank_Weight"' -->
In this example, the value in the PLC tag "Raw_Milk_Tank_Weight" can be referenced simply
by "Weight" throughout the rest of the user-defined Web page.
If a tag name or data block name includes special characters, you must use additional
quotation marks or escape characters as described in the topic Handling tag names that
contain special characters (Page 1055).
12.7.2.6
Defining enum types
You can define enum types in your user-defined pages and assign the elements in an AWP
command.
Syntax
<!-- AWP_Enum_Def Name='<Enum type name>' Values='<Value>,
<Value>,... ' -->
Parameters
<Enum type
name>
<Value>
Note that the entire string of enum value assignments is enclosed in single quotation marks,
and each individual enum type element assignment is enclosed in double quotation marks.
The scope of an enum type definition is global for the user-defined Web pages. If you have
set up your user-defined Web pages in language folders (Page 1074), the enum type
definition is global for all pages in the language folder.
Example
<!-- AWP_Enum_Def Name='AlarmEnum' Values='0:"No alarms", 1:"Tank is
full", 2:"Tank is empty"' -->
1050
Name of the enumerated type, enclosed in single or double quotation marks.
<constant>:<name>
The constant indicates the numerical value for the enum type assignment. The total
number is unbounded.
The name is the value assigned to the enum element.
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK