Crbasic example 32. html – Campbell Scientific CR1000 Measurement and Control System User Manual
Page 170

Section 7. Installation
170
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 CR1000 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
("
CR1000 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