
Appendix B. Example Programs
B.3 Mean Vapor Pressure Example
Below is an example CR1000 program that computes mean vapor pressure.
TABLE B-3 shows the wiring used for these examples.
Other CRBasic dataloggers are programmed similarly.
TABLE B-3. Wiring for Vapor Pressure Examples
Color Description CR1000
Yellow Temperature SE 2 (1L)
Blue Relative Humidity SE 1 (1H)
White Signal Reference
Red Power SW12V
Black Power Ground
Clear Shield
'CR1000 program that calculates Vapor Pressure
Public AirTC
Public RH
Public RH_Frac, e_Sat, e_kPa
DataTable(Temp_RH,True,-1)
DataInterval(0,60,Min,0)
Average(1,AirTC,IEEE4,0)
Sample(1,RH,IEEE4)
Sample(1,e_kPa,IEEE4)
EndTable
BeginProg
Scan(5,Sec,1,0)
'HMP155A Temperature & Relative Humidity Sensor measurements AirTC and RH:
PortSet (9,1)
Delay(0,2,Sec)
VoltSE(AirTC,1,mV2500,2,0,0,_60Hz,.14,-80)
VoltSE(RH,1,mV2500,1,0,0,_60Hz,0.1,0)
PortSet (9,0)
If RH>100 And RH<108 Then RH=100
'Calculate Vapor Pressure
'Convert RH percent to RH Fraction
RH_Frac = RH * 0.01
'Calculate Saturation Vapor Pressure
SatVP(e_Sat, AirTC)
'Compute Vapor Pressure, RH must be a fraction
e_kPa = e_Sat * RH_Frac
CallTable(Temp_RH)
NextScan
EndProg
B-3
Comentários a estes Manuais