Geometrics, Inc. G-822/G-823 Magnetometer Manual
24
2C 35 36 37 38 2C 30 30 30 30 0D 0A
[ '$'= 24, ' '= 20, '.'= 2E, ','= 2C, CR/LF = 0D 0A,
'0'-'9'= 3x (where x = number 0-9)]
Using the above definition the same data in packed BCD output format would be:
24 54 36 91 27 12 34 56 78 00 00 2A
\ \ \ \ \ \___Terminating character ('*')
\ \ \ \ \__analog channel #
3
('0000')
\ \ \ \__analog channel #2 ('5678')
\ \ \__analog channel #1 ('1234')
\ \__Mag reading ('54369.127')
\__Preamble Character ('$')
Note how easy it is to see the numbers if viewing a hex dump of the data. Remember
though that it must be translated to printable characters before copying the raw data to
printers or a CRT screen.
Commands that are echoed through the counter chain are received and sent as unmodified
ASCII strings. Thus all commands will appear in the binary data set after the next '*' data
terminating character and will be terminated itself by a carriage return line feed sequence.
Binary transmission then resumes with the next sample.
Excess 3 format
Excess three format is very similar to packed BCD. In fact the only difference is that each
byte has 33 hex added to it after converting to Packed BCD. The reason for adding 33 hex
to each packed BCD number is to avoid some difficult pitfalls with Packed BCD:
Packed BCD is a very common format but has potential problems that can arise. ASCII
digits are combined to form bytes with hexadecimal values in the control character range
(less than 20 hex) which must be handled very carefully by the logging program. Examples
of these characters include the Cntl-S and Cntl-Q software handshake controls (11 hex and
13 hex), the bell character (Cntl-G, 07 hex), and the ASCII null (Cntl-shift-@, 00H). Most
terminal emulation programs can be configured to handle these characters as data instead of
commands, but this is not the way the typical default configuration is set up. Note that
MagLog and MagLogLite Logging software from Geometrics is designed to receive and
decode the Excess 3 data transmission. This is typically used for multiple sensor array
systems such as MTADS employed for UXO or archaeological surveys.
Packed BCD eliminates this by shifting all numbers up by 33 hex. This moves all possible
output values out of the control character range. It also makes them printable to a screen or