Appendix B. Example programs
B.1 CR1000X with one CS650 sensor
This CRBasic example program measures one CS650 sensor on a CR1000X every 15 minutes,
storing hourly averages of volumetric water content, electrical conductivity, and soil temperature
and samples of permittivity, period average and voltage ratio. The CS650 has an SDI-12 address
of 0. Wiring for the example is shown in
Table B-1: CR1000X wiring for one sensor example program
CR1000X
CS650
12V
Red
C1
Green
G
Black, orange, clear
CRBasic Example 1: CR1000X with one CS650 sensor
Public
CS650(6)
'Assign aliases to the public array
Alias
CS650(1)=VWC:
Alias
CS650(2)=EC:
Alias
CS650(3)=TSoil
Alias
CS650(4)=Perm:
Alias
CS650(5)=PerAvg:
Alias
CS650(6)=VoltR
Units
VWC = m^3/m^3:
Units
EC = dS/m:
Units
TSoil = deg C
DataTable
(DatoutCS650,1,-1)
DataInterval
(0,60,Min,10)
Average
(3,CS650(1),FP2,False)
Sample
(3,CS650(4),IEEE4)
EndTable
BeginProg
Scan
(15,Min,0,0)
SDI12Recorder
(CS650(),C1,0,
"M4!"
,1.0,0)
CallTable
DatoutCS650
'Call Data Table
NextScan
EndProg
CS650 and CS655 Water Content Reflectometers
36