104BWeb server
11.3 User-defined web pages
S7-1200 Programmable controller
500
System Manual, 11/2011, A5E02486680-05
Note
Only an admin user can write data to the CPU. The commands are ignored if the user has
not logged in as the admin user.
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 505)".
11.3.2.5
Using an alias for a variable reference
You can use an alias in your user-defined Web page for an In_Variable or an Out_Variable.
For example, you can use a different symbolic name in your HTML page than the one used
in the CPU, or you can equate a variable in the CPU with a special variable. The AWP Use
clause provides this capability.
Syntax
<-- AWP_In_Variable Name='<Varname1>' Use='<Varname2>' -->
<-- AWP_Out_Variable Name='<Varname1>' Use='<Varname2>' -->
Parameters
<Varname1>
The alias name or special variable name
Varname1 must be enclosed in single or double quotation marks.
<Varname2>
Name of the PLC variable for which you want to assign an alias name. The variable
can be a PLC tag, a data block tag, or a special variable. Varname2 must be
enclosed in single quotation marks. Within the single quotes, use double quotation
marks around a PLC tag, special variable, or data block name. The data block
name is within the double quotes but not the data block tag name. Note that for
data block tags, you use the name of the block and not a data block number.
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.