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
Содержание cs215
Страница 2: ......
Страница 6: ......
Страница 10: ...Table of Contents iv...
Страница 28: ...CS215 Temperature and Relative Humidity Probe 18...
Страница 34: ...Appendix B Example Programs B 4...
Страница 42: ...Appendix D SDI 12 Sensor Support D 6...
Страница 43: ......