SECTION 3. INSTRUCTION SET BASICS
3-6
;Logical OR construction example:
11: If (X
!
F) (P89)
1:
1
X Loc [ DO_ppm ]
2:
4
<
3:
3.5
F
4:
30
Then Do
12: Do (P86)
1:
41
Set Port 1 High
13: Else (P94)
14: If (X
!
F) (P89)
1:
2
X Loc [ counter ]
2:
3
>=
3:
10
F
4:
30
Then Do
15: Do (P86)
1:
41
Set Port 1 High
16: End (P95)
17: End (P95)
A logical OR can also be constructed by setting
a flag high if a comparison is true. (The flag is
cleared or set low before making comparisons.)
After all comparisons have been made, execute
the desired instructions if the flag is set high.
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).
;CASE Logic construction example:
18: CASE (P93)
1:
3
Case Loc [ Reading ]
19: If Case Location < F (P83)
1:
1.8
F
2:
30
Then Do
;See Section 9 for details of this Instruction
20: AC Half Bridge (P5)
21: End (P95)
22: If Case Location < F (P83)
1:
9.25
F
2:
30
Then do
;See Section 9 for details of this Instruction
23: Full Bridge (P6)
24: End (P95)
25: If Case Location < F (P83)
1:
280
F
2:
30
Then do
;See Section 9 for details of this Instruction
26: Full Bridge (P6)
27: End (P95)
28: End (P95)
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 6, see
Instruction 85, Section 12). Branching and loop
nesting start at zero in each subroutine.
Содержание CR510
Страница 1: ...CR510 DATALOGGER OPERATOR S MANUAL REVISION 2 03 COPYRIGHT c 1986 2003 CAMPBELL SCIENTIFIC INC ...
Страница 2: ...This is a blank page ...
Страница 4: ...This is a blank page ...
Страница 10: ...This is a blank page ...
Страница 44: ...SECTION 1 FUNCTIONAL MODES 1 14 This is a blank page ...
Страница 56: ...SECTION 3 INSTRUCTION SET BASICS 3 8 ...
Страница 104: ...SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES 8 8 This is a blank page ...
Страница 128: ...SECTION 10 PROCESSING INSTRUCTIONS 10 8 This is a blank page ...
Страница 144: ...SECTION 12 PROGRAM CONTROL INSTRUCTIONS 12 10 This is a blank page ...
Страница 172: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 10 This is a blank page ...
Страница 176: ...APPENDIX A GLOSSARY A 4 This is a blank page ...
Страница 184: ...This is a blank page ...
Страница 188: ...APPENDIX D DATALOGGER INITIATED COMMUNICATIONS D 4 This is a blank page ...
Страница 196: ...APPENDIX F MODBUS ON THE CR10 X AND CR510 F 4 This is a blank page ...
Страница 197: ...APPENDIX G TD OPERATING SYSTEM ADDENDUM FOR CR510 CR10X AND CR23X MANUALS ...
Страница 198: ...This is a blank page ...
Страница 200: ...This is a blank page ...
Страница 206: ...TABLE DATA ADDENDUM AD 6 This is a blank page ...
Страница 222: ...TD ADDENDUM SECTION 1 FUNCTIONAL MODES AD 1 8 This is a blank page ...
Страница 238: ...TD ADDENDUM SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES AD 8 10 This is a blank page ...
Страница 240: ...This is a blank page ...