Importing Fragments; Combining Definitions - Siemens S7-1200 System Manual

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

Advertisement

Web server
11.6 User-defined Web pages
Manual fragments
If you create a manual fragment for a user-defined Web page or portion of a page, then your
STEP 7 program must control when the fragment is sent. The STEP 7 program must set
appropriate parameters in the control DB for a user-defined page under manual control and
then call the WWW instruction with the control DB as modified. For understanding the
structure of the control DB and how to manipulate individual pages and fragments, see the
topic Advanced user-defined Web page control (Page 660).
11.6.2.9

Importing fragments

You can create a named fragment from a portion of your HTML code and then import that
fragment elsewhere in your set of user-defined Web pages. For example, consider a set of
user-defined Web pages that has a start page and then several other HTML pages
accessible from links on the start page. Suppose each of the separate pages is to display the
company logo on the page. You could implement this by creating a fragment (Page 637) that
loads the image of the company logo. Each individual HTML page could then import this
fragment to display the company logo. You use the AWP Import_Fragment command for this
purpose. The HTML code for the fragment only exists in one fragment, but you can import
this fragment DB as many times as necessary in as many Web pages as you choose.
Syntax
<!-- AWP_Import_Fragment Name='<Name>' -->
Parameters
<Name>
Example
Excerpt from HTML code that creates a fragment to display an image:
<!-- AWP_Start_Fragment Name='My_company_logo' --><p><img
src="company_logo.jpg"></p>
Excerpt from HTML code in another .html file that imports the fragment that displays the logo
image:
<!-- AWP_Import_Fragment Name='My_company_logo' -->
Both .html files (the one that creates the fragment and the one that imports it) are in the
folder structure that you define when you configure the user-defined pages in STEP 7
(Page 641).
11.6.2.10

Combining definitions

When declaring variables for use in your user-defined Web pages, you can combine a
variable declaration and an alias for the variable (Page 634). You can also declare multiple
In_Variables in one statement and multiple Out_Variables in one statement.
638
Text string: name of the fragment DB to be imported
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents