User Manual

Web server for easy Internet connectivity
9.3 Easy to create user-defined web pages
Easy Book
Manual, 03/2014, A5E02486774-AF
201
After you enable the Web server functionality, enter the following information:
Name and the current location of the HTML default start page to generate the DBs for the
user-defined Web pages.
Name for your application (optional). The application name is used to further
subcategorize or group web pages. When an application name exists, the URL will
appear in the following format:
http://ww.xx.yy.zz/awp/<application name>/<pagename>.html
Filename extensions to be examined for the presence of AWP commands. By default,
STEP 7 analyzes files with .htm, .html, or .js extensions. If you have additional file
extensions, append them.
Identification numbers for the control DB number and the initial fragment DB.
After configuring the Web server, click the "Create blocks" button to generate the DBs from
the HTML pages. After you generate the DBs, your Web pages are a part of your user
program. The control data block for the operation of your Web pages, and the "fragment"
DBs contain all of the HTML pages.
9.3.4
Using the WWW instruction
The WWW instruction allows your user-defined Web pages to be accessible from the
standard Web pages. Your user program only has to execute the WWW instruction once to
enable access to the user-defined Web pages. You might, however, choose to make the
user-defined Web pages available only under certain circumstances. Your user program
could then call the WWW instruction according to your application requirements.
Table 9- 1 WWW instruction
LAD / FBD
SCL
Description
ret_val := #WWW(
ctrl_db:=_uint_in_);
Identifies the control DB to be used for the user-
defined Web pages.
The control data block is the input parameter to
the WWW instruction and specifies the content of
the pages as represented in the fragment data
blocks, as well as state and control information.
Your user program typically uses the control DB directly as created by the "Create blocks"
process, with no additional manipulation. However, the user program can set global
commands in the control DB to deactivate the web server, or to subsequently reactivate it.
Also, for user-defined pages that you create as manual fragment DBs, the user program
must control the behavior of these pages through a request table in the control DB.