8-1
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
The following examples are intended to illustrate the use of Processing and Program Control
Instructions, flags, dual Final Storage, 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, Converting Wind Direction, and
Saving Data Prior to Event examples (8.1, 8.5, 8.7 and 8.8).
Control ports and the Loop are illustrated in the AM32 example (8.3).
An algorithm for a down counter is used in the Saving Data Prior to Event example (8.8).
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 i-5
2:10smpl av
16:Temp i-4
11:Temp i-9
17:Temp i-3
12:Temp i-8
18:Temp i-2
13:Temp i-7
19:Temp i-1
14:Temp i-6
20:Temp i
Where i is current reading,
i-1 is previous reading, etc.
*
1
Table 1 Programs
01:
10
Sec. Execution Interval
01:
P17
Panel 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 [:Temp i ]
07:
1
Mult
08:
0
Offset
03:
P51
Spatial Average
01:
10
Swath
02:
11
First Loc Temp i-9
03:
2
Avg Loc [:10smpl av]
Содержание CR10 PROM
Страница 2: ...This is a blank page ...
Страница 4: ...This is a blank page ...
Страница 9: ...CR10 TABLE OF CONTENTS v LIST OF TABLES LT 1 LIST OF FIGURES LF 1 INDEX I 1 ...
Страница 10: ...CR10 TABLE OF CONTENTS vi This is a blank page ...
Страница 14: ...CR10 OVERVIEW OV 2 ...
Страница 15: ...CR10 OVERVIEW OV 3 FIGURE OV1 1 1 CR10 and Wiring Panel ...
Страница 16: ...CR10 OVERVIEW OV 4 FIGURE OV1 1 2 CR10 Wiring Panel Instruction Access ...
Страница 17: ...CR10 OVERVIEW OV 5 ...
Страница 34: ...CR10 OVERVIEW OV 22 ...
Страница 35: ...CR10 OVERVIEW OV 23 FIGURE OV6 1 1 Data Retrieval Hardware Options ...
Страница 36: ...CR10 OVERVIEW OV 24 OV7 SPECIFICATIONS ...
Страница 37: ...CR10 OVERVIEW OV 25 ...
Страница 38: ...CR10 OVERVIEW OV 26 ...
Страница 51: ...SECTION 1 FUNCTIONAL MODES 1 13 This is a blank page ...
Страница 53: ...2 2 ...
Страница 62: ...SECTION 3 INSTRUCTION SET BASICS 3 6 ...
Страница 63: ...SECTION 3 INSTRUCTION SET BASICS 3 7 ...
Страница 68: ...SECTION 3 INSTRUCTION SET BASICS 3 12 This is a blank page ...
Страница 74: ...SECTION 4 EXTERNAL STORAGE PERIPHERALS 4 6 ...
Страница 79: ...SECTION 4 EXTERNAL STORAGE PERIPHERALS 4 11 10 0X X is current address enter address to change to 1 8 ...
Страница 88: ...6 5 FIGURE 6 6 1 Addressing Sequence for the RF Modem ...
Страница 110: ...SECTION 7 MEASUREMENT PROGRAMMING EXAMPLES 7 17 FIGURE 7 16 2 Well Monitoring Example ...
Страница 132: ...SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES 8 13 This is a blank page ...
Страница 197: ...SECTION 13 CR10 MEASUREMENTS 13 18 FIGURE 13 5 1 Circuits Used with Instructions 4 9 ...
Страница 203: ...SECTION 13 CR10 MEASUREMENTS 13 24 This is a blank page ...
Страница 215: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 12 This is a blank page ...
Страница 218: ...APPENDIX A GLOSSARY A 3 and computers in a terminal mode fall in this category ...
Страница 220: ...APPENDIX A GLOSSARY A 5 This is a blank page ...
Страница 228: ...APPENDIX C BINARY TELECOMMUNICATIONS C 6 This is a blank page ...
Страница 230: ...This is a blank page ...
Страница 232: ...This is a blank page ...
Страница 234: ...APPENDIX G CHANGING RAM OR PROM CHIPS G 2 FIGURE G 1 Disassembling CR10 ...
Страница 235: ...APPENDIX G CHANGING RAM OR PROM CHIPS G 3 FIGURE G 2 Jumper Settings for Different RAM Configurations in Early CR10s ...
Страница 236: ...APPENDIX G CHANGING RAM OR PROM CHIPS G 4 FIGURE G 3 Jumper Settings and Locations ...
Страница 237: ...APPENDIX G CHANGING RAM OR PROM CHIPS G 5 This is a blank page ...
Страница 241: ...LIST OF TABLES LT 4 This is a blank page ...
Страница 253: ...CR10 INDEX I 10 This is a blank page ...