SECTION 3. INSTRUCTION SET BASICS
3-4
As an example, suppose it is desired to obtain a
wind speed rose incorporating only wind speeds
greater than or equal to 4.5 m/s. The wind
speed rose is computed using the Histogram
Instruction 75, and wind speed is stored in input
location 14, in m/s. Instruction 89 is placed just
before Instruction 75 and is used to set Flag 9
high if the wind speed is less than 4.5 m/s:
TABLE 3.7-2. Example of the Use of Flag 9
Inst.
Param.
Loc.
No.
Entry
Description
X
P
89
If wind speed < 4.5 m/s
1
14
Wind speed location
2
4
Comparison: <
3
4.5
Minimum wind
speed for histogram
4
19
Set Flag 9 high
X+1
P
75
Histogram
X+2
P
86
Do
1
29
Set Flag 9 Low
NOTE
: Flag 9 is automatically reset the
same as Flag 0. If the intermediate
processing disable flag is already set high
and the test condition of a subsequent
Program Control Instruction acting on Flag
9 fails, the flag is set low. This feature
eliminates having to enter another
instruction to specifically reset Flag 9 before
proceeding to another group of test
conditions.
3.7.3 USER FLAGS
Flags 1-8 are not dedicated to a specific
purpose and are available to the user for
general programming needs. The user flags
can be manually toggled from the keyboard in
the
∗
6 Mode (Section 1.3). By inserting the flag
test (Instruction 91) at appropriate points in the
program, the user can use the
∗
6 Mode to
manually direct program execution.
3.8 PROGRAM CONTROL LOGICAL
CONSTRUCTIONS
Most of the Program Control Instructions have a
command code parameter which is used to
specify the action to be taken if the condition
tested in the instruction is true. Table 3.8-1 lists
these codes.
TABLE 3.8-1. Command Codes
0
Go to end of program table
3
1-9, 79-99
Call Subroutine 1-9, 79-99
1
10-19
Set Flag 0-9 high
20-29
Set Flag 0-9 low
30
Then Do
31
Exit loop if true
32
Exit loop if false
41-48
Set Port 1-8 high
2
51-58
Set Port 1-8 low
2
61-68
Toggle Port 1-8
2
71-78
Pulse Port 1-8
2
1
96, 97, and 98 are special subroutines
which can be called by Control ports 6, 7,
and 8 going high; see Instruction 85 for
details (Section 12).
2
The ports can be indexed to the loop
counter (Section 8.4).
3
If this command is executed while in a
subroutine, execution jumps directly to the
end of the table that called the subroutine.
3.8.1 IF THEN/ELSE COMPARISONS
Program Control Instructions can be used for If
then/else comparisons. When Command 30
(Then do) is used with Instructions 83 or 88-92,
the If Instruction is followed immediately by
instructions to execute if the comparison is true.
The Else Instruction (94) is optional and is
followed by the instructions to execute if the
comparison is false. The End Instruction (95)
ends the If then/else comparison and marks the
beginning of the instructions that are executed
regardless of the outcome of the comparison
(see Figure 3.8-1).
FIGURE 3.8-1. If Then/Else
Execution Sequence
Summary of Contents for CR10X
Page 2: ...This is a blank page...
Page 4: ...This is a blank page...
Page 10: ...CR10X TABLE OF CONTENTS vi This is a blank page...
Page 36: ...CR10X OVERVIEW OV 24 This is a blank page...
Page 50: ...SECTION 1 FUNCTIONAL MODES 1 14 This is a blank page...
Page 102: ...SECTION 7 MEASUREMENT PROGRAMMING EXAMPLES 7 18 FIGURE 7 16 2 Well Monitoring Example...
Page 210: ...SECTION 13 CR10X MEASUREMENTS 13 18 FIGURE 13 5 1 Circuits Used with Instructions 4 9...
Page 216: ...SECTION 13 CR10X MEASUREMENTS 13 24 This is a blank page...
Page 228: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 12 This is a blank page...
Page 232: ...APPENDIX A GLOSSARY A 4 This is a blank page...
Page 256: ...APPENDIX C BINARY TELECOMMUNICATIONS C 8 This is a blank page...
Page 258: ...This is a blank page...
Page 260: ...This is a blank page...
Page 264: ...APPENDIX F DYNAGAGE SAP FLOW P67 F 4 This is a blank page...
Page 272: ...APPENDIX G DATALOGGER INITIATED COMMUNICATIONS G 8 This is a blank page...
Page 280: ...APPENDIX I MODBUS ON THE CR10 AND CR10X I 4 This is a blank page...
Page 281: ...APPENDIX J TD OPERATING SYSTEM ADDENDUM FOR CR510 CR10X AND CR23X MANUALS...
Page 282: ...This is a blank page...
Page 284: ...This is a blank page...
Page 290: ...TABLE DATA ADDENDUM AD 6 This is a blank page...
Page 306: ...TD ADDENDUM SECTION 1 FUNCTIONAL MODES AD 1 8 This is a blank page...
Page 322: ...TD ADDENDUM SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES AD 8 10 This is a blank page...
Page 324: ...This is a blank page...
Page 348: ...LIST OF TABLES LT 4 This is a blank page...