Appendix B. Example Programs
B-3
CRBasic Example B-3. CR1000X Program Using a Control Terminal to Measure the TB4
or CS700
'CR1000X
'Program measures one rain gage using control terminal
'Wiring Diagram
'==============
'Wire
'Color Function Terminal
'----- -------- --------
'Black Rain signal C1
'White Rain signal ground 5V
'Clear Shield Ground Symbol
'Declare Public Variables and Units
Public
Rain_mm
Units
Rain_mm=mm
DataTable
(Rain,True,-1)
DataInterval
(0,60,Min,0)
Totalize
(1,Rain_mm,FP2,0)
EndTable
'Main Program
BeginProg
Scan
(1,Sec,1,0)
PulseCount
(Rain_mm,1,C1,2,0,.254,0)
CallTable
(Rain)
NextScan
EndProg