0
\$\begingroup\$

In my system, I know that the approximate response time between master-slave is 10ms, if the slave does not receive communication during those 10ms then it detects an error and the motors turn off.

Is it advisable to make a few attempts (for example 3) to try to re-establish communication? the motors instead of stopping in 10ms they will stop in 30ms, but it is not critical

I do not know if it is something standard to use this method in the industry

\$\endgroup\$
3
  • \$\begingroup\$ I don't think we can make a reasonable assumption on the failure models behind the question whether something makes sense to re-try. \$\endgroup\$ Jan 5, 2022 at 14:27
  • \$\begingroup\$ timeouts and watchdogs are common techniques. You could also poll at a regular interval, determine the current state then update the state. If there is an error, then log it. When the comms is restored, the slave device state will get updated as a matter of course. \$\endgroup\$
    – Kartman
    Jan 5, 2022 at 14:33
  • 2
    \$\begingroup\$ The slave does not control the bus so it can't "make a few attempts" to do anything. You would usually just set a timeout (30ms in your case) and stop the motor if the timeout is exceeded. \$\endgroup\$
    – Sim Son
    Jan 5, 2022 at 14:36

1 Answer 1

1
\$\begingroup\$

Modbus only defines the communications protocol. It does not define how the system operates. So if the system detects (using modbus) that there is a missing packet, then the system designer (you?) should decide what to do. Three retry attempts is a reasonable (dare I say common) behavior. Also, as you point out, this is controlling motors. Unless the motors are tiny (small inertia), they won't do much different in 30ms, vs 10ms.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.