
25
5.6 Binary Format Replies
The binary format reply is only used for the pressure reading commands
P3
and
P4
. It consists of a 1 byte header
character, 4 bytes data, an optional 1 byte cyclic check sum, and 1 byte <cr> character. For the binary format replies,
the address type, error condition and data sign are encoded into the single header character as shown in Table 2.
Header
Assigned
Error
Data
Alternate
Characters
Address
Condition
Sign Hdr.
Multi-drop only (1)
{
Yes
No
+
DC1 (ctrl Q)
}
Yes
No
-
DC2
(ctrl R)
!
Yes
Yes
+
DC3
(ctrl S)
@
Yes
Yes
-
DC4
(ctrl T)
^
Null
No
+
none
&
Null
No
-
none
|
Null
Yes
+
none
%
Null
Yes
-
none
(1) See M= command and Table 9 for ASCII hex value
Table 2. Header Description for Binary Format Pressure Readings
Example
P3
,
P4
command replies in binary format: (where hhhh = the 4 byte data value)
{hhhh<cr>
reply from unit with an assigned address, no errors, (+) data sign.
@hhhh<cr>
reply from unit with an assigned address, error condition exists, (-) data.
^hhhh<cr>
reply from a null address unit, no errors, (+) data sign.
&hhhh<cr>
reply from a null address unit, no errors, (-) data sign.
{nnnn<cr>
where nnnn pressure value is (FFFF)Hex, all ones.
The binary format reply: xx??? or xx_?? indicates that data is not yet available from the HPB. The xx is the header
character and the 6 most significant bits of the address.
The 4 byte data value hhhh contains the device address and the pressure reading. The most significant bit of each h
character is a parity bit. The next most significant bit of each h character is either a 1 or 0 required to make the
resultant byte a printable character. The 6 least significant bits are used for the device address and pressure reading.
The device ID and the pressure reading can be read by combining the 6 least significant bits of each of the four h
characters, which result in 24 bits of information. The first 7 bits represent the device address in binary form (00
through 89 decimal). The next 17 bits represent the pressure reading and can be configured in the signed form or the
extended form by using the OP command. The 24 bit binary forms are:
Extended
:
7 bit binary device address
17 bit binary pressure data
Signed
:
7 bit binary device address
sign bit + 16 bit binary pressure data
Example binary reply:
{@#16<cr>