1 sample program for cr200(x) series datalogger – Campbell Scientific 110PV Surface Temperature Probe User Manual

Page 18

Advertising
background image

110PV Surface Temperature Probe

5.1.1.1 Sample Program for CR200(X) Series Datalogger

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

'110PV-L Wiring configuration for program example
'Lead Color CR200(X) 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
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

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

'Main Program
BeginProg
Scan (1,Sec)
' Measure 110PV-L probe with SE1
ExDelSE (T110PV_mV,1,1,Ex1,mV2500,500,1.0,0)

' Convert mV to ohms
T110PV_Res = 4990*(2500/T110PV_mV)-4990

' Subtract off cable resistance (see 110PV-L cable for R_cable)
T110PV_Res = T110PV_Res-R_cable

' Using the Steinhart-Hart equation to convert resistance to temperature
T110PV_Temp_C = (1/(A+B*LOG(T110PV_Res)+C*(LOG(T110PV_Res))^3))-273.15

12

Advertising