Campbell Scientific CR10 CR10 Measurement and Control - Page 38

First., Setting, Displaying

Page 38 highlights

SECTION 1. FUNCTIONAL MODES Subroutines 97 and 98 have the unique capability of being executed when a port goes high (ports 7 and 8 respectively). Either subroutine will interrupt Tables 1 and 2 (Section 1.1.3) when the appropriate port goes high. PorlT cannot wake the processor, subroutine 97 will be executed at the next 1/8 second interval after the port'goes high. Port 8 will wake the processor within a few microseconds. The port triggers on the rising edge (i.e., when it goes from low to high). lf the port stays high the subroutine is not called again. 1.1.3 TABLE PRIORITY/INTERRUPTS Table 1 execution has priority over Table 2. lf Table 2 is being executed when it is time to execute Table 1, Table 2 will be interrupted. After Table 1 processing is completed, Table 2 processing resumes at the interruption point. lf the execution interval of Table 2 coincides with Table 1, Table 1 is executed first, then Table 2. Interrupts by Table 1 are not allowed in the middle of an instruction or while output to Final Storage is in process (flag 0 is set high). The interrupt occurs as soon as the instruction is completed or flag 0 is set low. Special subroutines 97 and 98, initiated by a port going high (Section 1.1.2), can interrupt either Table 1 or 2 or can occur when neither is being executed. These subroutines can interrupt a table while the Output Flag is set. When the port activating 97 or 98 goes high during the execution of a table, the instruction being executed is completed before the subroutine is run (i.e., as if the subroutine was called by the next instruction). The priority is 98, 97, Table 1, Table 2. lf both 97 and 98 are pending (ports go high at the same time or both go high during the execution of the same instruction in one of the tables), 98 will be executed first. lf 97 or 98 has not interrupted a table then neither table can interrupt it. 97 and 98 cannot interrupt each other. However, when 97 or 98 interrupts a table, it is as if the subroutine were in the table (e.9., if 98 interrupts Table 2, either Table 1 or 97 can interrupt it). While 97 or 98 is being executed as a result of the respective port going high, that port interrupt is disabled (i.e., the subroutine must be completed before the port going high will have any effect). 1.1.4 COMPILING A PROGRAM When a program is first entered, or if any changes are made in the *1 , *2, *3, *A, or *C Modes, the program must be compiled before it starts running. The compile function checks for programming errors and optimizes program information for use during program execution. lf errors are detected, the appropriate error codes are indicated on the display (Section 8.10). The compile function is executed when the *0 saving , *6, or *B Modes a program listing are entered and in the *D Mode. prior The to compile function is only executed after a program change has been made and any subsequent use of any of these modes will return to the mode without recompiling. When the *0, *8, or *D Mode is used to compile all output ports and flags are set low, the timer is reset, and data values contained in lnput and Intermediate Storage are reset to zero. When the *6 Mode is used to compile data values contained in Input Storage, the state of flags, control ports, and the timer (lnstruction 26) are unaltered. Compiling always zeros Intermediate Storage. 1.2 SETTING AND DISPLAYING THE CLOCK - *5 MODE The *5 Mode is used to display time or change the year, day or time. When "*5" is entered, the time is displayed and updated approximately once a second or longer depending on the rate and degree of data collection and processing taking place. The sequence of time parameters displayed in the *5 Mode is given in Table 1.2-1. To set the year, day or time, enter the *5 Mode and advance to display the appropriate value. Key in the desired number and enter the value by keying "A". When a new value for hours and minutes is entered, the seconds are set lo zero and current time is again displayed. To exit the *5 Mode, key "*" and the mode you wish to enter. When the time is changed, a partial recompile is done automatically to synchronize the program with realtime. Changing time will also affect the output and execution intervals during which time is changed. Because time can only be set with a 1 second resolution, execution intervals of 1 second or less remain constant while time is reset. Averaged values willstill be accurate, 1-2

  • 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

SECTION
1.
FUNCTIONAL
MODES
Subroutines 97 and
98
have
the
unique
capability of being executed when a port goes
high (ports
7
and
8 respectively).
Either
subroutine
will
interrupt
Tables
1
and
2
(Section
1.1.3)
when
the
appropriate port goes high.
PorlT
cannot wake
the
processor,
subroutine
97
will
be executed
at
the
next
1/8
second
interval after the
port'goes
high.
Port
8
will
wake the processor within
a
few
microseconds.
The
port
triggers on
the
rising edge (i.e., when it
goes
from
low
to
high).
lf
the
port stays high
the
subroutine is not called again.
1.1.3 TABLE
PRIORITY/INTERRUPTS
Table
1
execution
has priority over
Table 2.
lf
Table
2
is being executed
when
it
is
time to
execute
Table
1,
Table
2
will
be interrupted.
After
Table
1
processing
is
completed, Table
2
processing resumes
at
the
interruption
point.
lf
the execution interval
of
Table
2
coincides with
Table
1,
Table
1
is executed first, then
Table
2.
Interrupts
by
Table
1
are not allowed
in
the
middle of
an
instruction or while output
to
Final
Storage is
in
process (flag
0
is set
high).
The
interrupt occurs as soon as
the
instruction
is
completed
or
flag 0
is
set
low.
Special subroutines
97
and 98, initiated by
a
port going high (Section 1.1.2),
can
interrupt
either
Table
1
or 2 or can occur
when
neither
is
being
executed.
These subroutines can
interrupt
a
table while the
Output
Flag
is
set.
When
the
port activating 97 or 98
goes
high
during
the
execution of
a
table,
the
instruction
being executed
is
completed
before
the
subroutine is run (i.e., as
if
the subroutine was
called
by
the
next instruction).
The
priority is 98, 97,
Table
1,
Table
2.
lf both
97 and 98 are pending (ports
go
high
at
the
same
time
or both go high during
the
execution
of
the same instruction
in
one
of
the tables), 98
will be executed
first.
lf 97 or
98
has not
interrupted
a
table
then
neither table can
interrupt
it.
97 and 98
cannot
interrupt each
other.
However, when 97 or
98
interrupts a
table, it is as
if
the subroutine
were
in
the table
(e.9.,
if
98
interrupts Table 2, either
Table
1
or
97
can
interrupt
it).
While
97 or
98
is being executed as
a
result
of
the
respective port going high,
that
port interrupt
is
disabled
(i.e., the subroutine must
be
completed before
the
port going high will have
any effect).
1.1.4
COMPILING
A
PROGRAM
When
a
program
is
first
entered,
or
if
any
changes
are
made
in
the
*1
,
*2, *3, *A,
or
*C
Modes,
the
program must be compiled before it
starts running.
The compile function checks
for
programming errors and optimizes program
information
for
use during program execution.
lf errors are detected, the appropriate
error
codes
are
indicated
on
the
display (Section
8.10).
The compile
function
is
executed when
the
*0
,
*6,
or
*B
Modes are entered and prior to
saving
a
program
listing
in
the
*D
Mode.
The
compile function
is
only executed after
a
program
change
has been made and any
subsequent use of any
of
these
modes will
return to
the
mode
without
recompiling.
When the
*0,
*8,
or
*D
Mode is used to compile
all output ports and flags are set low, the
timer
is reset, and data values contained
in
lnput and
Intermediate Storage
are
reset to zero.
When
the
*6
Mode is used to compile data
values contained
in
Input Storage,
the
state of
flags, control ports, and the
timer
(lnstruction
26)
are
unaltered.
Compiling always zeros
Intermediate Storage.
1.2
SETTING
AND
DISPLAYING THE
CLOCK
-
*5
MODE
The
*5
Mode is used to display time or change
the year, day
or
time.
When
"*5"
is
entered, the
time
is
displayed and updated approximately
once a second
or
longer depending on
the
rate
and degree of data collection and processing
taking
place.
The sequence of time parameters
displayed
in
the
*5
Mode
is
given
in
Table
1.2-1.
To set the year, day or time, enter
the
*5
Mode
and advance to display the appropriate value.
Key in the desired number and enter the value
by keying
"A".
When
a
new value
for
hours and
minutes is entered, the seconds are set
lo
zero
and current
time
is again
displayed.
To exit the
*5
Mode, key
"*"
and
the
mode you wish to
enter.
When the
time
is changed, a partial recompile
is
done
automatically
to
synchronize
the
program
with realtime.
Changing time will also affect the output and
execution intervals during which
time
is
changed.
Because time can only be set with
a
1
second resolution,
execution
intervals
of
1
second
or
less remain constant while
time
is
reset.
Averaged values
willstill
be accurate,
1-2