Instruction Memory And Execution Time; Logical And Construction; Logical Or Construction - Campbell Measurement and Control Module CR10 Operator's Manual

Ds 70;
Hide thumbs Also See for Measurement and Control Module CR10:
Table of Contents

Advertisement

FIGURE 3.8-2. Logical AND Construction
If Then/Else comparisons may be nested to
form logical AND or OR branching. Figure 3.8-
2 illustrates an AND construction. If conditions
A and B are true, the instructions included
between IF B and the first End Instruction will
be executed.
If either of the conditions is false, execution will
jump to the corresponding End Instruction,
skipping the instructions between.
A logical OR construction is also possible.
Figure 3.8-3 illustrates the instruction sequence
that will result in subroutine X being executed if
either A or B is true.
IF A (88-92 with command 30)
Call subroutine X (86, command=X)
ELSE (94)
IF B (88-92 with command 30)
Call subroutine X (86, command=X)
END B (95)
END A (95)
FIGURE 3.8-3. Logical OR Construction
A logical OR can also be constructed by setting
a flag if a comparison is true. (The flag is
cleared before making comparisons.) After all
comparisons have been made, execute the
desired instructions if the flag is set.
The Begin Case Instruction 93 and If Case
Instruction 83 allow a series of tests on the
value in an input location. The case test is
started with Instruction 93 which specifies the
location to test. A series of Instruction 83s are
then used to compare the value in the location
with fixed values. When the value in the input
SECTION 3. INSTRUCTION SET BASICS
location is less than the fixed value specified in
Instruction 83, the command in that Instruction
83 is executed, and execution branches to the
END Instruction 95 which closes the case test
(see Instruction 93).
3.8.2 NESTING
A branching or loop instruction which occurs
before a previous branch or loop has been
closed is nested. The maximum nesting level is
9 deep. Loop Instruction 87 and Begin Case
Instruction 93 both count as 1 level.
Instructions 83, 86, 88, 89, 91, and 92 each
count as one level when used with the
Command "30" which is the "Then Do"
command. Use of Else, Instruction 94, also
counts as one nesting level each time it is used.
For example, the AND construction above is
nested 2 deep while the OR construction is
nested 3 deep.
Subroutine calls do not count as nesting with
the above instructions, though they have their
own nesting limit (7, see Instruction 85).
Branching and loop nesting start at zero in each
subroutine.
Any number of groups of nested instructions
may be used in any of the three Programming
Tables. The number of groups is only restricted
by the program memory available.
3.9 INSTRUCTION MEMORY AND
EXECUTION TIME
There are 1986 bytes of program memory
available for the programs entered in the *1, *2,
and *3 Program Tables. Each instruction also
makes use of varying numbers of Input,
Intermediate, and Final Storage locations. The
tables list the memory used by each instruction
and the approximate time required to execute it.
When attempting to make a series of
measurements and calculations at a fast rate, it
is important to examine the time required for
the automatic calibration sequence and
possibly make use of the program controlled
calibration, Instruction 24. Section 13.9
describes the calibration process.
3-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ds 70

Table of Contents

Save PDF