Appendix E. Default Programs
E-3
PortSet
(9, 1)
Delay
(0,200,MSEC)
VoltSe
(AirTempC, 1, mV2500, 2, False, 0, _60Hz, 0.1, -40)
VoltSe
(RelHum, 1, mV2500, 1, False, 0, _60Hz, 0.1, 0)
If
(RelHum >= 100)
AND
(RelHum < 108)
Then
RelHum = 100
AirTempF = AirTempC * 1.8 + 32
VoltDiff
(SlrRad_W, 1, mV7_5, 3, true, 0, _60Hz, 200, 0)
If
(SlrRad_W < 0)
Then
SlrRad_W = 0
DewPoint
(DewPntC,AirTempC,RelHum)
If
DewPntC > AirTempC
OR
DewPntC = NAN
Then
DewPntC = AirTempC
'Wind chill calculation
'Trap and set any wind speeds higher than 110 to 110.
WC_WSmph = WindSpd_mph
If
WC_WSmph > 110
Then
WC_WSmph = 110
'Trap and set any airtempF less than -50
WC_AirtempF = AirTempF
If
WC_AirtempF < -50
Then
WC_AirtempF = -50
WindChilC = 35.74+0.6215*WC_AirtempF-35.75*WindSpd_mph^0.16+0.4275* _
WC_AirtempF*WindSpd_mph^0.16
If
WindChilC > WC_AirtempF
OR
WindChilC = NAN
Then
WindChilC = WC_AirtempF
If
WC_AirtempF > 50
OR
WindSpd_mph < 3
Then
WindChilC = AirTempF
WindChilC = (5/9)*(WindChilC - 32)
'Heat Index calculation
If
(AirTempF >= 80)
AND
(RelHum >= 40)
Then
HeatIndxC = -42.379+2.04901523*A10.14333127*RelHum-0.22475541* _
AirTempF*RelHum-6.83783E-3*AirTempF^2-5.481717E-2*RelHum^2+ _
1.22874E-3*AirTempF^2*8.5282E-4*AirTempF*RelHum^2-1.99E-6* _
AirTempF^2*RelHum^2
Else
HeatIndxC = AirTempF
EndIf
If
(HeatIndxC < AirTempF)
OR
(HeatIndxC = NAN)
Then
HeatIndxC = AirTempF
HeatIndxC = (5/9) * (HeatIndxC - 32)
CallTable
VW_Hourly
CallTable
STATS
NextScan
EndProg
CRBasic Example E-2. Program for ET107 with 034B
StationName
(ET107_034B)
'Datalogger status information
Public
BattVolt
Public
LogrTmpC
Public
Encl_RH
Public
WatchDog
Public
Overruns
Public
LowVolts
Public
LiBattV
'O34B
Public
WindSpd_ms
Public
WindSpd_mph
Public
WindDir
Dim
WC_WSmph
Dim
WC_AirtempF
'CONNECTOR: RAIN (PRECIP)
'TE525-ET
Public
Rain_mm
Public
Rain(24)
Public
Rain24Ttl
Alias
Rain(1)=RainHrTtl