
Appendix B. Example program
CRBasic Example 1: CR1000X program measuring the TE525 or TE525WS using a pulse terminal
'Program records precipitation from one TE525 or TE525WS Rain Gage once a
'second and stores the total every 60 minutes
'Wiring Diagram
'==============
'TE525 or TE525WS
' Wire
' Color Function CR1000X
' ----- -------- -------
' Black Pulse Output P1
' White Ground
⏚
' Clear Shield
⏚
'Declare the variables and units for the rain measurement
Public
Rain_mm
Units
Rain_mm=mm
DataTable
(Rain,True,-1)
DataInterval
(0,60,Min,0)
Totalize
(1,Rain_mm,FP2,0)
EndTable
BeginProg
Scan
(1,Sec,1,0)
PulseCount
(Rain_mm,1,P1,1,0,0.254,0)
'For TE525MM Rain Gage, use multiplier of 0.1 in PulseCount instruction
'Call Data Table
CallTable
(Rain)
NextScan
EndProg
TE525-Series Tipping Bucket Rain Gage
16