Today is...
Saturday, November 17, 2018
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
Featured Video
Watch an animation of a conveyor stacking operation demonstrating the use of a move on a gear command.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Receiving Too Long Messages
What happens when message has too many byes?

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

By Fred Loveless on 13 September, 2018 - 10:36 am

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.