Campbell Scientific TE525MM TE525, TE525WS, and TE525MM Texas Electronics Rain - Page 17

Pulse Count Example Programs

Page 17 highlights

TE525 Tipping Bucket Rain Gage 7.2.1 Pulse Count Example Programs The following example programs use a pulse channel to read the output from the rain gage. The CR1000 example will also work with the CR800, CR850, CR3000, and CR5000. CR9000(X) programming is similar to the CR1000 except it has an additional parameter in the PulseCount() instruction to specify the pulse module's slot. 7.2.1.1 CR1000 Example Program 'CR1000 'TE525/TE525WS & TE525MM sample program 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) 'For TE525MM Rain Gage, use multiplier of 0.1 in PulseCount instruction PulseCount(Rain_mm,1,1,2,0,0.254,0) CallTable(Rain) NextScan EndProg 7.2.1.2 CR200(X) Series Example Program 'CR200(X) Series 'Declare 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) 'TE525/TE525WS Rain Gage measurement Rain_mm: PulseCount(Rain_mm,P_SW,2,0,0.254,0) 'Call Data Tables and Store Data CallTable(Rain) NextScan EndProg 'For TE525MM Rain Gage, use multiplier of 0.1 in PulseCount instruction 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

TE525 Tipping Bucket Rain Gage
7.2.1 Pulse Count Example Programs
The following example programs use a pulse channel to read the output from
the rain gage.
The CR1000 example will also work with the CR800, CR850,
CR3000, and CR5000.
CR9000(X) programming is similar to the CR1000
except it has an additional parameter in the
PulseCount()
instruction to specify
the pulse module’s slot.
7.2.1.1 CR1000 Example Program
'CR1000
'TE525/TE525WS & TE525MM sample program
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)
'For TE525MM Rain Gage, use multiplier of 0.1 in PulseCount instruction
PulseCount(Rain_mm,1,1,2,0,0.254,0)
CallTable(Rain)
NextScan
EndProg
7.2.1.2 CR200(X) Series Example Program
'CR200(X) Series
'Declare 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)
'TE525/TE525WS Rain Gage measurement Rain_mm:
PulseCount(Rain_mm,P_SW,2,0,0.254,0)
'Call Data Tables and Store Data
CallTable(Rain)
NextScan
EndProg
'For TE525MM Rain Gage, use multiplier of 0.1 in PulseCount instruction
11