Using An Alias For A Variable Reference - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Web server
11.6 User-defined Web pages
Note
Only a user with privileges to modify variables can write data to the CPU. The Web server
ignores the commands if the user does not have modify privileges.
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 639)".
11.6.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>
<Varname2>
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.
634
The alias name or special variable name
Varname1 must be enclosed in single or double quotation marks.
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.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents