Modbus FIFO Reads: Validate the Queue Response Before Treating It as a Register Block
Modbus function 24, hexadecimal 0x18, returns a two-byte Byte Count, a separate two-byte FIFO Count and up to thirty-one queued register values. It is not a holding-register response with a one-byte count. Validate both counts and the exact PDU length before exposing values, and do not interpret a successful read as a dequeue operation. This…