modbus memory map got me confused - can you please help?

I would like to deepen my knowledge on modbus so please answer the questions if you can:
1 Is it true that modbus ascii is addressable the values byte by byte - same as modbus RTU. This is different to modbus TCP which is addressing the values using 2 bytes? Is my understanding correct?
2 what is the biggest structure in modbus - is it 6 bytes float value?
3 i understand what endianess is but does it have any impact on the modbus communication - can modbus use either big or little endianness or is there some sort of standard?

I asked question 1 because i am troubleshooting Gateway GWY-00-B revB (made by Renuelectronics) in which surprisingly works differently to GWY-00-B RevA. The diffence is that in version A of the gateway all values were transferred as per configuration mapping but in version B of the gateway some values are not transferred :( Is it possible that in version B the memory map is allocated in chunks eg. holding register number 1 will use 2 or 4 bytes 40001-4003 so the next register to be used should be 40004??? I fight it bit strange and confusing.

Thanks in advance for any help.
 
1. There is only one Modbus application layer protocol that defines how data is addressed. The transport layer (i.e. RTU, ASCII, TCP) makes no difference in how data is addressed. Modbus uses 2 bytes (in big endian order) for data addresses (resulting in addresses in the range 0 to 65535).

The only difference between RTU and ASCII is how each character/byte is encoded onto the serial bus. In ASCII each character/byte is encoded as ASCII text, while in RTU, each character is encoded using binary encoding. Modbus/TCP also uses binary encoding. The Modbus payload (termed the PDU or Protocol Data Unit) of a Modbus/TCP packet is identical to that of a Modbus RTU packet.

I suggest you read the Modbus Application Protocol spec, as most of this is explained in the first several pages:
https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf

2. The biggest official structure defined by the Modbus specification is a 16-bit word register, which is 2 bytes. However, vendors sometimes group two or even four 16-bit registers together to be interpretted as 32-bit or 64-bit values, respectively. I have also seen vendors group many more registers together for serial numbers, text strings, time/date, etc. Regardless of how the vendor intends the data to be interpreted, the Modbus protocol itself simply transfers 16-bit word registers. The only exception to this is that there is a variant of Modbus that exists, implemented by some vendors, called Enron/Daniels Modbus that actually redefines a register as being a 32-bit word, contrary to the official spec.

3. Yes, there is a standard, the one I linked above. In section 4.2, it states, "MODBUS uses a ‘big-Endian’ representation for addresses and data items. This means that when a numerical quantity larger than a single byte is transmitted, the most significant byte is sent first."

As I stated in #2, vendors sometimes group multiple registers together to be interpreted as 32-bit or 64-bit values. These values may use either little-endian or big-endian register order. Note that each individual 16-bit register, however, must be encoded in big-endian order (assuming the Modbus device abides by the Modbus specification).

Regarding the Renuelectronics gateways, you need to provide additional details on what exactly "values are not transferred" means and also provide the Modbus mapping for the device if you would like help finding an explanation on the differences between the versions. Have you asked Renuelectronics what the differences are between Rev A and Rev B of their product?
 
Your reply is pure gold. Thanks for taking your time to help me. I sent email to renuelectronics only today and will post their feedback here. Best Regards
 
Top