Campbell Scientific CR10 CR10 Measurement and Control - Page 21

ovERvlEw, over.

Page 21 highlights

cR10 ovERvlEw OV2.2 CRlO INSTRUCTION TYPES Figure OV2.1-1 illustrates the use of three different instruction types which act on data. The fourth type, Program Control, is used to control output times and vary program execution. Instructions are identified by numbers. 1. TNPUT/OUTPUT INSTRUCTIONS (1-28, 101-104, Section 9) controlthe terminal strip inputs and outputs (the sensor is the source, Figure OV1 .1-2), storing the results in Input Storage (destination). Multiplier and offset parameters allow conversion of linear signals into engineering units. The Digital l/O Ports are also addressed with l/O lnstructions. 2. PROCESSING INSTRUCTIONS (30-66, Section 1 0) perform numerical operations on values located in Input Storage (source) and store the results back in Input Storage (destination). These instructions can be used to develop high level algorithms to process measurements prior to Output Processing. 3. OUTPUT PROCESSING INSTRUCTIONS (69-82, Section 11) are the onlY instructions which store data in Final Storage (destination). Input Storage (source) values are processed over time to obtain averages, maxima, minima, etc. There are two types of processing done by Output Instructions: Intermediate and Final. Intermediate processing normally takes place each time the instruction is executed. For example, when the Average Instruction is executed, it adds the values from the input locations being averaged to running totals in Intermediate Storage. lt also keeps track of the number of samples. Final processing occurs only when the Output Flag is high. The Output Processing Instructions check the Output Flag. lf the flag is high, finalvalues are calculated and output. With the Average, the totals are divided by the number of samples and the resulting averages sent to Final Storage. lntermediate locations are zeroed and the process starts over. The Output Flag, Flag 4 is set high by a Program Control lnstruction which must precede the Output Processing Instructions in the user entered program. 4. PROGRAM CONTROL INSTRUCTIONS (83-98, Section 12) are used for logic decisions and conditional statements. They can set flags, compare values or times, execute loops, call subroutines, conditionally execute portions of the program, etc. OV2.3 PROGRAMTABI.ES, EXECUNON INTERVAL AND OUTPUT INTERVALS Programs are entered in Tables 1 and 2. Subroutines, called from Tables 1 and 2, are entered in Subroutine Table 3. The size of each table is flexible, limited only by the totalamount of program memory. lf Table 1 is the only table programmed, the entire program memory is available for Table 1. Table 1 and Table 2 have independent execution intervals, entered in units of seconds with an allowable range of 1/64 to 8191 seconds. Subroutine Table 3 has no execution interval; subroutines are only executed when called from Table 1 or 2. OV2.3.1 THE EXECUTION INTERVAL The execution interval specifies how often the program in the table is executed, which is usually determined by how often the sensors are to be measured. Unless two different measurement rates are needed, use only one table. A program table is executed sequentially starting with the tir:st instruction in the table and proceeding to the.end of the table. ov-7

  • 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

OV2.2
CRlO
INSTRUCTION
TYPES
Figure
OV2.1-1
illustrates
the
use
of
three
different instruction types which act on data.
The fourth
type,
Program Control, is used to
control output times and
vary
program
execution.
Instructions
are
identified by
numbers.
1.
TNPUT/OUTPUT
INSTRUCTIONS
(1-28,
101-104, Section 9)
controlthe
terminal
strip inputs and
outputs
(the
sensor
is
the
source,
Figure
OV1
.1-2), storing
the
results
in Input Storage
(destination).
Multiplier
and
offset
parameters allow conversion
of
linear signals into engineering units. The
Digital
l/O
Ports
are
also addressed
with
l/O
lnstructions.
2.
PROCESSING INSTRUCTIONS
(30-66,
Section
1
0) perform numerical operations
on
values
located
in
Input
Storage
(source)
and store
the
results back
in
Input Storage
(destination). These
instructions
can
be
used
to develop
high level algorithms
to
process measurements prior
to Output
Processing.
3.
OUTPUT
PROCESSING INSTRUCTIONS
(69-82,
Section
11) are the
onlY
instructions which store data in Final
Storage
(destination).
Input Storage
(source) values
are
processed over time
to
obtain
averages,
maxima, minima, etc.
There are two types of processing done by
Output Instructions:
Intermediate
and
Final.
Intermediate processing
normally takes
place each time
the
instruction
is
executed.
For example, when the
Average
Instruction
is
executed,
it
adds the values from
the
input locations being averaged
to
running
totals
in
Intermediate
Storage.
lt
also
keeps
track
of
the
number of samples.
cR10
ovERvlEw
Final processing
occurs only when
the
Output
Flag is
high.
The Output
Processing
Instructions check the
Output
Flag.
lf
the
flag
is high,
finalvalues
are calculated and
output.
With the Average, the
totals
are
divided by
the
number of samples and
the
resulting averages sent
to
Final Storage.
lntermediate
locations are zeroed and the
process starts
over.
The Output Flag, Flag
4
is set high by
a
Program
Control
lnstruction which
must
precede
the
Output
Processing Instructions
in
the
user
entered
program.
4.
PROGRAM CONTROL
INSTRUCTIONS
(83-98,
Section
12)
are
used
for
logic
decisions and conditional
statements. They
can
set flags,
compare
values or times,
execute loops, call subroutines, conditionally
execute
portions
of
the
program, etc.
OV2.3
PROGRAMTABI.ES, EXECUNON
INTERVAL AND
OUTPUT
INTERVALS
Programs are
entered
in
Tables
1
and
2.
Subroutines, called from
Tables
1
and 2, are
entered
in Subroutine Table
3.
The size of each
table
is
flexible,
limited only by the
totalamount
of
program
memory.
lf
Table
1 is
the
only table
programmed,
the entire program
memory
is
available for
Table
1.
Table
1
and
Table 2
have independent
execution
intervals,
entered
in units of seconds
with an
allowable
range
of
1/64 to
8191
seconds.
Subroutine
Table 3
has no execution
interval; subroutines are only executed when
called from
Table
1
or
2.
OV2.3.1
THE EXECUTION INTERVAL
The
execution
interval
specifies
how often
the
program
in
the
table
is executed, which
is
usually determined
by
how often
the
sensors
are
to be
measured.
Unless two
different
measurement rates are
needed,
use
only one
table.
A
program
table
is
executed
sequentially
starting with the
tir:st
instruction
in
the table and
proceeding to
the.end
of
the table.
ov-7