Appendix B. Example Programs
B.1 CRBasic Programs
B.1.1 Example CR200(X) Program
This example program shows the measurement of a single CS215 and can be
used directly with CR200(X) series dataloggers.
'CR200(X) Series Datalogger
'Program measures one CS215 sensor every 30 seconds and stores the average
'temperature and a sample of relative humidity every 10 minutes.
'Wiring Diagram
'==============
'CS215
' Wire
' Color Function
CR200(X)
' ----- --------
-------
' Red
Power (12V)
B
' Green
SDI-12 signal
C1/SDI-12
' Black
Power ground
G
' White
Power ground
G
' Clear
Shield
AG*
'*AG = Analog Ground (represented by ground symbol on CR200 wiring panel
'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 a data table for ten-minute data
DataTable
(TenMin,True,-1)
DataInterval
(0,10,Min)
Average
(1,AirTC,False)
Sample
(1,RH)
EndTable
'Main Program
BeginProg
Scan
(30,Sec)
'Scan every 30 seconds
'CS215 Temperature & Relative Humidity Sensor measurements 'AirTC' and 'RH'
SDI12Recorder
(TRHData(),"0M!",1,0)
'Call Data Tables and Store Data
CallTable
TenMin
NextScan
EndProg
B-1
Summary of Contents for cs215
Page 2: ......
Page 6: ......
Page 10: ...Table of Contents iv...
Page 28: ...CS215 Temperature and Relative Humidity Probe 18...
Page 34: ...Appendix B Example Programs B 4...
Page 42: ...Appendix D SDI 12 Sensor Support D 6...
Page 43: ......