Appendix b. example programs, B.1 example crbasic program, B.2 example edlog program – Campbell Scientific 107-L Temperature Probe User Manual
Page 23: N appendix b
Appendix B. Example Programs
B.1 Example CRBasic Program
This example can be used directly with CR800 series, CR1000, CR3000, and
CR5000 dataloggers.
'Program measures one 107 temperature probe once a second and
'stores the average temperature every 60 minutes.
'Wiring Diagram
'==============
'107 Probe
'
' Wire
' Color Function CR1000
' ----- -------- ------
' Black Voltage-excitation input VX1 or EX1
' Red Analog-voltage output SE1
' Purple Bridge-resistor ground AG*
' Clear Shield G*
'*AG = Analog Ground (represented by ground symbol on CR1000 wiring panel
'Declare the variables for the temperature measurement
Public
T107_C
'Define a data table for 60 minute averages:
DataTable
(Table1,True,-1)
DataInterval
(0,60,Min,0)
Average
(1,T107_C,IEEE4,0)
EndTable
BeginProg
Scan
(1,Sec,1,0)
'Measure the temperature
Therm107
(T107_C,1,1,Vx1,0,_60Hz,1.0,0.0)
'Call Data Table
CallTable
(Table1)
NextScan
EndProg
B.2 Example Edlog Program
This example can be used directly with CR10X dataloggers. With minor
adaptations, it can also be used with CR10, CR500, CR510, CR23X, and
CR7X dataloggers. More adaptation will be needed with the 21X and CR7
dataloggers. Contact a Campbell Scientific application engineer for help with
any datalogger program.
B-1