
TDR100
'Main Program ---------------------------------------------------
BeginProg
SDMSpeed
(50)
'Fix TDR100 to CR1K communication timing
'
Scan
(5,Sec,0,0)
'scan instructions every 5 sec
Battery
(Batt_volt)
PanelTemp
(Panel_temp,250)
CallTable
Dat15min
'
'Set flag 1 High every 120 minutes (Note: User can manually set flag 1 high/low)
If TimeIntoInterval(0,2,Hr) Then Flag(1)=High
'Set flag 2 High once per day (Note: User can manually set flag 2 high/low)
If TimeIntoInterval(0,24,Hr) then flag(2)=high '
If Flag(1)=High Then
'*************************************
SW12
(1)
'Turn on 12V Power to TDR100 & SDMX50
'Note: Wire TDR100 & SDMX50 12V power leads to CR1000 SW12 Terminal
Delay
(1,2,Sec)
'pause 2 sec to allow power supply voltage to settle
'
'Measure La/L on SDMX50 channel #1 thru channel#8 & convert to VWC using Topp Eq.
TDR100
(LaL(1),0,0,1001,4,1.0,251,9.5,5.0,0.3,0.085,1,0)
TDR100
(LaL(2),0,0,2001,4,1.0,251,9.0,5.0,0.3,0.085,1,0)
TDR100
(LaL(3),0,0,3001,4,1.0,251,8.5,5.0,0.3,0.085,1,0)
TDR100
(LaL(4),0,0,4001,4,1.0,251,9.5,5.0,0.3,0.085,1,0)
TDR100
(LaL(5),0,0,5001,4,1.0,251,7.0,5.0,0.3,0.085,1,0)
TDR100
(LaL(6),0,0,6001,4,1.0,251,10.5,5.0,0.3,0.085,1,0)
TDR100
(LaL(7),0,0,7001,4,1.0,251,11.5,5.0,0.3,0.085,1,0)
TDR100
(LaL(8),0,0,8001,4,1.0,251,9.5,5.0,0.3,0.085,1,0)
For
I=1
to
8
LaL2(I)
=
LaL(I)^2
'Apparent Dielectric Constant K = (La/L)^2
Next I
'Topp Conversion from Dielectric Constant to Volumetric Water Content (VWC)
For
I=1
to
8
ToppVWC(I)=a0
+
a1*LaL2(I) + a2*LaL2(I)^2 + a3*LaL2(I)^3
Next I
'
'Measure La/L on SDMX50 channel #1 thru channel#8 & convert to VWC using Ledieu Eq.
'Note: Reps (i.e. "1008") assume all cables are the same length!!!
TDR100
(LedieuVWC(),0,0,1008,4,1.0,251,9.5,5.0,0.3,0.085,.1138,-0.1758)
'
CallTable
Data_TDR
Flag(1)=0
'reset state of Flag 1
SW12
(0
)
'Switched 12V Low
endif
'EndIf for Flag 1 ***********************
If Flag(2)=High Then
'*************************************
SW12
(1)
'Turn on 12V Power to TDR100 & SDMX50
Delay
(0,2,Sec)
'pause 2 sec to allow power supply voltage to settle out
'
MuxChan=1001
'store the SDMX50 channel in variable "MuxChan"
TDR100
(WavePT(),0,1,1001,4,1.0,251,9.5,5.0,0.3,0.085,1,0)
CallTable
TDR_Wave()
'
MuxChan=2001
'store the SDMX50 channel in variable "MuxChan"
TDR100
(WavePT(),0,1,2001,4,1.0,251,9.5,5.0,0.3,0.085,1,0)
CallTable
TDR_Wave()
37