Format - Campbell 21X Operator's Manual

Micrologger
Table of Contents

Advertisement

User
Enters
K
CR
APPENDIX
C.
BINARY TELECOMMUNICATIONS
previously
executed;
four
time bytes, a user
flags byte,
four bytes for each input location
requested
in
the J
command, Final Storage
data in Campbell Scientific's binary
format
if
requested by the J command, and
terminating
in
7F
00 HEX and two signature
bytes.
The optional ports byte expresses
the
datalogger port
status. The
most
significant bit
represents Port 8, and so on to
the least
significant bit
which represents Port1.
For
each input location requested
by
the
J
command
four bytes of data are returned. The
bytes are coded in Campbell
Scientific,
Inc.
Floating Point
Format.
The
format
is
decoded
to the following:
Si
g
n
(Mantissa*2(ExPonent))
The Data byte
1
contains the Sign and the
Exponent. The most significant bit represents
the Sign; if reset the Sign is
positive.
Subtract
40,hex from the
7 least significant bits to obtain
the signed exponent.
Data bytes
2lo
4
are
a binary representation of
the mantissa with byte
2
the most significant
and
4
the
least. The
mantissa ranges
in
value
from
80 00
00 HEX
(.5
decimal)
to FF FF FF HEX
(1
bit less
than
1
decimal,
1-2-2\.
As an example, 41 80
OO
OO
HEX =
+(.5.2(+1);
=.5*2=ldecimal.
Note Exceptions:
00
HEX=
Odecimal
FF
HEX
=
-99999 decima
lf appropriately requested by
a
J command,
Final Storage data,
if
any,
will immediately
follow
the input location
data.
Refer to the
datalogger manual for
a
description of how to
decode
FinalStorage data in Campbell
Scientitic's binary data
format.
Final Storage
data will be limited
to not more than 1024 bvtes
per
K
command.
The
K
command data
is
terminated
with 7F 00
HEX (a unique binary format code)
followed by
two signature
bytes.
Refer to the
datalogger
manual for
the meaning and calculation
of
the
signature
bytes.
The signature
in
this
case
is a
function of the first
time byte through the 7F
OO
HEX
bytes.
Calculate the signature
of
the bytes
received and compare with
the signature
received to determine the validity
of
the
transmission.
Datalogger
Echo
K
CR
LF
Time Minutes byte
1
Time Minutes byte
2
Time
Tenths byte
1
Time
Tenths byte
2
Flags byte
Ports byte (if requested)
Datal
byte
1
Datal
byte
2
Datal
byte
3
Datal
byte
4
Data2 byte
1
Data2 byte
2
Data2 byte
3
Data2 byte
4
DataN byte
1
DataN byte
2
DataN byte
3
DataN byte
4
Final Storage Data bytes
01111111 binary byte
00000000 binary byte
Signature byte
1
Signature byte
2
00 00
00
FF FF
FF
Time Minutes byte
1
is most significant.
Convert
from binary to
decimal.
Divide by 60 to
get hours,
the remainder is
minutes.
For
example, 00000001 01011001 (01
59 HEX)
is
345 decimal minutes or 5:45.
Time
Tenths byte
1
is most
significant.
Convert
from binary to
decimal.
Divide
by
10
to get
seconds and
tenths of
seconds.
For example,
00000001 11000110 (01
CO
HEX)
is
454
decimal
or
45.4
seconds. Thus the datalogger
time for 01 59
01
CG
HEX is 5:45:45.4.
The Flags byte expresses datalogger user flag
status. The
most significant bit represents Flag
8,
and so on to
the least significant bit which
represents Flag
1.
lf a bit is set,
the user flag
is
set
in
the datalogger.
c-2

Advertisement

Table of Contents
loading

Table of Contents