![Campbell CR23X Скачать руководство пользователя страница 331](http://html1.mh-extra.com/html/campbell/cr23x/cr23x_operators-manual_489029331.webp)
THIS SECTION ENTIRELY REPLACES THE CR10X MANUAL SECTION 8.
AD-8-1
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
This section contains examples for the CR10X. The appropriate voltage range codes would have to be
selected for the CR23X (see CR23X Manual Section 8 for the measurement instructions). The CR510-
TD may not support all the examples.
The following examples are intended to illustrate the use of Processing and Program Control
Instructions, flags, and the capability to direct the results of Output Processing Instructions to Input
Storage.
The specific examples may not be as important as some of the techniques employed, for example:
Directing Output Processing to Input Storage is used in the Running Average and Rainfall Intensity
examples (8.1 and 8.2).
Flag tests are used in the Running Average, Interrupt Subroutine, and Converting Wind Direction
(8.1, 8.5, and 8.7).
Control ports and the Loop are illustrated in the AM32 example (8.3).
As in Section 7 these examples are not complete programs to be taken verbatim. They need to be
altered to fit specific needs.
8.1 COMPUTATION OF RUNNING
AVERAGE
It is sometimes necessary to compute a running
average (i.e., the average covers a fixed
number of samples and is continuously updated
as new samples are taken). Because the
output interval is shorter than the averaging
period, Instruction 71 cannot be used; the
algorithm for computing this average must be
programmed by the user. The following
example demonstrates a program for
computing a running average.
In this example, each time a new measurement
is made (in this case a thermocouple
temperature) an average is computed for the 10
most recent samples. This is done by saving all
10 temperatures in contiguous input locations
and using the Spatial Average Instruction (51)
to compute the average. The temperatures are
stored in locations 11 through 20. Each time
the table is executed, the new measurement is
stored in location 20 and the average is stored
in location 2. The Block Move Instruction (54) is
then used to move the temperatures from
locations 12 through 20 down by 1 location; the
oldest measurement (in location 11) is lost
when the temperature from location 12 is
written over it.
Input Location Labels:
1:Panl Temp
15:Temp_i5
2:smpl10av
16:Temp_i4
11:Temp_i9
17:Temp_i3
12:Temp_i8
18:Temp_i2
13:Temp_i7
19:Temp_i1
14:Temp_i6
20:Temp_i
Where i is current reading, i1 is previous
reading, etc.
*
1
Table 1 Programs
01:
10
Sec. Execution Interval
01:
P17
Module Temperature
01:
1
Loc [:Panl_Temp]
02:
P14
Thermocouple Temp (DIFF)
01:
1
Rep
02:
1
2.5 mV slow Range
03:
1
IN Chan
04:
1
Type T (Copper-Constantan)
05:
1
Ref Temp Loc Panl_Temp
06:
20
Loc [:Tempi ]
07:
1
Mult
08:
0
Offset
03:
P51
Spatial Average
01:
10
Swath
02:
11
First Loc Temp_i9
03:
2
Avg Loc [:smpl10avg]
04:
P54
Block Move
01:
9
No. of Values
02:
12
First Source Loc Temp_i8
03:
1
Source Step
04:
11
First Destination Loc
[:Temp_i9 ]
05:
1
Destination Step
Содержание CR23X
Страница 8: ...CR23X TABLE OF CONTENTS vi This is a blank page ...
Страница 12: ...CR23X MICROLOGGER OVERVIEW OV 2 1 2 3 A 4 5 6 B 7 8 9 C 0 D FIGURE OV1 1 CR23X Micrologger ...
Страница 34: ...CR23X MICROLOGGER OVERVIEW OV 24 This is a blank page ...
Страница 50: ...SECTION 1 FUNCTIONAL MODES 1 16 This is a blank page ...
Страница 72: ...SECTION 4 EXTERNAL STORAGE PERIPHERALS 4 8 This is a blank page ...
Страница 88: ...SECTION 6 9 PIN SERIAL INPUT OUTPUT 6 10 This is a blank page ...
Страница 103: ...SECTION 7 MEASUREMENT PROGRAMMING EXAMPLES 7 15 CR23X AVW1 FIGURE 7 15 2 Well Monitoring Example ...
Страница 110: ...SECTION 7 MEASUREMENT PROGRAMMING EXAMPLES 7 22 This is a blank page ...
Страница 134: ...SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES 8 24 This is a blank page ...
Страница 164: ...SECTION 9 INPUT OUTPUT INSTRUCTIONS 9 30 This is a blankpage ...
Страница 188: ...SECTION 11 OUTPUT PROCESSING INSTRUCTIONS 11 8 This is a blankp age ...
Страница 221: ...SECTION 13 CR23X MEASUREMENTS 13 21 FIGURE 13 5 1 Circuits Used with Instructions 4 9 ...
Страница 229: ...14 3 1 2 3 A 4 5 6 B 7 8 9 C 0 D FIGURE 14 3 1 CR23X Battery Pack and Panel ...
Страница 239: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 13 S A N Y O FIGURE 14 11 6 Removal of band clamp and battery ...
Страница 240: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 14 This is a blank page ...
Страница 244: ...APPENDIX A GLOSSARY A 4 This is a blank page ...
Страница 268: ...APPENDIX B CONTROL PORT SERIAL I O INSTRUCTION 15 B 24 This is a blank page ...
Страница 276: ...APPENDIX C BINARY TELECOMMUNICATIONS C 8 This is a blank page ...
Страница 278: ...This is a blank page ...
Страница 282: ...APPENDIX F DYNAGAGE SAP FLOW P67 F 4 This is a blank page ...
Страница 299: ...APPENDIX I TD OPERATING SYSTEM ADDENDUM FOR CR510 CR10X AND CR23X MANUALS ...
Страница 300: ...This is a blank page ...
Страница 302: ...This is a blank page ...
Страница 308: ...TABLE DATA ADDENDUM AD 6 This is a blank page ...
Страница 324: ...TD ADDENDUM SECTION 1 FUNCTIONAL MODES AD 1 8 This is a blank page ...
Страница 340: ...TD ADDENDUM SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES AD 8 10 This is a blank page ...
Страница 342: ...This is a blank page ...
Страница 373: ...This is a blank page ...