Appendix C. Example Programs
C-7
'CR200(X) program to read one 109 temperature probe and 1 CS625.
'Use temperature to correct CS625 period.
'Standard calibration is used to convert CS625 output
'period to volumetric water content.
'Sensors are read hourly and average water content and
'temperature are written to storage every 4 hours.
'Declare Variables
Public Tsoil
Public uncorrected,corrected
Public vwc
'Declare Constants
'Water content calibration constants
Const a0=-0.0663
Const a1=-0.0063
Const a2=0.0007
'Temperature correction constants
Const t0=0.526
Const t1=-0.052
Const t2=0.00136
'Reference temperature
Const Tref=20
'Define Data Tables
DataTable (ofile,1,10)
DataInterval (0,4,hr)
Average(1,Tsoil,0)
Average (1,vwc,0)
EndTable
'Main Program
BeginProg
Scan (1,hr)
Therm109 (Tsoil,1,5,Ex1,1.0,0)
SWBatt (1)
PeriodAvg (uncorrected,1,0,10,10,C1,1,0)
SWBatt (0)
corrected=unco(Tref-Tsoil)*(t0+t1*uncot2*uncorrected^2)
vwc = a0 + a1*cor a2*corrected^2
CallTable ofile
NextScan
EndProg