2 cr200(x) series control port example, 3 cr10x control port example – Campbell Scientific CS700 Tipping Bucket Rain Gage and CS700H Heated Rain Gage User Manual
Page 19
CS700 and CS700H Rain Gage
5.1.2.2 CR200(X) Series Control Port Example
'CR200 
 
' A 20 kOhm pull up resistor is required to read a switch closure on C1 or C2 
' as a Pulse Counter. The 20 kOhm resistor uses the battery voltage. 
 
'Declare Public Variables and Units 
Public Rain_mm 
Units Rain_mm=mm 
 
'Define Data Tables 
DataTable (Rain,True,-1) 
 DataInterval 
(0,60,min)
Totalize
(1,Rain_mm,0)
EndTable 
 
'Main Program 
BeginProg 
 Scan 
(1,Sec)
'CS700 Rain Gage measurement Rain-mm
PulseCount
(Rain_mm,C2,2,0,.254,0) ; Black wire connected to C2
'Call Data Tables and Store Data
CallTable
(Rain)
 NextScan 
EndProg 
5.1.2.3 CR10X Control Port Example
Although this example is for the CR10X, the CR23X is programmed similarly.
;{CR10X} 
*Table 1 Program 
 01: 1.0000 Execution 
Interval
(seconds)
 
1: Pulse (P3) 
 1: 1 
Reps
2: 8
Control Port 8 (switch closure only) ;Black wire connect to C8
3: 2
Switch Closure, All Counts
4: 1
Loc [ Rain_mm ]
5: .254
Multiplier
6: 0
Offset
 
2: If time is (P92) 
 1: 0 
Minutes (Seconds --) into a
2: 60
Interval (same units as above)
3: 10
Set Output Flag High (Flag 0)
 
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)
15