Appendix B. Example Programs
B-3
'Define Data Tables
DataTable
(Hourly,True,-1)
DataInterval
(0,60,Min,10)
Sample
(1,LWmV,FP2)
Totalize
(1,LWMDry,FP2,False)
Totalize
(1,LWMCon,FP2,False)
Totalize
(1,LWMWet,FP2,False)
EndTable
DataTable
(Daily,True,-1)
DataInterval
(0,1440,Min,10)
Minimum
(1,BattV,FP2,False,False)
EndTable
'Main Program
BeginProg
'Main Scan
Scan
(5,Sec,1,0)
'Default Data Logger Battery Voltage measurement 'BattV'
Battery
(BattV)
'Default Wiring Panel Temperature measurement 'PTemp_C'
PanelTemp
(PTemp_C,60)
'LWS Dielectric Leaf Wetness Sensor measurement 'LWmV'
BrHalf
(LWmV,1,mV5000,U2,U1,1,2500,False,10000,60,2500,0)
'Determine Minutes Dry 'LWMDry', Minutes Wet or Contaminated 'LWMCon',
'and Minutes Wet 'LWMWet'. The value 0.08333333 is the scan rate divided by
'60 s (5 s/60 s = 0.08333333).
LWMDry=0
LWMCon=0
LWMWet=0
If
LWmV<274
Then
LWMDry=0.08333333
Else
If
LWmV>=284
Then
LWMWet=0.08333333
Else
LWMCon=0.08333333
EndIf
EndIf
'Call Data Tables and Store Data
CallTable
Hourly
CallTable
Daily
NextScan
EndProg