I have EMC2 set up by the step configuration wizard as "XYZA" for a lathe with a stepper on the spindle (the Y is unused). I am doing the threading as I intended, manually writing gcode. I'm not ready to start tweaking the HAL. My problem is the A axis winding up, or having to be unwound in a time wasting manner.
What I need, is to know how to machine-home the rotary axis with no motion, from within the gcode source. What combination of G-codes does it take to Zero the machine home at the current position with no motion?
Zig:
I am using the G54 Coordinate System, but only because I have to, and I set its zero to the machine CS (G53) home zero.
If I merely zero the G54 CS, its offset from the G53 CS will grow continuously until the virtual machine limit is reached. The growing offset also keeps me up at night. And watching all my threadings twice, once forward, and once backward, would also not leave me much time for sleeping.
I'm hoping one of the developers who actually know how things work will take pity and give me a string of G codes to zero my machine, without mentioning the HAL.
Oh, one thing I didn't mention: I'm in G91 incremental mode, which really shouldn't matter.
Zig:
I just let the step configuration wizard do it's thing setting HAL, so it is just set up like a rotary table.
I got some knowledgeable replies on the linuxcnc.org forum -- evidently you cannot machine zero with no motion, with G code. But they said that the machine limit is potentially astronomical, so I'll just set that huge and live with the growing offset from zeroing the G54 A axis. Not optimal, but if I have to live with it, I will. Maybe they'll add a G code for no motion machine zeroing someday.