User manual
105G Wireless Gateway User Manual
Elpro_man_105g_1.18.doc Page 80
Consequently, depending on the fieldbus mapping transfer mode (see above table), Radio
Interface registers may or may not be compressed.
“Word” transfer mode offers no compression, but rather a direct transfer of 16-bit registers
between Radio Interface and Fieldbus Interface. This mode would suit the transfer of registers
containing pulse counts or analog values with no loss of resolution.
“Byte” transfer mode operates on only the most significant BYTE (the first 8 bits) of Radio
Interface registers, but allows these bytes to be consecutively packed in the Fieldbus Interface.
This mode would suit the transfer of analog values in low-resolution, in cases where I/O space is
at a premium. Byte Address Mode is recommended when using byte transfer mode (see Address
Mode section below).
Bit transfer mode operates on only the most significant BIT of Radio Interface registers, but
allows these bits to be consecutively packed in the Fieldbus Interface. This mode would suit the
transfer of digital I/O in cases where it is not desirable (or possible) to use a whole 16-bit register
just to store a 0 or 1 value.
4.9.3 Endianness
Endianness is the convention that two parties that wish to exchange information will use to send
and receive this information if the information needs to be broken into smaller packets, i.e. data
transmission, radio, etc.
Integers are usually stored as sequences of bytes and the two more common sequences used are
little-endian and big-endian.
Most computer processors agree on bit ordering however this is not always the case.
Below is an analogy of what can happen if the bit orders are different between devices.
Imagine that Device ‘A’ wants to send a hexadecimal value "ABCD" to another devce’B’.
However device’A’ can only do so 2 bits at a time. As device ‘A’ uses big-endian order, it will
first send “AB” and then “CD”.
Device ‘B’ needs to be using the same convention as Device ‘A’ when receiving this information
such that when it receives the first part “AB” it knows that this is the beginning of the value, then
when it receives the next part “CD” it knows that it goes after the first part (big-endian).
If Device ‘B’ is unaware and assumes the inverse (little-endian), it will end up with the value
around the wrong way, e.g. “CD” and then “AB”, e.g. “CDAB”
Now if you convert these hexadecimal values back into decimal you will see a significant
difference, which can explain why when connecting different devices the values sometimes do
not line up.
“ABCD” = 43981
“CDAB” = 52651
4.9.4 Address Mode