Carel plug-in User Manual Page 16

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 15
pCOWeb +030220471 – rel. 1.0 – 02.05.2007 16
4 FUNCTIONS
This chapter provides a guide to the use of the functions on the pCOWeb.
When parameters need to be set, references are made to chapter
8 on page 35.
4.1 WEB SERVER: CUSTOM PAGES
The “WEB server” function of the pCOWeb allows a PC running Internet Explorer to display the web pages saved on the pCOWeb.
The web pages can be divided into:
configuration pages (chapter
8 on page 35), which reside in read-only memory;
custom pages that can be added by the user, which reside in USER MEMORY space (non-volatile, read / write).
In the custom pages, as well as the typical commands of the HTML standard, other commands (“tags”) can be added as per the CAREL standard; this allows read or write
access to the supervisor variables of the pCO controller.
ACCESS RESTRICTIONS
Access restrictions can be defined for all or some custom pages. Whenever a protected page with access restriction is called, pCOWeb displays a login dialogue box
requiring the Username / Password for the specific restriction (see
8.8.1 on page 43).
CGI SCRIPT
CGI scripts can be developed in bash language or compiled languages. These must have the .cgi extension and must reside in the http/usr-cgi directory, otherwise they
will not work.
Whenever one or more CGI scripts is modified, click the “Adjust HTML pages attributes” link (see
8.3 on page 38).
For a guide to CGI script for the pCOWeb see the documents available at
http://ksa.carel.com.
4.1.1 Creating HTML pages
To create pages for the pCOWeb, a PC and knowledge of HTML are required. The area dedicated to pCOWeb on KSA,
http://ksa.carel.com, features simple web pages
for the standard CAREL applications, which can be used as the starting point for creating custom web pages.
The description of HTML is outside of the scope of this document. Numerous guides are available on the web, for example:
http://www.w3schools.com/
http://www.w3.org/MarkUp/
http://www.htmlgoodies.com/
http://www.htmlhelp.com/
Also refer to the documentation available at
http://ksa.carel.com.
APPENDIX G on page 62 lists the CAREL tags and describes an example of the default demo page resident on the pCOWeb. Other pages are shown in APPENDIX H on
page 72 (“Plugins”).
To create a simple HTML page, the Notepad application can be used on the PC, typing the following lines and saving the file as “example.html”:
<html>
<!--tagparser="/pcotagfilt"-->
<h1>pCOWeb Demo Page</h1>
<br>
MAC address: <%macaddress%>
</html>
(the
<%macaddress%> string is a CAREL tag that returns the MAC address of the pCOWeb).
To load the page created to the user memory, proceed as follows:
1. connect the PC to the pCOWeb, making sure that the PC can access to the HTML pages on the pCOWeb (see chapter
3 on page 10);
2. access the user memory via FTP (see paragraph
4.2 on page 17);
3. transfer the file of the page created to the area (/usr/local/root/flash/http/) reserved for custom HTML pages.
NOTE The pCOWeb web server considers:
/usr/local/root/
as the root directory; each page must be located inside this directory (or subdirectory).
4. Display the HTML page loaded by typing the location and name in the Internet Explorer address field:
http://10.0.0.145/example.html
then press ENTER.
Figure 4.a - Example of a simple HTML page
Page view 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 79 80

Comments to this Manuals

No comments