beautypg.com

Appendix b. example programs, B.1 example crbasic programs, B.1.1 – Campbell Scientific 109SS Temperature Probe User Manual

Page 23: Example 1 — sample program for cr200(x) series, B.1.2, Appendix b

background image

Appendix B. Example Programs

B.1 Example CRBasic Programs

B.1.1 Example 1 — Sample program for CR200(X) series

dataloggers

'Program measures one 109SS temperature probe once a second and
'stores the average temperature every 60 minutes.

'Wiring Diagram
'==============
'109SS Probe

' Wire
' Color Function CR200(X)
' ----- -------- ------
' 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 CR200 wiring panel

‘Declare the variable for the temperature measurement

Public

T109_C

‘Define a data table for 60 minute averages

DataTable

(Table1,True,-1)

DataInterval

(0,60,min)

Average

(1,T109_C,False)

EndTable

BeginProg

Scan

(1,sec)

'Measure the temperature

Therm109

(T109_C,1,1,Ex1,1.0,0)

'Call Data Table

CallTable

Table1

NextScan

EndProg

B.1.2. Example 2 — Sample program for CR800 series, CR1000,

CR3000, and CR5000 dataloggers

'Program measures one 109SS temperature probe once a second and
'stores the average temperature every 60 minutes.

'Wiring Diagram
'==============
'109SS 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*

B-1