12-1
SECTION 12. PROGRAM CONTROL INSTRUCTIONS
TABLE 12-1. Flag Description
Flag 0
Output Flag
Flag 1 to 8
User Flags
Flag 9
Intermediate Processing
Disable Flag
TABLE 12-2. Command Codes
0
Go to end of program table
2
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
Set Port 1 high
51
Set Port 1 low
61
Toggle Port 1
71
Pulse Port 1
1
98 is a special subroutine that can be called
by Control port 2 going high; see Instruction
85 for details.
2
If this command is executed while in a
subroutine, execution jumps directly to the
end of the table that called the subroutine.
*** 83 IF CASE X < F ***
FUNCTION
If the value in the location specified in the Begin
Case Instruction 93 is less than the fixed value
entered as parameter 1 then execute the
command in parameter 2 then go to the end of
the case statement when the next Instruction 83
occurs. Else, continue to next instruction. See
Instruction 93 for an example.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
FP
Fixed value
02:
2
Command
*** 85 LABEL SUBROUTINE ***
FUNCTION
This instruction marks the start of a subroutine.
Subroutines are a series of instructions
beginning with Instruction 85 and terminated
with Instruction 95, END. All subroutines must
be placed in Table 3 (Subroutine Table). When
a subroutine is called by a command in a
Program Control Instruction, the subroutine is
executed, then program flow continues with the
instruction following that which called the
subroutine.
Subroutines may be called from within other
subroutines (nested). The maximum nesting
level for subroutines is 6 deep. Attempts to
nest more than 6 deep will not be detected at
compilation, but will result in a run time error.
When the sixth subroutine attempts to call the
seventh, error 31 will be displayed. Execution
will not branch to the seventh subroutine; it will
continue with the Instruction following that
calling the subroutine.
98 PORT INTERRUPT SUBROUTINE. If
subroutine 98 is included in Table 3 then Port 2
will cause an interrupt on the rising edge and
the subroutine will be executed. This
subroutine can also be called from any table.
This subroutine can interrupt Table 1 or 2 or
can occur when neither Table is being
executed. When port 2 activating 98 goes high
during the execution of a table, the instruction
being executed is completed before the
subroutine is run (i.e. it is as if the subroutine
was called by the next instruction).
The priority is 98, Table 1, Table 2.
While 98 is being executed as a result of the C2
going high, that port interrupt is disabled (i.e.,
the subroutine must be completed before the
port going high will have any effect).
NOTE:
If Control Port 2 is used for pulse
measurements or interrupt subroutines, the
CR510 will not go into the quiescent power
state (0.7 mA), if Control Ports 2 is high.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
2
Subroutine number
(1-9, 79-99)
Содержание 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 ...