Writing User Input To The Controller - Siemens S7-1200 System Manual

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

Advertisement

The HTML page includes a drop-down select list for the user to change the value of
ManualOverrideEnable. The select list uses the text "Yes" and "No" to display in the select
lists. With the use of the enum type, "Yes" is correlated to the value "On" of the enum type,
and "No" is correlated to the value "Off". The empty selection leaves the value of
ManualOverrideEnable as it is.
<select name='"Data_block_1".ManualOverrideEnable'>
<option value=':"Data_block_1".ManualOverrideEnable:'> </option>
<option value="On">Yes</option>
<option selected value="Off">No</option>
</select>
The select list is included within a form on the HTML page. When the user clicks the submit
button, the page posts the form, which writes a value of "1" to the Boolean
ManualOverrideEnable in Data_block_1 if the user had selected "Yes", or "0" if the user had
selected "No".
11.6.8.4

Writing user input to the controller

The "Remote Wind Turbine Monitor" HTML page includes several AWP commands for
writing data to the controller (Page 630). The HTML page declares AWP_In_Variables for
Boolean variables so that a user with privileges to modify variables can put the wind turbine
under manual control and enable manual override for the turbine speed, yaw override,
and/or blade pitch override. The page also uses AWP_In_Variables to allow a user with
privileges to modify variables to subsequently set floating-point values for the turbine speed,
yaw, pitch, and braking percentage. The page uses an HTTP form post command to write
the AWP_In_Variables to the controller.
For example, consider the HTML code for manually setting the braking value:
Sample HTML code
The following excerpt from the "Remote Wind Turbine Monitor" HTML page first declares an
AWP_In_Variable for "Data_block_1" that enables the HTML page to write to any tags in the
data block "Data_block_1". The page displays the text "Braking:" in the left cell of a table
row. In the right cell of the table row is the field that accepts user input for the "Braking" tag
of "Data_block_1". This user input value is within an HTML form that uses the HTTP method
"POST" to post the entered text data to the CPU. The page then reads the actual braking
value from the controller and displays it in the data entry field.
A user with privileges to modify variables can subsequently use this page to write a braking
value to the data block in the CPU that controls braking.
<!-- AWP_In_Variable Name='"Data_block_1"' -->
...
<tr style="vertical-align: top; height: 2%;">
<td style="width: 22%;"><p>Braking:</p></td>
<td>
<form method="POST">
<p><input name='"Data_block_1".Braking' size="10" type="text"> %</p>
</form>
</td>
</tr>
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Web server
11.6 User-defined Web pages
649

Advertisement

Table of Contents
loading

Table of Contents