Use Of Flags: Output And Program Control; Flag Description - Campbell CR510 Operator's Manual

Datalogger
Hide thumbs Also See for CR510:
Table of Contents

Advertisement

The instructions to output the average
temperature every 10 minutes are in Table 2
which has an execution interval of 10 seconds.
The temperature will be measured 600 times in
the 10 minute period, but the average will be the
result of only 60 of those measurements
because the instruction to average is executed
only one tenth as often as the instruction to
make the measurement.
Intermediate Processing can be disabled by
setting Flag 9 which prevents Intermediate
Processing without actually skipping over the
Output Instruction.
All of the Output Processing Instructions store
processed data values when and only when the
Output Flag is set high (Section 3.7.1). The
Output Flag (Flag 0) is set high at desired
intervals or in response to certain conditions by
using an appropriate Program Control
Instruction (Section 12).
3.7 USE OF FLAGS: OUTPUT AND
PROGRAM CONTROL
There are 10 flags which may be used in
CR510 programs. Two of the flags are
dedicated to specific functions: Flag 0 causes
Output Processing Instructions to write to Final
Storage, and Flag 9 disables intermediate
processing. Flags 1-8 may be used as desired
in programming the CR510. Flags 0 and 9 are
automatically set low at the beginning of each
execution of the program table. Flags 1-8 start
out low when a program is compiled with 0 and
remain unchanged until acted on by a Program
Control Instruction or until manually toggled
from the 6 Mode.
TABLE 3.7-1. Flag Description
Flag 0
-
Flag 1 to 8
-
Flag 9
-
Flags are set with Program Control Instructions.
The Output Flag (Flag 0) and the intermediate
programming disable flag (Flag 9) will always be
set low if the set high condition fails. The status
of flags 1-8 does not change when a conditional
test is false.
Output Flag
User Flags
Intermediate Processing
Disable Flag
SECTION 3. INSTRUCTION SET BASICS
3.7.1 THE OUTPUT FLAG
A group of processed data values is placed in
Final Data Storage by Output Processing
Instructions when the Output Flag (Flag 0) is set
high. This group of data is called an Output
Array. The Output Flag is set using Program
Control Instructions according to time or event
dependent intervals specified by the user. The
Output Flag is set low at the beginning of each
execution of the program table.
Output is most often desired at fixed intervals;
this is accomplished with Instruction 92, If Time.
Output is usually desired on the even interval,
so Parameter 1, time into the interval, is 0. The
time interval (Parameter 2), in minutes, is how
often output will occur; i.e., the Output Interval.
The command code (Parameter 3) is 10,
causing Flag 0 to be set high. The time interval
is synchronized to 24 hour time; output will
occur on each integer multiple of the Output
Interval starting from midnight (0 minutes). If
the Output Interval is not an even divisor of
1440 minutes (24 hours), the last output interval
of the day will be less than the specified time
interval. Output will occur at midnight and will
resume synchronized to the new day.
Instruction 92 is followed in the program table
by the Output Instructions which define the
Output Array desired.
Each group of Output Processing Instructions
creating an Output Array is preceded by a
Program Control Instruction that sets the Output
Flag high.
NOTE: If the Output Flag is already set high
and the test condition of a subsequent
Program Control Instruction acting on Flag
0 fails, the flag is set low. This eliminates
entering another instruction to specifically
reset the Output Flag before proceeding to
another group of Output Instructions with a
different output interval.
3.7.2 THE INTERMEDIATE PROCESSING
DISABLE FLAG
The Intermediate Processing Disable Flag (Flag
9) suspends intermediate processing when it is
set high. This flag is used to restrict sampling
for averages, totals, maxima, minima, etc., to
times when certain criteria are met. The flag is
automatically set low at the beginning of each
execution of the program table.
3-3

Advertisement

Table of Contents
loading

Table of Contents