Ex: Bacnet - Modbus (Binary Objects-Discretes) - ICC XLTR-1000 Instruction Manual

Miltiprotocol rs-485 gateway
Hide thumbs Also See for XLTR-1000:
Table of Contents

Advertisement

ICC

11.5 Ex: BACnet - Modbus (Binary Objects-Discretes)

This example also contains two networks that both employ an object value
method for exchanging data, but unlike the previous example, the database
endianness affects the end-to-end alignment of the data. In this example,
communication is taking place between a BACnet network and a Modbus network
using single-bit data elements. The BACnet side is using binary values 1 through
32, while the Modbus side is using coil status 1 through 32. The byte ordering of
the database is significant because of the manner in which Modbus coils are
mapped in the gateway. Coils (and input statuses) are mapped to registers, not
addresses (see Section 9.9.2.3 for more information). Since registers are 16-bit
entities, the byte order of the registers (and by association, the coils), is affected
by the endianness configured for the database. BACnet binary objects, however,
are mapped on a byte-wise basis into the database.
When the database is configured for a little-endian byte order, binary value 1 – 8
corresponds to coil 1 – 8, binary value 9 – 16 corresponds to coil 9 – 16, and so
on. This can be seen in Figure 31. Notice that the least significant bytes of the
registers that the coils map to are placed in the lower memory addresses in the
database. Because Modbus discretes are mapped to registers in a bit-wise little-
endian fashion, it is recommended that the database be little endian in this
scenario so that bit-wise data will align between networks.
Figure 31: BACnet - Modbus (Binary Objects & Discretes) Little Endian
However, when the database is configured for a big-endian byte order, binary
values 1 – 8 correspond to coils 9 – 16, binary values 9 – 16 correspond to coils
1 – 8, and so on. This can be seen in Figure 32. Since the most significant bytes
of the Modbus registers that the coils map to are now mapped to lower
addresses, the alignment between the two networks' bit-wise data is byte
swapped. While this alignment can still be used, it is much more intuitive when
the database is configured to be little endian.
152

Advertisement

Table of Contents
loading

Table of Contents