Campbell Scientific CR23X Micrologger User Manual
Page 270

APPENDIX C. BINARY TELECOMMUNICATIONS
C-2
another J command or telecommunications
is terminated.
The 4th MSB indicates if the input locations
requested by the J command are 2 byte (B4
set) or 1 byte. In the case of 2 byte
locations (most significant byte first), the
terminating location is a 2 byte NULL. FF in
the most significant byte will still abort the
command.
If “b” = FF or 11111111, then the J
command aborts.
The remaining bits are reserved.
4) If 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. ASCII
code 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 0 (00000000 binary)
terminates the J command. Alternately,
11111111 binary aborts the J command. If
aborted, flags will not be toggled and
location requests will not be saved.
For example:
User
Datalogger
Enters
Echo
2
2
4
4
1
1
3
3
J
J
CR
CR
LF
<
a
a
b
b
c
c
d
d
n
n
Null
Null
K
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 Final Storage Data if
requested by the J command. The format of
the command is K
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.
User
Datalogger
Enters
Echo
K
K
CR
CR
LF
Time Minutes byte 1
Time Minutes byte 2
Time Tenths byte 1
Time Tenths byte 2
Flags 1..8 byte
Ports byte (if requested)
Flags 11..18 byte (if requested)
Data1 byte 1
Data1 byte 2
Data1 byte 3
Data1 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
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 C6 HEX) is 454
decimal or 45.4 seconds. Thus the datalogger
time for 01 59 01 C6 HEX is 5:45:45.4.