Operator`s manual
SECTION 3. INSTRUCTION SET BASICS
3-3
location value is updated by an I/O Instruction.
For example: Suppose a temperature
measurement is initiated by Table 1 which has
an execution interval of 1 second. 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.
Final processing occurs only when the Output
Flag is set (Section 3.7.1). The Output Flag,
Flag 0, is set at desired intervals or in response
to specified conditions by using an appropriate
Program Control Instruction (Section 11).
3.7 USE OF FLAGS: OUTPUT AND
PROGRAM CONTROL
There are 10 flags which may be used in 21X
programs. Two of the flags have functions with
Output Processing Instructions: Flag 0 controls
final processing and data storage, and Flag 9
can disable intermediate processing. Flags 1-8
may be used as desired in programming the
21X. Flags 0 and 9 are automatically set low at
the beginning of the program table. Flags 1-8
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 - Output Flag
Flag 1 to 8 - User Flags
Flag 9 - Intermediate Processing
Disable Flag
Flags are set with Program Control Instructions.
The Output Flag, Flag 0, and the intermediate
processing disable flag, Flag 9, will always be
set low if the set high condition is not met. The
status of flags 1-8 are not changed if a
conditional test is false.
3.7.1 THE OUTPUT FLAG
A set of processed data values is placed in
Final Storage by Output Processing Instructions
when the Output Flag, Flag 0, is set high. This
set of
data is called an output array. The Output Flag
is set according to time or event dependent
intervals using Program Control Instructions
specified by the user. The Output Flag is set
low at the beginning of each table.
Each group of Output Processing Instructions
creating an output array must be preceded by a
Program Control Instruction that sets the Output
Flag.
Output is most often desired at fixed intervals;
this is accomplished with Instruction 92, If Time,
which checks the clock to see if it is X minutes
into a Y minute interval. If the time condition is
met, a command is executed. Output at the
beginning of the interval by making Parameter 1,
time into the interval, 0. Parameter 2, the time
interval in minutes, is how often output will
occur; i.e., the Output Interval. Enter 10 for
parameter 3, the command code, to set Flag 0
high. Instruction 92 is followed in the program
table by the Output Instructions which define the
output array desired.
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.
NOTE: If the Output Flag is already
set high and the test condition of a
subsequent Program Control
Instruction acting on the flag fails,
the flag is set low. This feature
eliminates having to enter another
instruction to specifically reset the
Output Flag at the end of an output
array before proceeding to another
group of Output Instructions with a
different output interval (see example
in OV4.3).
3.7.2 THE INTERMEDIATE PROCESSING
DISABLE FLAG
The Intermediate Processing Disable Flag, Flag
9, suspends intermediate processing when it is