Receiving Too Long Messages

R

Thread Starter

ralu

What is expected response according to standard when master sends, lets say, 1 to many octet on slave. For example over RS484 one sends message on slave with function 0x3. Are such messages valid?

Example message having unnecessary xxx inside:
{0x1, 0x3, 0x0, addr, 0x0, len, xxx, CR1, CRC2}

Best,
Ralu
 
F

Fred Loveless

Greetings, that really depends upon the slave, but a well designed slave will return an error if the length of the packet is less then or greater then what the length field indicates. For a request from the master this would mean that there was not 2 registers for the number of registers to read from the starting address that is provided.

The response will indicate the number of bytes that are returned, and if that is incorrect, the master should post and error.

This all assumes you are using Modbus RTU or Modbus TCP protocols. If you use Omni (Enron) Modbus or one of the Flow derivatives, then the data pay loads can be different.
 
Thank you for your response. Do you know what exception code is requred? Unfortunetly it is not clear to me how is this case covered in standard.
 
Top