CR10X Instruction Manual
OV-8
OV2.2 CR10X Instruction Types
Figure OV-4 illustrates the use of three different instruction types which act on
data. The fourth type, Program Control, is used to control output times and to vary
program execution by using techniques such as loops or conditional tests.
Instructions are identified by numbers.
1.
INPUT/OUTPUT INSTRUCTIONS
control the terminal strip inputs and
outputs (the sensor is the source — see Figure OV-2), storing the results in
Input Storage (destination). Multiplier and offset parameters allow con-
version of linear signals into engineering units. The digital I/O ports are also
addressed with I/O Instructions. (See Section 9.)
2.
PROCESSING INSTRUCTIONS
perform numerical operations on values
located in Input Storage (source) and store the results back in Input Storage
(destination). These instructions can be used to develop complex algorithms
to process measurements before Output Processing. (See Section 10.)
3.
OUTPUT PROCESSING INSTRUCTIONS
are the only instructions
which store data in Final Storage (destination). Input Storage (source) values
are processed over time to obtain averages, maxima, minima and so on. (See
Section 11.) There are two types of processing done by Output Instructions:
Intermediate
and
Final
.
Intermediate processing
normally takes place
each time the instruction is executed. For example, when the Average
instruction is executed, it adds the values from the input locations being
averaged to running totals in Intermediate Storage. It also keeps track of the
number of samples.
Final processing
occurs only when the Output Flag is high. The Output
Processing Instructions check the Output Flag. If the flag is high, final values
are calculated and output. With the Average instruction, for example, the
totals are divided by the number of samples and the resulting averages sent
to Final Storage. Intermediate locations are zeroed and the process starts
again.
The Output Flag, Flag 0, is set high by a Program Control Instruc-
tion which must precede the Output Processing Instructions in your
program.
4.
PROGRAM CONTROL INSTRUCTIONS
are used for logic decisions
and conditional statements. They can set flags, compare values or times,
execute loops, call subroutines and conditionally execute portions of the
program. (See Section 12.)
OV2.3 Program Tables, Execution Interval and Output Intervals
Programs are entered in Tables 1 and 2. Subroutines, called from Tables 1 and 2,
are entered in Subroutine Table 3. The size of each table is flexible, limited only
by the total amount of program memory. If Table 1 is the only table programmed,
the entire program memory is available for Table 1.
Table 1 and Table 2 have independent execution intervals, entered in units of
seconds with an allowable range of 1/64 to 8191 seconds. Subroutine Table 3 has
no execution interval; subroutines are only executed when called from Table 1 or
Table 2 (see Figure OV-5).
NOTE