![Campbell CS451 Product Manual Download Page 38](http://html1.mh-extra.com/html/campbell/cs451/cs451_product-manual_3793103038.webp)
Appendix B. Example Programs
B-2
EndIf
'Call Data Tables and Store Data
CallTable
Hourly
CallTable
Daily
NextScan
EndProg
CRBasic Example B-2. CS451 SDI-12 Program for CR200(X)-Series Data Logger
'CR200(X) Series
'Declare the variable for the water level measurement
Public
CS451(2)
'Rename the variable names
Alias
CS451(1)=Level
Alias
CS451(2)=Temp_C
'Define a data table for 60 minute maximum and minimums
DataTable
(Hourly,True,-1)
DataInterval
(0,60,Min)
Maximum
(1,Level,0,0)
Minimum
(1,Level,0,0)
Maximum
(1,Temp_C,0,0)
Minimum
(1,Temp_C,0,0)
EndTable
'Read sensor every 60 seconds
BeginProg
Scan
(60,sec)
'Code for SDI-12 measurements:
SDI12Recorder
(CS451,0M!,1,0)
'Call the data table:
CallTable
(Hourly)
NextScan
EndProg