Axis Homing in Gcode
Posted: Thu May 31, 2018 11:27 am
Hi Tom
I have a Z axis homing C program which works fine on an older machine with manual tool changer. I noticed that sometimes the mechanical shock of releasing the draw bar would cause movement of the axis which is not picked up by the scales. So I thought I could just run the Homing program after a tool change in the G code by calling it with a M command. This works and executes the Z-axis homing but then causes the Z axis to become unresponsive in Gcode and gives a following error on the Z axis.
When running the G0 command using manual input or jogging, everything works fine. I tried to run the Homing Program in a different thread but it did not make a difference. It looks like the Homing program does not release the axis control to whatever is running the G-code. When I uncomment the M command (to prevent executing the homing program), the G Code works fine.
Any idea of how to solve this?
I have a Z axis homing C program which works fine on an older machine with manual tool changer. I noticed that sometimes the mechanical shock of releasing the draw bar would cause movement of the axis which is not picked up by the scales. So I thought I could just run the Homing program after a tool change in the G code by calling it with a M command. This works and executes the Z-axis homing but then causes the Z axis to become unresponsive in Gcode and gives a following error on the Z axis.
When running the G0 command using manual input or jogging, everything works fine. I tried to run the Homing Program in a different thread but it did not make a difference. It looks like the Homing program does not release the axis control to whatever is running the G-code. When I uncomment the M command (to prevent executing the homing program), the G Code works fine.
Any idea of how to solve this?