Campbell Scientific CR10 CR10 Measurement and Control - Page 45

Functional

Page 45 highlights

SECTION-1. FUNCTIONAL MODES LOAD PROGRAM FROM ASCII FILE Command 2 sets up the CR10 to load a program which is input as serialASC|l data in the same form as sent in response to command 1. A download file need not follow exactly the same format that is used when listing a program (i.e., some of.the characters sent in the listing are not really used when a program is loaded). Some rules which must be followed are: 1. "M" must be the first character other than a carriage return, line feed, semicolon, or 7D Hex. The "M" serves the same function as "*" does from the keyboard. The order in which the Modes are sent in does not matter (i.e., the information for Mode 3 could be sent before that for Mode 1). 2. "S" is necessary prior to the Scan Rate (execution interval). 3. The colons (:) are used to mark the start of actual data. 4. A semicolon (;)tells the CR10 to ignore the rest of the line and can be used after an entry so that a comment can be added. There are 4 two-character control codes which may be used to verify that the CR10 receives a file correctly: ^B ^B (2hex, 2hex)-Discard current buffer and reset signature ^C ^C (3hex, 3hex)--Send signature for current buffer ^D ^D (4hex, 4hex)--Load current buffer and reset signature ^E ^E (Shex, Shex)--Load current butfer, Exit and compile program As a download file is received, the CR10 buffers the data in memory;the data is not loaded into the editor or compiled until the CR10 receives a command to do so. The maximum size of the buffer is 1.5K. The minimum file that could be sent is the program listing, then nE ^E. send the signature ^C ^C tells the (Appendix C.3) CR10 to for the current buffer of data, lf .this signature does not match that calculated by the sending device, ^B nB can be and reset the sent to discard the current signature. lf the signature buffer is correct, ^D ^D load the buffer can into be sent to the editor tellthe CRl0 and reset the to signature. Once the complete file has been sent and program verified, and exit send ^E the load ^E to compile command. the 1.8.2 PROGRAM TRANSFER WITH STORAGE MODULE The Storage Module and Keyboard/Display or Modem/Terminal must both be connected to the CR10. After keying *D, the command 7N, is entered (N is the Storage Module address 1-8, Section 3.3). Address 1 will work with any Storage Module address. The CR10 will search for the lowest address Storage Module that is connected. The command to save, load, or clear a program and the program number (Table 1.8-2) is entered. After the operation is finished "13:0000" is displayed. Error 96 indicates that the Storage Module is not connected or the wrong address was given. The datalogger can be programmed on powerup using a Storage Module. Storage Modules can store up to eight separate programs. lf a program is stored as program number 8, and if the Storage Module is connected to the datalogger l/O at power-up, program number 8 is down loaded to the datalogger. 1-9

  • 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

LOAD PROGRAM FROM
ASCII
FILE
Command 2 sets
up
the
CR10
to
load a program
which
is input as
serialASC|l
data
in
the
same
form
as
sent in
response to
command
1.
A download
file
need
not
follow exactly
the
same format
that
is used when listing a program
(i.e., some of.the
characters
sent
in
the
listing
are not really used when
a
program is loaded).
Some rules
which
must
be
followed
are:
1.
"M" must be the
first
character other than a
carriage
return, line feed,
semicolon,
or 7D
Hex.
The
"M" serves
the
same
function
as
"*" does from
the keyboard. The order
in
which
the
Modes are sent
in
does
not
matter (i.e.,
the
information
for
Mode
3
could be sent before that
for Mode
1).
2.
"S" is necessary prior to
the Scan
Rate
(execution interval).
3.
The
colons (:) are
used
to
mark
the
start
of
actual data.
4.
A
semicolon
(;)tells
the
CR10
to
ignore
the
rest
of
the
line and
can
be used after
an
entry so that
a
comment can
be added.
There
are
4
two-character
control codes which
may
be
used to verify that the
CR10
receives a
file correctly:
^B
^B
(2hex,
2hex)-Discard
current buffer
and
reset signature
^C
^C
(3hex, 3hex)--Send signature
for
current
buffer
^D
^D
(4hex, 4hex)--Load current buffer and
reset signature
^E
^E
(Shex, Shex)--Load current
butfer,
Exit
and compile program
As
a
download
file
is received,
the
CR10
buffers
the data
in
memory;the data
is not
loaded into the editor or
compiled
until
the
CR10 receives a command
to
do
so.
The
maximum size
of
the
buffer
is
1.5K.
The
minimum file that
could
be sent
is
the
program
listing, then
nE
^E.
^C ^C
tells
the
CR10
to
send the
signature
(Appendix C.3) for
the
current buffer of
data,
lf
.this
signature does
not
match that calculated
by
the
sending device,
^B
nB
can
be sent
to
discard the
current
buffer
and reset the
signature.
lf
the signature
is
correct,
^D ^D
can
be sent to
tellthe
CRl0
to
load
the
buffer into
the
editor and reset the
signature.
Once
the
complete
file
has been
sent and verified, send
^E ^E
to compile the
program and exit
the
load command.
SECTION-1. FUNCTIONAL
MODES
1.8.2
PROGRAM
TRANSFER
WITH
STORAGE
MODULE
The Storage Module and Keyboard/Display or
Modem/Terminal
must
both be connected to
the
CR10.
After
keying
*D,
the command
7N,
is
entered
(N
is
the
Storage Module
address
1-8,
Section
3.3).
Address
1
will work with any
Storage Module
address.
The
CR10 will search
for
the
lowest address Storage Module
that
is
connected.
The command
to save,
load,
or
clear
a program and
the program
number
(Table
1.8-2)
is
entered.
After
the operation
is
finished
"13:0000"
is
displayed.
Error 96
indicates that
the
Storage Module is not
connected or the wrong address
was
given.
The datalogger
can
be programmed
on
power-
up using
a
Storage
Module.
Storage Modules
can store
up
to
eight separate
programs.
lf
a
program
is
stored
as program
number 8, and
if
the
Storage Module
is
connected to
the
datalogger l/O
at power-up,
program
number
8
is
down
loaded to the datalogger.
1-9