MODBUS function code 16 is "Write Holding Registers". The function command structure is:
Address (1 byte) Function code (1 byte) First register address (2 bytes) Number of registers to write (2 bytes) Number of bytes to follow (1 byte) Data (N bytes) CRC (2 bytes)
If registers are always 2 bytes long, then aren't the number of registers and number of bytes redundant pieces of information? Under what circumstances would
number of bytes = number of registers * 2
not be true?
If I were to receive a command where this was not the case, should I reject the command?