
SECTION 3. INSTRUCTION SET BASICS
3-5
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
NOTE:
A logical OR can also be
constructed by setting a user 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
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, Section 12).
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
11 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 (maximum of 7, see
Instruction 85, Section 12). 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
Each instruction requires program memory and
uses varying numbers of Input, Intermediate,
and Final Storage locations. Tables 3.9-1 to
3.9-4 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.
Summary of Contents for CR23X
Page 8: ...CR23X TABLE OF CONTENTS vi This is a blank page ...
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 ...
Page 34: ...CR23X MICROLOGGER OVERVIEW OV 24 This is a blank page ...
Page 50: ...SECTION 1 FUNCTIONAL MODES 1 16 This is a blank page ...
Page 72: ...SECTION 4 EXTERNAL STORAGE PERIPHERALS 4 8 This is a blank page ...
Page 88: ...SECTION 6 9 PIN SERIAL INPUT OUTPUT 6 10 This is a blank page ...
Page 110: ...SECTION 7 MEASUREMENT PROGRAMMING EXAMPLES 7 22 This is a blank page ...
Page 134: ...SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES 8 24 This is a blank page ...
Page 164: ...SECTION 9 INPUT OUTPUT INSTRUCTIONS 9 30 This is a blankpage ...
Page 188: ...SECTION 11 OUTPUT PROCESSING INSTRUCTIONS 11 8 This is a blankp age ...
Page 221: ...SECTION 13 CR23X MEASUREMENTS 13 21 FIGURE 13 5 1 Circuits Used with Instructions 4 9 ...
Page 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 ...
Page 240: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 14 This is a blank page ...
Page 244: ...APPENDIX A GLOSSARY A 4 This is a blank page ...
Page 268: ...APPENDIX B CONTROL PORT SERIAL I O INSTRUCTION 15 B 24 This is a blank page ...
Page 276: ...APPENDIX C BINARY TELECOMMUNICATIONS C 8 This is a blank page ...
Page 278: ...This is a blank page ...
Page 282: ...APPENDIX F DYNAGAGE SAP FLOW P67 F 4 This is a blank page ...
Page 299: ...APPENDIX I TD OPERATING SYSTEM ADDENDUM FOR CR510 CR10X AND CR23X MANUALS ...
Page 300: ...This is a blank page ...
Page 302: ...This is a blank page ...
Page 308: ...TABLE DATA ADDENDUM AD 6 This is a blank page ...
Page 324: ...TD ADDENDUM SECTION 1 FUNCTIONAL MODES AD 1 8 This is a blank page ...
Page 340: ...TD ADDENDUM SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES AD 8 10 This is a blank page ...
Page 342: ...This is a blank page ...
Page 373: ...This is a blank page ...