I created a configuration for one of our twin spindle routers (Z and W axis). In order to take advantage of the new trajectory planner, I could not use W movements in the carving G-code (only XYZ work). As a workaround I made a config that can use a couple of M1xx codes to slave and unslave the movement of the W axis to the Z. It seemed work quite well in a sim stepper config, but I am having some trouble with it on the real machine with servos.
To slave the W to the Z I will command both axis to the same height (relative to the material) usually with a g0z1w1, followed by the slaving M-code m122. This uses a couple of Mux2 components to connect the z-position command + an offset to the w-PID and the w-PID error + w-position command are connected to the w-feedback. So (when it's working) while the W is moving with the Z, the DRO shows W=1(+/- servo error).
The problems I am having are:
After first starting Linuxcnc, the first time I call the axis slaving command (M122) I almost always get a joint 8 following error, the Linuxcnc goes into shutdown (F2), and even while in shutdown or e-stop the DRO for the W will continue to runaway, but the axis will show no movement. If I Press F2 and issue an MDI G0W1, it will usually return the W back to what it should be, and I can unslave the axis and return to normal behavior.
After this initial screw-up it will often behave fine for the rest of the day, slaving and unslaving at the start and end of each run.
But once in a while for some reason it randomly does the DRO w runaway (w-axis hasn't actual ever moved noticeably). Issuing an MDI w command usually rights it.
This afternoon it took off once when no one was watching and when I got to it F1 and F2 (e-stop and machine power) were completely unresponsive, while W DRO showed over 43K inches and climbing. Since I could not re-power the control, I could not issue the MDI w command. I had to close Axis and restart.
Any suggestions