Redundancy of Byte Count and Quantity


Thread Starter


Hi guys,

I'm curious to know about the reason why many Function Codes require "quantity" and "byte count". It looks like completely redundant information to me.

Best regards!

There are several possibilities.

Quantity would normally be the count of data fields and byte count would be how many bytes the data field requires or a total byte count.

If it is the total byte count it includes any protocol bytes, bytes not part of the payload.

If it is used because of different data sizes, byte count would provide the data payload size and quantity would be the data type size count; for example a single 4 byte or 8 byte float would still have a quantity of 1 and a byte count of 4/8.

Good luck,