Campbell Scientific CR10 CR10 Measurement and Control - Page 211

Command, loc.]F

Page 211 highlights

APPENDIX C. BINARY TELECOMMUNICATIONS C.l TELECOMMUNICATIONS COMMAND WITH BINARY RESPONSES Command DescriPtion [no. of loc.]F BINARY DUMP - CR10 sends, in FinalStorage Format (binary, the number of Final Storage locations sPecified (from current MPTR locations), then Signature (no PromPt). DATALOGGER J AND K COMMANDS 3142J The 3142J command is used to toggle datalogger user flags, request final storage data, and to establish the input locations returned by the K command. The format of the command is as follows: 31 42J abcd'.. n N U LL w'l)he"r3e142J" is the command. 2) "a" is a 1 byte value representing the user flags to be toggled. The most significant bit (MSB), if set, will toggle datalogger user flag 8. Likewise, the 2nd most significant bit, if set, will toggle user flag 7, and so on to the least significant bit which, if set, toggles user flag 1. Toggle means that if a flag is set, it will be then reset, or if it is reset, it will be set. 3) 'b" is a 1 byte value whose MSB will determine whether Final Storage Data is returned after the K command. lf the bit is set, Final Storage Data, if any, will be returned after the next K command' The datalogger initially has this bit reset upon entering telecommunications, but once set by a J command, it will remain set until reset by another J command or telecommunications is terminated. The 2nd MSB set means a port toggle byte will follow and port status is to be returned with the K command. Like the MSB, this bit is reset upon entering telecommunications, but remains set once set until reset by another J command or telecommunications is terminated. Currently only the CR10 datalogger recognizes this bit' The remaining bits are reserved. 4) lf the 2nd MSB in "b" was set then "c" is a port toggle byte, otherwise "c,d,...,n" are each 1 byte binary values each representing a datalogger input storage location. The data at those locations will be returned after the next K command. ASCllcode 1 (0000001 binary) represents input location 1. ASCII codes 2 (00000010 binary) represents input location 2, and so on. The order of the location requests is not important. The list is limited, however, to 62 total location requests. 5) "Null" or ASCII code O (00000000 binary ) terminates the J command. Alternately, 11111111 binary aborts the J command. lf aborted, flags will not be toggled and location requests will not be saved. User Enters 3 1 4 2 J CR Datalogger Echo 2 1 4 2 J CR LF a a b b c c d d n n Null Null The K command returns datalogger time, user flag status, port status if requested, the data at the input locations requested in the J command, and FinalStorage Data if requested by the J command. The format of the command is K (K Return). The datalogger will echo the K and Return and send a Line Feed. The amount of data that follows depends on the J command previously executed; four time bytes, a user flags byte, four bytes for each input location requested in the J command, Final Storage data in CSI's binary format if requested by the J command, and terminating in 7F 00 HEX and two signature bYtes. c-1

  • 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

APPENDIX
C.
BINARY TELECOMMUNICATIONS
C.l
TELECOMMUNICATIONS
COMMAND WITH BINARY
RESPONSES
Command
DescriPtion
[no.
of
loc.]F
BINARY DUMP
- CR10 sends,
in FinalStorage
Format
(binary,
the
number
of
Final
Storage
locations sPecified
(from
current MPTR
locations),
then Signature
(no
PromPt).
DATALOGGER J AND
K
COMMANDS
3142J
The
3142J
command
is used to
toggle
datalogger
user
flags,
request
final
storage
data, and
to
establish
the
input locations
returned by
the
K
command.
The
format
of
the
command
is as follows:
31 42J
<CR>abcd'..
n
N
U
LL
where
'l)
"3142J<CR>"
is
the
command.
2)
"a"
is
a
1
byte
value
representing
the
user
flags
to
be
toggled.
The
most
significant
bit
(MSB), if set, will toggle
datalogger
user
flag
8.
Likewise, the
2nd
most
significant
bit, if set, will
toggle user flag
7,
and
so on to
the
least
significant bit
which,
if set,
toggles
user
flag
1.
Toggle
means
that
if a
flag
is set,
it
will
be
then
reset,
or
if it
is
reset,
it
will
be set.
3)
'b"
is
a
1
byte value
whose
MSB will determine
whether
Final
Storage
Data is returned after
the
K
command.
lf
the
bit is
set,
Final
Storage
Data, if
any,
will be
returned after
the
next
K
command'
The
datalogger
initially has this bit reset upon
entering
telecommunications,
but once set by
a J
command,
it
will
remain
set
until reset by another
J
command
or
telecommunications
is
terminated.
The
2nd
MSB set means
a
port
toggle
byte will
follow
and
port
status
is
to
be returned with
the
K
command.
Like
the
MSB,
this
bit
is
reset
upon entering
telecommunications, but
remains
set once set
until
reset by another J command
or
telecommunications
is
terminated.
Currently
only
the
CR10
datalogger
recognizes
this
bit'
The
remaining bits
are
reserved.
4)
lf
the
2nd
MSB in "b" was set
then
"c" is
a
port
toggle
byte,
otherwise
"c,d,...,n" are
each
1
byte binary values
each
representing
a
datalogger
input
storage
location.
The data
at
those
locations
will be
returned after
the
next K
command. ASCllcode
1
(0000001 binary)
represents input location
1.
ASCII codes
2
(00000010 binary) represents
input
location
2,
and so on.
The
order of
the location
requests
is
not
important.
The
list is limited, however, to 62
total location
requests.
5)
"Null"
or ASCII code
O
(00000000 binary
)
terminates the J
command.
Alternately,
11111111 binary aborts the J
command.
lf
aborted, flags
will
not
be
toggled
and location
requests
will
not be saved.
User
Enters
Datalogger
Echo
2
3
1
4
2
J
CR
a
b
c
d
n
Null
1
4
2
J
CR
LF
a
b
c
d
n
Null
The
K
command
returns datalogger time,
user
flag status,
port
status if
requested,
the
data
at
the
input locations requested
in
the
J
command, and FinalStorage
Data if
requested by
the
J
command.
The
format
of
the command
is K<CR> (K
Return). The
datalogger will echo
the
K
and
Return and
send
a Line
Feed.
The
amount of data
that
follows depends
on
the J command
previously
executed;
four
time
bytes,
a
user
flags
byte,
four
bytes
for each
input location
requested
in
the J
command,
Final Storage
data
in
CSI's
binary
format
if requested by
the J command, and
terminating
in 7F 00
HEX and two signature
bYtes.
c-1