04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 7. Installation<br />

Figure 54: Preconfigured HTML Home Page<br />

7.8.2.3 Custom HTTP Web Server<br />

Although the default home page cannot be accessed by the user for editing, it can<br />

be replaced with the HTML code of a customized web page. To replace the<br />

default home page, save the new home page under the name default.html and copy<br />

it to the datalogger. It can be copied to a <strong>CR1000</strong> drive with File Control.<br />

Deleting default.html will cause the <strong>CR1000</strong> to use its original, default home<br />

page.<br />

The <strong>CR1000</strong> can be programmed to generate HTML or XML code that can be<br />

viewed by the web browser. CRBasic example HTML (p. 170) shows how to use the<br />

CRBasic instructions WebPageBegin() / WebPageEnd and HTTPOut() to<br />

create HTML code. Note that for HTML code requiring the use of quotation<br />

marks, CHR(34) is used, while regular quotation marks are used to define the<br />

beginning and end of alphanumeric strings inside the parentheses of the<br />

HTTPOut() instruction. For additional information, see the CRBasic Editor Help.<br />

In this example program, the default home page was replaced by using the<br />

WebPageBegin() instruction to create a file called default.html. The new default<br />

home page created by the program appears as shown in figure Home Page<br />

Created Using WebPageBegin() Instruction (p. 169) .<br />

The <strong>Campbell</strong> <strong>Scientific</strong> logo in the web page comes from a file called<br />

SHIELDWEB2.JPG. That file must be transferred to the <strong>CR1000</strong> CPU: drive<br />

using File Control. The <strong>CR1000</strong> can then access the graphic for display on the<br />

web page.<br />

A second web page, shown in figure Customized Numeric-Monitor Web Page (p.<br />

169) called monitor.html was created by the example program that contains links<br />

to the <strong>CR1000</strong> data tables.<br />

168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!