B.1.2, Example program for cr800, cr850, cr1000, cr3000 – Campbell Scientific CS215 Temperature and Relative Humidity Probe User Manual

Page 32

Advertising
background image

Appendix B. Example Programs

B.1.2 Example Program for CR800, CR850, CR1000, CR3000,

or CR5000

This program can be used directly with CR800 series, CR1000, CR3000, and

CR5000 dataloggers.

'Program measures one CS215 sensor every 5 seconds and stores the average
'temperature and a sample of relative humidity every 10 minutes.

'Wiring Diagram
'==============
'CS215

' Wire
' Color Function

CR1000

' ----- --------

-------

' Red

Power (12V)

12V

' Green

SDI-12 signal

C3

' Black

Power ground

G

' White

Power ground

G

' Clear

Shield

AG*


'Declare the variable array for the measurement

Public

TRHData(2)

Alias

TRHData(1)=AirTC

Alias

TRHData(2)=RH

Units

AirTC=Deg C

Units

RH=%

'Define Data Tables

DataTable

(TenMin,True,-1)

DataInterval

(0,10,Min,10)

Average

(1,AirTC,FP2,False)

Sample

(1,RH,FP2)

EndTable

'Main Program

BeginProg

'Main Scan

Scan

(5,Sec,1,0)

'CS215 Temperature & Relative Humidity Sensor measurements 'AirTC' and 'RH'

SDI12Recorder

(TRHData(),7,"0","M!",1,0)

'Call Data Tables and Store Data

CallTable

(TenMin)

NextScan

EndProg

B-2

Advertising