2 control port example programs, 1 cr1000 control port example – Campbell Scientific CS700 Tipping Bucket Rain Gage and CS700H Heated Rain Gage User Manual
Page 18

CS700 and CS700H Rain Gage
3: Set Active Storage Area (P80)
1: 1
Final Storage Area 1
2: 101
Array
ID
4: Real Time (P77)
1: 1220
Year,Day,Hour/Minute (midnight = 2400)
5: Totalize (P72)
1: 1
Reps
2: 1
Loc [ Rain_mm ]
*Table 2 Program
02: 0.0000 Execution
Interval
(seconds)
*Table 3 Subroutines
End Program
Output Instruction 72, Totalize, is used in the output section of the program to
output the total rainfall over the output interval. This section should be
executed every scan and not placed in a subroutine or conditional statement.
5.1.2 Control Port Example Programs
The following examples measure a CS700 rain gage using a control port on the
datalogger. Wire the sensor as shown in Table 4-2.
5.1.2.1 CR1000 Control Port Example
Although this example is for the CR1000, the CR800, CR850, and CR3000 are
programmed similarly.
'CR1000
'CR1000 Program for CS700
'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) ; Black wire connected to C8
CallTable
(Rain)
NextScan
EndProg
14