Campbell Scientific CR10 CR10 Measurement and Control - Page 162

false, ACTIVATE SERIAL DATA OUTPUT, Output, Table, Control, format, PROGRAM CONTROL, Statement,

Page 162 highlights

sEcTroN 12. PROGRAM CONTROL INSTRUCTIONS 05: P30 01: 0 02: 0 03: 25 Z=F F Exponent ol 10 ZLoc: 06: P95 End Then Do 07: P95 End of Case Statement *** 94 ELSE *** FUNCTION When Command 30 (Then/Else) is used with an lf lnstruction, 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 lnstruction. Instruction 94 has no parameters. *** 95 END *** FUNCTION lnstruction 95 is used to indicate the end/return of a subroutine (lnstruction 85), the end of a loop (lnstruction B7), the end of an lf Then/Else sequence (lnstructions 88-92 when used with command 30), or the end of a Case sequence (lnstruction 93). The End Instruction has no parameters. *** 96 ACTIVATE SERIAL DATA OUTPUT *** FUNCTION lnstruction 96 is used to activate tape, Storage Module (SM192/SM716 or Card Storage Module), or serial data (printer) output. Normally lnstruction 96 is placed in the program table after all Output Instructions have been entered and is executed each time the Table is executed. In this situation any data sent to Final Storage is output as soon as possible. However, by using Program Control Instructions to allow execution of Instruction 96 only at certain times, the user can control when the output device(s) are active. lnstruction 96 allows a choice of serial data format and the selection of Addressed or Pin Enabled device for the serial print output. A single parameter is used to select whether the instruction is to control the tape, "printer", or Storage Module output, and if the printer is selected, the format and baud rate. The Instruction must be entered separately for each device that is to receive output. lf both Final Storage areas are in use, Instruction 96 will send data from the area which is currently active. FinalStorage Area 1 is active at the start ol each Table. Instruction 80 can be used to change the active area. The Area set by Instruction 80 remains active until changed by another Instruction 80 or the Table ends (at which time Area 1 becomes the active Area 1). Instruction 80 can also direct output to lnput Storage, in which case lnstruction 96 assumes Final Storage Area 1. lf the CR10 is already communicating on the 9pin connector when Instruction 96 is executed, the output request is put in a queue and program execution continues. As the 9-pin connector becomes available, each device in the queue will get its turn. The request is not put in the queue if the same device is already in the queue. The data contained in the queue (and which determine a unique entry) are baud rate (if applicable), and the Final Storage Area. Instruction 98 to send characters also uses this queue. When an entry reaches the top of the queue, the CR10 sends alldata accumulated since the last transfer to the device up to the location of the DSP at the time the device became active (this allows everything in the queue to get a turn even if data is being stored faster than it can be transferred to a particular device). Tape output code 00 will not activate the tape untilat least 512 Final Storage Locations have been stored. Code 09 willcause any data between the TPTR and the DSP (location at time lnstruction 96 is executed) to be written to tape. Code 00 is used for most tape applications (Section 4.1 ). The "other Final Storage Area" device option non-active area) allows a "fast" Final Storage be transferred to the main area on some trigger condition so there is some history recorded pri the trigger condition (Section 8.8). 12-6

  • 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

sEcTroN
12.
05:
01:
02:
03:
06:
07:
End
***
94
ELSE
***
FUNCTION
When Command
30
(Then/Else) is used with an
lf
lnstruction,
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 lnstruction.
Instruction
94
has no parameters.
***
95
END
***
FUNCTION
lnstruction 95 is used
to
indicate the end/return
of
a
subroutine (lnstruction 85), the end of a
loop (lnstruction
B7),
the
end of
an
lf
Then/Else
sequence (lnstructions 88-92
when
used with
command 30), or the end of a Case sequence
(lnstruction
93).
The
End Instruction has
no
parameters.
***
96
ACTIVATE SERIAL DATA OUTPUT
***
FUNCTION
lnstruction 96 is used to activate tape, Storage
Module (SM192/SM716 or Card Storage
Module), or serial
data
(printer) output.
Normally lnstruction
96
is placed
in
the
program
table after all
Output
Instructions have been
entered and is executed each time the
Table
is
executed.
In
this situation any data sent
to
Final
Storage is output as soon as possible.
However, by using Program
Control
Instructions
to allow execution
of
Instruction 96 only at
certain times,
the
user can control when
the
output device(s) are
active.
lnstruction 96
allows a choice of serial data
format
and
the
selection of Addressed or Pin Enabled device
for the serial print output.
A single parameter is used
to
select whether
the
instruction
is
to control the
tape,
"printer", or
Storage Module output, and
if
the
printer
is
selected, the
format
and baud
rate.
The
PROGRAM CONTROL
INSTRUCTIONS
Z=F
F
Exponent
ol
10
ZLoc:
Then Do
of Case
Statement
Instruction must be entered separately for each
device
that
is
to
receive output.
lf both Final Storage areas are in
use,
Instruction 96 will send data from the area
which
is
currently
active.
FinalStorage Area
1
is
active
at
the start
ol
each
Table.
Instruction
80
can
be used to change the active
area.
The
Area set
by
Instruction
80
remains active
until
changed by
another
Instruction 80
or
the Table
ends
(at
which time
Area
1
becomes
the
active
Area
1).
Instruction 80 can also direct output
to
lnput
Storage,
in
which
case
lnstruction 96
assumes Final Storage
Area
1.
lf
the
CR10
is
already communicating on the
9-
pin
connector
when
Instruction 96 is executed,
the output request is put
in
a queue and
program execution
continues.
As
the
9-pin
connector becomes available, each device
in
the queue will
get
its
turn.
The
request is not put
in
the
queue
if
the
same
device
is
already
in
the
queue.
The
data
contained
in
the
queue
(and which determine
a
unique entry) are baud rate
(if
applicable),
and
the
Final Storage
Area.
Instruction
98
to send
characters also uses
this
queue.
When an
entry
reaches the top
of
the queue,
the
CR10 sends
alldata
accumulated since the
last transfer to the device
up
to
the
location
of
the
DSP
at
the time the device became active
(this allows everything
in
the queue
to
get
a
turn
even
if
data is being stored faster
than
it can be
transferred to
a
particular device).
Tape output code 00
will
not activate the tape
untilat
least
512
Final Storage Locations have
been stored. Code
09
willcause
any data
between the TPTR and
the
DSP (location at
time
lnstruction
96
is
executed)
to
be
written
to
tape.
Code
00
is used
for
most tape
applications (Section
4.1
).
The
"other Final Storage Area" device option
non-active area) allows
a
"fast" Final Storage
be
transferred to
the
main area on some
trigger
condition so
there
is
some
history recorded
pri
the trigger condition (Section 8.8).
End
P30
0
0
25
P95
P95
12-6