Modbus Function Code 8, Sub Function Code 00

S

Thread Starter

Scott Alexander

I'm looking into implementing Modbus function
code 8, sub function Code 00.

The Modbus Application Protocol Spec V1.1a shows the Data section of the message to be N x 2 bytes in size, yet the message does not contain any additional byte count information. This may be ok for Serial ASCII which wraps each message in special characters (':"<message>"\n") but Serial RTU does not. It is unclear to me how a
Modbus Slave could determine the end of such a message.

Does anyone have any input on this? could this be a typo in the spec? All additional function code 8 sub function codes show fixed size (two
byte) Data sections.

Thanks.
 
FYI: Many devices do not support this function in either master or slave mode.

Each subfunction has it's own special definition for the packet.

From the book:
"Most of the diagnostic queries use a *two–byte* data field to send diagnostic data or control information to the slave."

Function 8, sub function 0000 only has a fixed length, 2 bytes long, data field. Therefore there is no need to send 'N' and it should be easy to determine the end of the packet.

FYI: One of the methods used to determine the end of the packet is to use the packet timeout which is typically 3.5t (byte-time) (and a fixed time for fast baud rates).

-Max
 
Hello,

In Modbus RTU the interval of at least 3.5 character times marks the end of the message. A new message can begin after this interval.

Regards,
Andrzej
www.modbus.pl
 
Top