beautypg.com

Appendix b. example programs, B.1 example crbasic program, B.2 example edlog program – Campbell Scientific 108-L Temperature Probe User Manual

Page 23: Appendix b

background image

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 108 temperature probe once a second and

'stores the average temperature every 60 minutes.

'Wiring Diagram

'==============

'108 Probe

'

' Wire

' Color

Function

CR1000

' -----

--------

------

' Black

Voltage-excitation input

VX1 or EX1

' Red

Analog-voltage output

SE1

' Purple

Bridge resistor lead

AG*

' Clear

EMF Shield

G

'*AG = Analog Ground (represented by ground symbol on CR1000 wiring panel

'Declare the variable for the temperature measurement

Public

T108_C

'Define a data table for 60-minute averages

DataTable

(Table1,True,-1)

DataInterval

(0,60,Min,0)

Average

(1,T108_C,IEEE4,False)

EndTable

BeginProg

Scan

(1,Sec,1,0)

'Measure the temperature

Therm108

(T108_C,1,1,Vx1,0,_60Hz,1.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