docs: add Modbus safety considerations for spindle and drive control - #4531
grandixximo wants to merge 1 commit into
Conversation
|
I've been reviewing this. The concensus is that 1 & 2 is mandatory but 3 is optional. There is nothing wrong or unsafe about using fieldbus for spindle on/off provided the other safety methods are implemented. My VFD has 2 options for estop. A single input and a dual redundant estop1, estop2 for use with safety relays. |
A Modbus slave such as a VFD holds the last written control word indefinitely, so a LinuxCNC exit, crash or dropped serial link leaves the spindle running with no stop command ever sent (issue LinuxCNC#4529). This was not documented anywhere. Add a Safety Considerations section to the mb2hal driver doc covering the standard layered practice: hardwired enable/STO in the estop chain as the only true safety layer, stopping on communication loss either via the VFD Modbus timeout or via HAL-side detection on the mb2hal num_errors pin (no VFD-specific parameterization, survives VFD replacement), and optionally splitting VFD command sources so run comes from a hardwired terminal driven by motion.spindle-on or motion.machine-is-on while Modbus carries only speed, direction and status. Note that shutdown.hal stop writes cover only the clean-exit case, and that run/stop over Modbus is accepted practice once the hardwired layer is in place. Point to the new section from the hm2_modbus man page SEE ALSO, since the same considerations apply to every Modbus control path. Also fix the num_errors pin direction in the mb2hal man page (it is HAL_OUT in the source).
99f787f to
3e0cc49
Compare
|
Fair point, with a hardwired enable/STO layer in place, run and stop over fieldbus is accepted practice. I reworded the section so it no longer reads as all three items being mandatory:
Also fixed the |
|
Thanks, I think its pretty good now. Thanks for doing that. I will review again when build a new control panel in a couple of weeks. Counting the errors is a robust idea. The Comp component could do that easily. I know its only documentation but it is important to cover it due to safety concerns. I don't think I've ever seen this discussed on any modbus forum post. |
|
It was undocumented tribal knowledge, now written down 😉 |
It is now real knowledge! :) |
Prompted by #4529: a VFD driven over Modbus holds the last written control word indefinitely, so a LinuxCNC exit, crash or dropped serial link leaves the spindle running and no stop command is ever sent. This was not documented anywhere, and
shutdown.halstop writes only cover the clean-exit case.This adds a Safety Considerations section to the mb2hal driver doc describing the standard layered practice:
motion.spindle-on/motion.machine-is-on, Modbus carrying only speed, direction and status. This also avoids read-modify-write on VFDs that multiplex run/stop into one control registerThe hm2_modbus man page SEE ALSO points to the new section, since the same considerations apply to every Modbus control path (mb2hal, hm2_modbus, ClassicLadder, custom drivers).
Intentionally does not touch mesa_modbus.adoc to stay conflict-free with #4530, which removes that page.