from the how many times master repeats a message? department...
master timings
Software, including programming, OS issues, etc. topic
Posted by dileep on 13 March, 2003 - 6:01 am
trying to implement MODBUS on RTOS.

how much time should be acceptable as timeout interval. then,if the master (ASCII mode) gets a timeout what will it do. repeat the message or send the next message and keep the timed out message in FIFO? if repeated..how many repetitions?


Posted by Steve Ciricillo on 18 March, 2003 - 3:42 pm
dileep wrote:
> how much time should be acceptable as timeout interval.

The Modbus specifications (available at www.modbus.org) discuss the timing for both ASCII and RTU modes. Basically in ASCII mode the timing is more liberal since the packets are framed using specific characters (leading colon, trailing carriage return/ line feed). A gap in the data stream exceeding 1 second is typically considered a timeout condition causing the incomplete packet to be flushed. Actual time values will vary depending upon actual equipment used. Various Modbus capable equipment vendors will differ slightly in response times.

> then,if the master (ASCII mode) gets a timeout what will it do. repeat the message or send the next message and keep the timed out message in FIFO? if repeated..how many repetitions?

This is an application issue, not a protocol issue. Modbus does not define what to do if a slave doesn't reply. It only defines how to properly detect a no reply condition. What you do in response to a no reply is application dependent. You need to analyze your application to decide if a retry is called for and how many times. What are the implications of a slave not replying? It didn't get the message? It has stopped functioning? The impact on your end system for each of these possibilities determines the response. For example, a slave controlling a critical process that fails to reply to a master packet after, say 2 attempts, should be flagged in fault and a system alarm issued. Perhaps other equipment should be shut down, etc. But again, you need to decide this for yourself based on your application requirements.

Hope this has helped.

Regards,
Steve C.


Posted by Lynn at Alist on 21 March, 2003 - 9:41 am
"dileep", do keep in mind that someone running a message over a wide-area-network or satellite or "other system" could see multi-second average response times, so I'd offer *AT LEAST* a slow 6 second timeout on MB/RTU or MB/ASCII. Fixing ASCII at 1 second (as the spec suggests) or setting a too tight RTU range of 0.100 to 1 second will be a problem for such users.

Our product offer a high-end of 60 seconds always for all Modbus varients. But 1 second is a good default to have, letting users change it up or down as required.

Best regards

Lynn August Linse
IA Firmware Specialist, Digi Int'l (www.digi.com)

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
"I'm willing to sacrifice anything for this cause, even other people's
lives"