Axis Homing in Gcode

Moderators: TomKerekes, dynomotion

Post Reply
EondeK
Posts: 14
Joined: Thu May 17, 2018 3:29 pm

Axis Homing in Gcode

Post by EondeK » 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?

Moray
Posts: 282
Joined: Thu Apr 26, 2018 10:16 pm

Re: Axis Homing in Gcode

Post by Moray » Thu May 31, 2018 4:43 pm

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.

EondeK
Posts: 14
Joined: Thu May 17, 2018 3:29 pm

Re: Axis Homing in Gcode

Post by EondeK » Thu May 31, 2018 7:18 pm

Thanks Moray, that was it!

Post Reply