Gene,

I am probably barking up the wrong tree, but:

As a general method, I would position the controlled point where I wanted the routine to begin.
(Say at X40 Y25 Z10)
Then I would call the subroutine.
Inside the subroutine, I would use G92 to set the current position to zero (or some other useful value - but usually zero).
So that would mean putting
G92 X0 Y0 Z0
at the start. And that would create an offset for the whole co-ordinate system, so that the controlled point is now considered to be at X0 Y0 Z0 (or whatever you specified when you used the G92 command).
Then there would be the various commands to get the job done.
The subroutine would end with
G92.1
to remove the overall offset and return the co-ordinate system to its original values before I called the subroutine.

I don't see G92 or G92.1 anywhere in your code.
I do see G91, but I am not sure why - not that it matters, provided it is not trying to do the job of G92.

I may be well of beam with this, and may have misunderstood the problem, in which case I apologize.

Regards,

Marcus


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to