Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 171

Section 7. Installation
171
CRBasic Example 32. HTML
'NOTE: Lines ending with "+" are wrapped to the next line to fit on the printed page
'NOTE Continued: Do not wrap lines when entering program into CRBasic Editor.
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
("")
HTTPOut
("")
HTTPOut
("
HTTPOut
("
Welcome To the Campbell Scientific CR800 Web Site!
")HTTPOut
("
HTTPOut
HTTPOut
("
Current Data:
")HTTPOut
("
Time: " + time(4) + ":" + minutes + ":" + seconds + "
")HTTPOut
("
Temperature: " + Temperature + "
")HTTPOut
("
Links:
")HTTPOut
("
(34) +"monitor.html"+
CHR
(34)+">Monitor
")HTTPOut
("")
HTTPOut
("")
WebPageEnd
'Monitor Web Page
WebPageBegin
("monitor.html",Commands)
HTTPOut
("")
HTTPOut
("")
HTTPOut
("
")HTTPOut
("
HTTPOut
("
CR800 Data Table Links
")HTTPOut
("
(34) + "command=TableDisplay&table=CRTemp&records=10" + _
CHR
(34)+">Display Last 10 Records from DataTable CR1Temp
")HTTPOut
("
(34) + "command=NewestRecord&table=CRTemp"+
CHR
(34) + _
">Current Record from CRTemp Table
")HTTPOut
("
(34) + "command=NewestRecord&table=Public"+
CHR
(34) + _
">Current Record from Public Table
")HTTPOut
("
(34) + "command=NewestRecord&table=Status" +
CHR
(34) + _
">Current Record from Status Table
")HTTPOut
("
(34) +"default.html"+
CHR
(34) + ">Back to the Home Page _
")
HTTPOut
("")
HTTPOut
("")
WebPageEnd