SECTION 12. PROGRAM CONTROL INSTRUCTIONS
12-4
*** 92 IF TIME ***
FUNCTION
The user specifies the number of minutes or
seconds into an interval, the duration of the
interval, and a command. The command is
executed each time the real time is the
specified time into the interval. The "If"
condition will always be false if 0000 is entered
as the time interval.
The time interval is synchronized with the
datalogger’s time; if a 60 minute time interval is
specified with 0 minutes into the interval, the
Command will be executed each hour on the
hour. The time interval is synchronized internally
by making a modulo divide (Instruction 46) of the
number of minutes since midnight by the
specified real time interval. If the result is 0, the
interval is up. Thus, the first interval of the day
always starts at midnight (0 minutes). The
maximum interval is 1440 minutes.
The time into an interval is only true the first
time Instruction 92 is executed within a given
minute (or second). For example, if the
command is to set the Output Flag at 0 minutes
into a 10 minute interval, and the execution
interval of the table is 10 seconds, every 10
minutes there will only be one output generated
by this instruction, not five.
The time into interval and the interval may be
entered in seconds for intervals less than 60
seconds.
To enter the times in seconds, press "C" after
keying in the number of seconds into the interval
for Parameter 1; two dashes will appear to the
right of the number (XXXX--). When the time
into interval is entered as seconds (XXXX--), the
time interval will also be interpreted as seconds.
The maximum number of seconds that can be
entered is 59 for Parameter 1 and 60 for
Parameter 2.
The Output Flag (Flag 0) is a special case in that it
will automatically be set low if it is not time to set it.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
4
Time into interval
(minutes or seconds if
entered XXXX--)
02:
4
Time interval (units
same as above)
03:
2
Command (Table 12-2)
*** 93 BEGIN CASE STATEMENT ***
The value in the specified input location is
compared against parameters in following If
Case instructions (83). When a comparison is
true, the command in the If Case instruction is
executed and the program flow goes to the End
instruction (95) associated with the Begin Case
instruction.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
4
Input location for
subsequent comparisons
EXAMPLE:
01:
P93
Case
01:
2
Case Loc
02:
P83
If Case Location < F
01:
69.4
F
02:
3
Call Subroutine 3
else
03:
P83
If Case Location < F
01:
72
F
02:
10
Set high Flag 0 (output)
else
04:
P83
If Case Location < F
01:
77.3
F
02:
30
Then Do
05:
P30
Z=F
01:
0
F
02:
0
Exponent of 10
03:
25
Z Loc :
06:
P95
End
Then Do
07:
P95
End
of Case
Statement
*** 94 ELSE ***
FUNCTION
When Command 30 (Then/Else) is used with an
If Instruction, the Else Instruction is used to
mark the start of the instructions to execute if
the test condition is false (Figure 3.8-1). The
Else Instruction is optional; when it is omitted, a
false comparison will result in execution
branching directly to the End Instruction.
Instruction 94 has no parameters.
Содержание 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 ...