beautypg.com

Campbell Scientific BlackGlobe Temperature Sensor for Heat Stress User Manual

Page 17

background image

BlackGlobe Temperature Sensor for Heat Stress

Dim UpperTmp
Dim LowerTmp

Dim old_wbT, new_wbT
Dim WB_VP_kPa, Diff_VP_kPa
Dim Diff_wbT


'Define Data Tables
'Hourly data table.

DataTable (Hourly,1,-1)
DataInterval (0,1,Hr,10)
Average (1,AirTempC,FP2,False)

Sample (1,AirRH,FP2)
Average (1,DewPnt_C,FP2,False)

Average (1,WetBlb_C,FP2,False)
Average (1,WBGT_C,FP2,False)
EndTable


'Daily datalogger status table.
DataTable (Daily,True,-1)

DataInterval (0,1,Day,10)
Maximum (1,Batt_Volt,FP2,False,False)
Minimum (1,Batt_Volt,FP2,False,False)

Maximum (1,PnlTempC,FP2,False,False)
Minimum (1,PnlTempC,FP2,False,False)
EndTable


'Main Program

BeginProg
Scan (5,Sec,3,0)
PanelTemp (PnlTempC,250)

Battery (Batt_Volt)
'Rotronic HC2S3 powered up all the time.
VoltSe (AirTempC,1,mV2500,1,0,0,_60Hz,0.1,-40)

VoltSe (AirRH,1,mV2500,2,0,0,_60Hz,0.1,0)
If (AirRH >= 100) AND (AirRH <= 108) Then AirRH = 100
SatVP (SVP_kPa,AirTempC)

VP_kPa = SVP_kPa * AirRH/100
DewPoint (DewPnt_C,AirTempC,AirRH)
If (DewPnt_C > AirTempC) Or (DewPnt_C = NAN) Then DewPnt_C = AirTempC

UpperTmp = AirTempC
LowerTmp = DewPnt_C

'BlackGlobe wired to SE channel 3 and excitation channel VX1.
Therm108 (BGTemp_C,1,3,Vx1,0,_60Hz,1.0,0)
'Loop to find wet-bulb temperature.

Do
old_wbT = new_wbT
new_wbT = ((UpperTmp - LowerTmp)/2) + LowerTmp

WetDryBulb (WB_VP_kPa,AirTempC,new_wbT,SP_kPa)
Diff_VP_kPa = WB_VP_kPa - VP_kPa
Diff_wbT = ABS (old_wbT - new_wbT)

If Diff_VP_kPa > 0 Then
UpperTmp = new_wbT

Else
LowerTmp = new_wbT
EndIf

If Diff_wbT < 0.01 Then ExitDo
Loop
'Wet-bulb temperature.

WetBlb_C = new_wbT
'Calculate Wet-Bulb Globe (HUMIDEX) temperature.
WBGT_C = (0.1 * AirTempC) + (0.2 * BGTemp_C) + (0.7 * WetBlb_C)

'Call data storage tables.
CallTable Hourly
CallTable Daily

NextScan
EndProg

11