Campbell Scientific CR10 CR10 Measurement and Control - Page 161

command., realtime, willalways, realtime, hour., realtime interual., second., willonly,

Page 161 highlights

SECTION 12. PROGRAM CONTROL INSTRUCTIONS PARAM. DATA NUMBER TYPE 01: 2 DESCRIPTION lncrement for the loop index counter *** 91 IF FLAG / PORT *** FUNCTION This lnstruction checks the status of one of the ten Flags or one of the eight ports and conditionally performs the specified Command. The first Parameter specifies the condition to check: 21XX 4X 5X Execute command if Flag X is high Execute command if Flag X is low Execute command if port X is high Execute command if port X is low PARAM. DATA NUMBER TYPE DESCRIPTION 01: 2 Flag or Port condition to check O2: 2 Command (Table 3.8-1) t** 92 lF TIME *** FUNCTION The user specifies the number of minutes or seconds into an interual, the duration of the interval, and a command. The command is executed each time the realtime is the specified time into the interval. The "lf" condition willalways be false if 0000 is entered as the time interval. The time interval is synchronized with realtime; 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 (lnstruction 46) of the number of minutes since midnight by the specified realtime interual. lf the result is 0, the interual is up. Thus, the first interval of the day always starts at midnight (0 minutes). The time into an interual is only true the first time lnstruction 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 willonly be one output generated by this instruction, not five. The time into intervaland 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 intervalwillalso be interpreted as seconds. The Output Flag (Flag 0) is a specialcase in that it will automatically be cleared if it is not time to set it. 01: t PARAM. NUMBER TDAYTAPE DESCRIPTION l,ir"",llf,il"?ll.0. n entered XXXX--) 02: 4 Time interval(minutes or seconds if time into interualis XXXX-) 03: 2 Command (Table 3.8-1) *** 93 BEGIN CASE STATEMENT *** The value in the specitied input location is compared against parameters in following lf Case instructions (83). When a comparison is true, the command in the lf Case instruction is executed and the program flow goes to the End instruction (95) associated with the Begin Case instruction. PARAM. NUMBER TDAYTAPE 01: 4 DESCRIPTION Input location for subsequent comparisons E)(AMPLE: 01: P93 01: 2 02 P83 01: 69.4 02: 3 else 03: P83 01: 72 02: 10 else 04: P83 01: 77.3 02: 30 Case Case Loc lf Case Location < F F CallSubroutine 3 lf Case Location < F F Set high Flag 0 (output) lf Case Location < F F Then Do 12-5

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238

PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
2
lncrement for
the
loop
index
counter
***
91
IF
FLAG
/
PORT
***
FUNCTION
This
lnstruction checks the status of one
of
the
ten
Flags or one
of
the eight
ports and
conditionally
performs
the
specified Command.
The
first
Parameter specifies the condition
to
check:
1X
Execute
command
if Flag
X
is high
2X
Execute
command if
Flag
X
is low
4X
Execute
command
if port
X
is high
5X
Execute
command
if port
X
is low
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
2
Flag
or
Port condition
to
check
O2:
2
Command
(Table 3.8-1)
t**
92
lF
TIME
***
FUNCTION
The
user specifies
the
number
of
minutes
or
seconds into
an
interual, the duration
of
the
interval, and a
command.
The
command
is
executed each time
the
realtime
is
the
specified
time
into
the interval. The
"lf"
condition
willalways
be
false
if
0000
is
entered
as the
time
interval.
The
time
interval is synchronized
with
realtime;
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
(lnstruction
46)
of
the
number of minutes since
midnight by
the specified
realtime interual.
lf
the
result is 0,
the
interual is
up.
Thus,
the
first
interval
of
the
day
always starts at midnight (0 minutes).
The
time
into
an
interual
is
only true the first
time
lnstruction 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
willonly
be one output generated
by
this
instruction,
not
five.
SECTION
12.
PROGRAM CONTROL
INSTRUCTIONS
The
time
into
intervaland 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
intervalwillalso
be interpreted as seconds.
The Output
Flag (Flag
0)
is
a
specialcase
in
that
it
will automatically be cleared if it is
not
time to set
it.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01: t
l,ir"",llf,il"?ll.0.
n
entered XXXX--)
02:
4
Time interval(minutes
or
seconds
if
time
into
interualis
XXXX-)
03:
2
Command
(Table 3.8-1)
***
93
BEGIN
CASE STATEMENT
***
The
value
in
the specitied input location
is
compared against
parameters
in
following
lf
Case instructions
(83).
When
a
comparison
is
true, the
command
in
the
lf
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:
E)(AMPLE:
4
Input location
for
subsequent comparisons
Case
Case
Loc
02
P83
lf
Case
Location
<
F
01: 69.4
F
02:
3
CallSubroutine
3
else
03:
P83
lf Case Location
<
F
01: 72
F
02: 10
Set high Flag
0
(output)
else
04:
P83
lf Case Location
<
F
01: 77.3
F
02: 30
Then
Do
01:
P93
01:
2
12-5