Example HTML references in the HTTP Server

Click on Example of HTML references to display the HTML page depicted further on (a detailed description of how to create and call HTML references is provided below).

The panel illustrates with two examples the functioning of a data point query (see Creating custom pages):

  1. In the first example, the code contains a query to a specific data point, the simplest form of a query, as follows:

    <html>
    <title> This is the simplest test </title>
    Value: <%?"ExampleDP_Result."%>
    </html>

    This HTML code is very similar embedded in the HTML side baseSampleConst.htmlRef. The upper button Queryopens this side in the center. You can directly open the side in the command line of your browser:

    http://<hostname>/data/http/de/refs/examples/baseSampleConst.html 
  2. The second example demonstrates, how you can query any data point element using $parameters:

    <html>
    <title> This is $parameter test </title>
    Value: <%?$DPE%>
    </html>

    Also this HTML code, in a similar way, is embedded in the HTML page baseSampleVar.htmlRef. The upper Querybutton opens this page in the center. You can directly open the page in the command line of your browser, but here you define additionally your DPE:

    http://<hostname>/WinCC OA?ref=refs/examples/baseSampleVar.html&DPE=ExampleDP_Arg1.

    Figure 1. Example HTML Page for basic References
  • Example of how to query and display data point values to generate dynamic HTML pages.
  • Figure 2. Example HTML Page for Script References

Additionally, a number of further query possibilities can be found in WinCC OA Tags.

As another example, you can create dynamic HTML pages using CTRL functions and CTRL scripts. These functions and scripts return text or HTML code to be inserted in the corresponding place in an HTML page.

Example Description
Creating custom pages How to create your own HTML sites
Working with control scripts How to create custom HTML references and include control scripts