Campbell Scientific T.Weather T107 Toro Weather Station User Manual
Page 97

Appendix D. Default Programs
PortSet(9, 0)
AirTempF = AirTempC * 1.8 + 32
If FirstPass = False Then
MaxAirC = AirTempC
MinAirC = AirTempC
FirstPass = True
Else
If (AirTempC > MaxAirC) Then MaxAirC = AirTempC
If (AirTempC < MinAirC) Then MinAirC = AirTempC
Endif
'CONNECTOR SOLAR RADIATION
'CS305-ET or LI200X-ET Pyranometer
VoltDiff(SlrRad_W, 1, mV7_5, 3, true, 0, _60Hz, 200, 0)
If (SlrRad_W < 0) Then SlrRad_W = 0
If (SlrRad_W = NAN) Then
SlrRad_W = -6999
SlrRad_KW = -6999
SlrRad_MJ = -6999
Else
SlrRad_KW = SlrRad_W*0.001
SlrRad_MJ = SlrRad_W*0.000005
Endif
'CONNECTOR RAIN (PRECIP)
'TE525-ET, TE525WS-LC, CS700-LC, or TB4-LC tipping rain bucket
PulseCount(Rain_mm, 1, 2, 2, 0, 0.254, 0)
Rain_inch = Rain_mm * 0.03937
Rain_Hr = Rain_mm + Rain_Hr
RainRun = RainRun + Rain_mm
CallTable ToroHourly
If (ToroHourly.Output(1,1)) Then
ETos_mm = ToroHourly.ETos_mm(1,1)
ETos_Run = ETos_Run + ETos_mm
Rain_Hr = 0
TotalWSmph = 0
Endif
CallTable ToroStatus
If (ToroStatus.Output(1,1)) Then
Rain24 = RainRun
RainRun = 0
ETos24 = ETos_Run
ETos_Run = 0
Max24Air = MaxAirC
Min24Air = MinAirC
MaxAirC = AirTempC
MinAirC = AirTempC
'Watchdog counts
WatchDog = Status.WatchdogErrors(1,1)
'Skipped scan counts
Overruns = Status.SkippedScan(1,1)
'Low voltage counts
LowVolts = Status.Low12VCount(1,1)
'Lithium battery voltage
LiBattV = Status.LithiumBattery(1,1)
Endif
NextScan
EndProg
D-3