104BWeb server
11.3 User-defined web pages
S7-1200 Programmable controller
516
System Manual, 11/2011, A5E02486680-05
Note
Note that if a user-defined page has a data entry field for a writable data block tag that is a
string data type, the user must enclose the string in single quotation marks when entering
the string value in the field.
Note
Note that if you declare an entire data block in an AWP_In_Variable declaration such as <!--
AWP_In_Variable Name='"Data_block_1"' -->, then every tag within that data block can be
written from the user-defined Web page. Use this when you intend for all of the tags in a data
block to be writable. Otherwise, if you only want specific data block tags to be writable from
the user-defined Web page, declare it specifically with a declaration such as <!--
AWP_In_Variable Name='"Data_block_1".Braking' -->
11.3.8.5
Writing a special variable
The "Remote Wind Turbine Monitor" Web page writes the special variable
SERVER:current_user_id to a PLC tag in the CPU. In this case, the PLC tag value contains
the user ID of whoever is accessing the "Remote Wind Turbine Monitor" Web page.
Currently the admin user has a user ID of 1, so the PLC tag value is set to 1.
The special variable is written to the PLC by the Web page and requires no user interface.
Sample HTML code
<!-- AWP_In_Variable Name="SERVER:current_user_id" Use="User_ID"-->
11.3.8.6
Reference: HTML listing of remote wind turbine monitor Web page
Wind_turbine.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><!--
This test program simulates a Web page to monitor and control a Wind
Turbine
Required PLC tags and Data Block Tags in STEP 7:
PLC Tag:
User_ID: Int
Data Blocks:
Data_block_1
Tags in Data_Block_1: