![Campbell CR23X Скачать руководство пользователя страница 191](http://html1.mh-extra.com/html/campbell/cr23x/cr23x_operators-manual_489029191.webp)
SECTION 12. PROGRAM CONTROL INSTRUCTIONS
12-3
locations: one for the number of samples and
one for the running total. Each time through the
loop the sample counter is incremented and the
value in the referenced input location is added
to the total. If the input location is indexed, the
values from all input locations are added to the
same total.
Note that if the Output Flag is set prior to
entering the loop in the above example, 10
values will be output. The first will be the
average of all the readings in locations 1-10
since the previous output. Because the
Intermediate locations are zeroed each time an
output occurs, the next nine values will be the
current values (samples at the time of output) of
locations 2-10.
Loops can be nested. Indexed locations within
nested loops are indexed to the inner most loop
that they are within. The maximum nesting
level in the CR23X is 11 deep. This applies to If
Then/Else comparisons and Loops or any
combination thereof. An If Then/Else
comparison which uses the Else Instruction (94)
counts as being nested 2 deep.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
4
Delay
02:
4
Iteration count
The following example involves the use of the
Loop Instruction, without a delay, to perform a
block data transformation.
The user wants 1 hour averages of the vapor
pressure calculated from the wet- and dry-bulb
temperatures of 5 psychrometers. One
pressure transducer measurement is also
available for use in the vapor pressure
calculation.
1.
The input locations are assigned as follows:
a) pressure
Location 10
b) dry-bulb temperatures
Location 11-15
c)
wet-bulb temperatures
Location 16-20
d) calculated vapor pressure
Location 21-25
(Vapor pressure is written over the
wet-bulb temperatures.)
2.
The program flow is as follows:
a) Enter the Loop Instruction (#87) with
Delay=0 and iteration count=5.
b) Calculate the vapor pressure with
Instruction 57 using a normal location
entry of 10 for atmospheric pressure
and Indexed locations of 11, 16 and 16
for the dry-bulb, wet-bulb, and
calculated vapor pressure, respectively.
c)
End loop with Instruction 95.
d) Use the If Time Instruction (#92) to set
the Output Flag every hour.
e) Use the Average Instruction (#71) with 5
repetitions starting at input location 21 to
average the vapor pressure over the hour.
The actual keyboard entries for the examples
are shown below with the first example
Instruction location equal to 10. The Input
Instructions to make the pressure and
temperature measurements are assumed.
TABLE 12-3. Loop Example: Block Data
Transform
1: Beginning of Loop (P87)
1:
0
Delay
2:
5
Loop Count
2: Wet/Dry Bulb Temp to VP (P57)
1:
10
Pressure Loc [ Pressure ]
2:
11--
Dry Bulb Loc [ DryBulb1 ]
3:
16--
Wet Bulb Loc [ WetBulb1 ]
4:
21--
Loc [ VP1 ]
3: End (P95)
4: If time is (P92)
1:
0
Minutes (Seconds --) into a
2:
60
Interval (same units as above)
3:
10
Set Output Flag High (Flag 0)
5: Average (P71)
1:
5
Reps
2:
21
Loc [ VP1 ]
The Loop with a delay may be used so that only
those instructions within the Loop are executed
while certain conditions are met. As a simple
example, suppose it is desired to execute one
set of instructions from midnight until 6 AM,
another set between 6 AM and 4 PM, and a
third set between 4 PM and midnight. Between
6 AM and 4 PM, samples are desired every 10
Содержание 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 ...