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?
Axis Homing in Gcode
Moderators: TomKerekes, dynomotion
Re: Axis Homing in Gcode
How have you configured the M-code?
I would think you need to set it to Exec/wait/sync, so it waits until homing is finished, then re-syncs the interpreter.
I would think you need to set it to Exec/wait/sync, so it waits until homing is finished, then re-syncs the interpreter.
Re: Axis Homing in Gcode
Thanks Moray, that was it!