task: unhome VOLATILE_HOME joints on any motion-disable edge#4008
task: unhome VOLATILE_HOME joints on any motion-disable edge#4008grandixximo wants to merge 1 commit intoLinuxCNC:masterfrom
Conversation
|
There may be some tab/space indent mismatch. So, if a joint fault does not trigger machine off or estop, then this is not triggered? How is the specific joint unhomed in that case? |
The only only fault that does not machine off (that I could find) is soft limit, and if machine did not go off, joint should still be in good position, homing should still be valid. |
|
But that means you must have any joint's fault signal(s) wired up so that the machine goes either off or in estop. Otherwise, your joint may lose tracking and linuxCNC is not aware of that. |
Issue LinuxCNC#3954: with VOLATILE_HOME=1, tripping a limit switch (or hitting amp-fault, following error, etc.) disables the drives but leaves all joints flagged as homed. Only ESTOP and machine-off paths cleared the homed flag; every other drive-disable cause silently kept it set. Detect the traj.enabled 1->0 edge in the task main loop and call emcJointUnhome(-2) so volatile_home joints are unhomed regardless of which fault path disabled motion.
ef5bd87 to
6f37ca3
Compare
Which joint fault does not turn off the machine? limit switches machine off, amp-fault machine off. |
|
That which comes from external (like a signal from the drive controller hardware). |
I cannot find a fault path that disables a single joint while leaving the machine on. joint.N.amp-fault-in, hard limit, ferror, misc error, spindle fault, all route through I cannot find a "one joint faulty, machine stays running" mode, if it exist I can hook signals to unhome only the effected joint that's faulty and volatile. |
|
If there is no path for a single joint failure while the machine stays on, then that is just the way it is and this solution will be adequate to fix the current problem. If anybody wants to use such a single-joint-failure-mode feature (probably only for very special robotics), then they can send a patch ;-) |
Summary
VOLATILE_HOME = 1, triggering an end-stop disables the machine but keeps the axis homed #3954. With VOLATILE_HOME=1, tripping a limit switch (or amp-fault, ferror, misc-error, spindle-fault) disables the drives but leaves all joints flagged as homed. Only ESTOP and F2/machine-off paths cleared the homed flag.emcStatus->motion.traj.enabledin the task main loop. On the edge it callsemcJointUnhome(-2), which unhomes only joints marked VOLATILE_HOME. Estop and machine-off continue to do their own unhome and remain idempotent.Why this scope
VOLATILE_HOME = 1, triggering an end-stop disables the machine but keeps the axis homed #3954, joint.N.amp-fault-in does not unhome joints set to VOLATILE_HOME = 1 #3668, plus a 2021 forum thread linked in WithVOLATILE_HOME = 1, triggering an end-stop disables the machine but keeps the axis homed #3954) all hit the same gap. Per-cause patches would miss the next path; an edge detector covers limit, amp-fault, ferror, misc-error, spindle-fault and any future cause uniformly.Test plan
VOLATILE_HOME = 1, triggering an end-stop disables the machine but keeps the axis homed #3954 scenario.