Capteur de télémétrie sonique SR50A
'Diagnostics Parameters
Public Batt_V
Public PTemp_C
'Variables for the SR50A Median Filter
Public RawDist(11) As Float
Public CorDist(11) As Float
Public SR50ASort(11) As Float
Public Distance
Public SR50AMeasureFlag As Boolean
Public SR50ACount As Float
Public AirTC
Public SnowDepth
Const Dist2Gnd = 3.5 'change once sensor is installation.
Units Batt_V = Volts
Units PTemp_C = Deg C
'************************************************************************
'Define Data Table
'************************************************************************
DataTable(Daily,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,Batt_V,FP2,False,False)
Maximum(1,Batt_V,FP2,False,False)
Maximum(1,PTemp_C,FP2,False,False)
Minimum(1,PTemp_C,FP2,False,False)
EndTable
DataTable(Hourly,True,-1)
DataInterval(0,60,Min,10)
Minimum(1,Batt_V,FP2,False,False)
Sample(1,PTemp_C,FP2)
Sample(1,PTemp_C,FP2)
EndTable
'************************************************************************
'Main Program
'************************************************************************
BeginProg
'Set SR50A related counter to 1.
SR50ACount = 1
Scan (5,Sec,0,0)
' Measure Battery Voltage and Internal Temperature
Battery (Batt_V)
PanelTemp (PTemp_C,_60Hz)
'SR50A Sonic Ranging Sensor (SDI-12 Output) measurements:
'Take snow depth measurement every hour during last minute or if manual flag is true.
- 42 -