2 rainfall intensity – Campbell Scientific TD Operating System Addendum for CR510, CR10X, and CR23X User Manual

Page 32

Advertising
background image

TD ADDENDUM—SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

AD-8-2

05:

P84

Data Table

01:

0

Seconds into interval

02:

0

Every time

03:

0

Records (0=auto; -=redirect)

06:

P70

Sample

01:

1

Reps

02:

2

Loc smpl10avg

07:

P

End Table 1

In the above example, all samples for the
average are stored in input locations. This is
necessary when an average must be output
with each new sample. In most cases,
averages are desired less frequently than
sampling. For example, it may be necessary to
sample some parameter every 5 seconds and
output every hour an average of the previous
three hours' readings. If all samples were
saved, this would require 2160 input locations.
The same value can be obtained by computing
an hourly average and averaging the hourly
averages for the past three hours. To do this
requires that hourly averages be stored in input
locations.

Instruction 84 is used to send the 1 hour
average to Input Storage and again to send the
3 hour average to Final Storage.

Input Location Labels:

1:AVG_i2
2:AVG_i1
3:AVG_i
4: AVG_3_HR
5:XX_mg_M3

*

1

Table 1 Programs

01:

5

Sec. Execution Interval

01:

P2

Volt (DIFF)

01:

1

Rep

02:

25

2500 mV 60 Hz rejection Range

03:

3

IN Chan

04:

5

Loc [:XX_mg_M3 ]

05:

10

Mult

06:

0

Offset

02:

P84

Data Table

01:

0

Seconds into interval

02: 3600

Seconds interval

03:

-3

Records (0=auto; -=redirect)

03:

P71

Average

01:

1

Rep

02:

5

Loc XX_mg_M3

04:

P51

Spatial Average

01:

3

Swath

02:

1

First Loc AVG_i2

03:

4

Avg Loc [:Avg_3_HR ]

05:

P84

Data Table

01:

0

Seconds into interval

02: 3600

Seconds interval

03:

0

Records (0=auto; -=redirect)

06:

P70

Sample

01:

1

Reps

02:

4

Loc Avg_3_HR

07:

P92

If time is

01:

0

seconds into a

02: 3600

second interval

03:

30

Then Do

08:

P54

Block Move

01:

2

No. of Values

02:

2

First Source Loc AVG_i1

03:

1

Source Step

04:

1

First Destination Loc
[:AVG_i2 ]

05:

1

Destination Step

09:

P95

End

10:

P

End Table 1

8.2 RAINFALL INTENSITY

In this example, the total rain for the last 15
minutes is output only if any rain has occurred.
The program makes use of the capability to
direct the output of Output Processing
Instructions to Input Storage.

Every 15 minutes, the total rain is sent to Input
Storage. If the total is not equal to 0, output is
redirected to Final Storage Area 1, the time is
output and the total is sampled.

Input Location Labels:

1:Rain_mm
2: TOT_15mm

*

1

Table 1 Programs

01:

60

Sec. Execution Interval

01:

P3

Pulse

01:

1

Rep

02:

1

Pulse Input Chan

03:

2

Switch closure

04:

1

Loc [:Rain_mm ]

05:

.254

Mult

06:

0

Offset

02:

P86

Do

01:

21

Set low Flag 1

Advertising