
Appendix B. Example Programs
B.3 CR1000 Control Port Example Program
'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 CR1000
' ----- -------- ------
' Black Pulse Output C8
' White Ground AG*
' Clear Shield AG*
'*AG = Analog Ground (represented by ground symbol on CR200(X) wiring panel
'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,18,2,0,.254,0)
'For TE525MM Rain Gage use multiplier of 0.1 in PulseCount Instruction.
CallTable (Rain)
NextScan
EndProg
B-3
Komentarze do niniejszej Instrukcji