Section 8. Operation
433
Custom Web Page HTML
'This program example demonstrates the creation of a custom web page that resides in the
'WebPageBegin to CR800. In this example program, the default home page is replaced by
'using create a file called default.html. The graphic in the web page (in this case, the
'Campbell Scientific logo) comes from a file called SHIELDWEB2.JPG. The graphic file
'must be copied to the CR800 CPU: drive using File Control in the datalogger
'support software. A second web page is created that contains links to the CR800
'data tables.
'NOTE: The "_" character used at the end of some lines allows a code statement to be
'wrapped to the next line.
Dim
Commands
As String
* 200
Public
Time(9), RefTemp,
Public
Minutes
As String
, Seconds
As String
, Temperature
As String
DataTable
(CRTemp,True,-1)
DataInterval
(0,1,Min,10)
Sample
(1,RefTemp,FP2)
Average
(1,RefTemp,FP2,False)
EndTable
'Default HTML Page
WebPageBegin
("default.html",Commands)
HTTPOut
("<html>")
HTTPOut
("<style>body {background-color: oldlace}</style>")
HTTPOut
("<body><title>Campbell Scientific CR800 Datalogger</title>")
HTTPOut
("<h2>Welcome To the Campbell Scientific CR800 Web Site!</h2>")
HTTPOut
("<tr><td style=" + CHR(34) +"width: 290px" + CHR(34) + ">")
HTTPOut
("<a href=" + CHR(34) + "http://www.campbellsci.com" + CHR(34) + ">")
HTTPOut
("<img src="+
CHR
(34) +"/CPU/SHIELDWEB2.jpg"+
CHR
(34) + "width=" + _
CHR
(34) +"128"+
CHR
(34)+"height="+
CHR
(34)+"155"+
CHR
(34) + "class=" + _
CHR
(34) +"style1"+
CHR
(34) +"/></a></td>")
HTTPOut
("<p><h2> Current Data:</h2></p>")
HTTPOut
("<p>Time: " + time(4) + ":" + m ":" + s "</p>")
HTTPOut
("<p>Temperature: " + Tempe "</p>")
HTTPOut
("<p><h2> Links:</h2></p>")
HTTPOut
("<p><a href="+
CHR
(34) +"monitor.html"+
CHR
(34)+">Monitor</a></p>")
HTTPOut
("</body>")
HTTPOut
("</html>")
WebPageEnd
'Monitor Web Page
WebPageBegin
("monitor.html",Commands)
HTTPOut
("<html>")
HTTPOut
("<style>body {background-color: oldlace}</style>")
HTTPOut
("<body>")
HTTPOut
("<title>Monitor CR800 Datalogger Tables</title>")
HTTPOut
("<p><h2>CR800 Data Table Links</h2></p>")
HTTPOut
("<p><a href="+
CHR
(34) + "command=TableDisplay&table=CRTemp&records=10" + _
CHR
(34)+">Display Last 10 Records from DataTable CR1Temp</a></p>")
HTTPOut
("<p><a href="+
CHR
(34) + "command=NewestRecord&table=CRTemp"+
CHR
(34) + _
">Current Record from CRTemp Table</a></p>")
HTTPOut
("<p><a href="+
CHR
(34) + "command=NewestRecord&table=Public"+
CHR
(34) + _
">Current Record from Public Table</a></p>")
Содержание CR800 Series
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 34: ......
Страница 54: ......
Страница 92: ......
Страница 190: ...Section 7 Installation 190 FIGURE 40 Running Average Frequency Response FIGURE 41 Running Average Signal Attenuation ...
Страница 310: ......
Страница 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Страница 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Страница 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Страница 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Страница 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Страница 456: ......
Страница 462: ......
Страница 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Страница 524: ......
Страница 526: ......
Страница 556: ......
Страница 558: ......
Страница 560: ......
Страница 597: ......