2 rainfall intensity – Campbell Scientific CR7 Measurement and Control System User Manual

Page 84

Advertising
background image

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-2

04:

P54

Block Move

01:

9

No. of Values

02:

12

First Source Loc Temp i-8

03:

1

Source Step

04:

11

First Destin. Loc [:Temp i-9 ]

05:

1

Destination Step

05:

P86

Do

01:

10

Set high Flag 0 (output)

06:

P70

Sample

01:

1

Rep

02:

2

Loc 10smpl av

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 five 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 80 is used to send the one hour
average to Input Storage and again to send the
three hour average to Final Storage.

Input Location Labels:

1:AVG i-2
2:AVG i-1
3:AVG i
4:3 HR AVG
5:XX mg/M3

*

1

Table 1 Programs

01:

5

Sec. Execution Interval

01:

P2

Volt (DIFF)

01:

1

Rep

02:

8

5000 mV slow Range

03:

1

IN Card

04:

3

IN Chan

05:

3

Loc [:XX mg/m3 ]

06:

10

Mult

07:

0

Offset

02:

P92

If time is

01:

0

minutes into a

02:

60

minute interval

03:

10

Set high Flag 0 (output)

03:

P80

Set Active Storage Area

01:

3

Input Storage Area

02:

3

Array ID or location

04:

P71

Average

01:

1

Rep

02:

5

Loc

05:

P51

Spatial Average

01:

3

Swath

02:

1

First Loc AVG i-2

03:

4

Avg Loc [:3 HR AVG ]

06:

P80

Set Active Storage Area

01:

1

Final Storage Area

02:

25

Array ID or location

07:

P77

Real Time

01:

220

Day,Hour-Minute

08:

P70

Sample

01:

1

Rep

02:

4

Loc 3 HR AVG

09:

P91

If Flag

01:

10

0 (output) is set

02:

30

Then Do

10:

P54

Block Move

01:

2

No. of Values

02:

2

First Source Loc

03:

1

Source Step

04:

1

First Destination Loc [:AVG i-2 ]

05:

1

Destination Step

11:

P95

End

12:

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.

Advertising