beautypg.com

2 sample half bridge program for cr1000 datalogger – Campbell Scientific 110PV Surface Temperature Probe User Manual

Page 19

background image

110PV Surface Temperature Probe

'Convert Celsius to Fahrenheit
T110PV_Temp_F = T110PV_Temp_C * 1.8 + 32

'Call AvgTemp data table
CallTable AvgTemp
NextScan
EndProg

5.1.1.2 Sample Half Bridge Program for CR1000 Datalogger

'CR1000 Series Datalogger
'This example program measures a single 110PV-L probe utilizing
'the BrHalf instruction once a second and stores the average
'temperature in degrees C every 10 minutes.

'110PV-L Wiring Configuration
'Lead Color CR1000 Channel Description
'Black ------ VX1------------- Voltage Excitation
'Red -------- SE1 ------------- Signal
'Purple----- AG -------------- Signal Reference
'Blue ------- Not Used------- N/A
'Green------ Not Used------- N/A
'White ------ Not Used------- N/A
'Clear ------ AG -------------- Shield

'Declare variables for temperature measurement using Half Bridge configuration
Public T110PV_mV
Public T110PV_Res
Public T110PV_Temp_C
Public T110PV_Temp_F

'Declare Constants to be used in Steinhart-Hart equation
Const A=1.129241*10^-3
Const B=2.341077*10^-4
Const C=8.775468*10^-8
Const R_cable=0

'see sensor cable for cable resistance


'Declare variable units
Units T110PV_mV= millivolts
Units T110PV_Res=Ohms
Units T110PV_Temp_C=Deg C
Units T110PV_Temp_F=Deg F

'Define a data table for 10 minute averages
DataTable (AvgTemp,1,1000)
DataInterval (0,10,Min,10)
Average (1,T110PV_Temp_C,FP2,False)
EndTable

13