Well, every time I try to do something like this, I struggle with it.

I have a panel with 24 identical slots to cut in it.  So, I created a 
subroutine to cut a slot with a corner at (0,0) and use G92 offsets to 
offset each slot to the right position.  The subroutine looks like this :

O100 sub
N01 G55
N02 G92 X0 Y0
N03 G01 F45.0 X0.0725 Y0.0725
N04 Z0.01
N20 F15 X2.4275 Z-0.0500
* * * * * snip * * * * *
N210 Z0.1000 F45
N211 G92.1
N220 G54
O100 endsub
followed by the main program :
N300 G54
N310 G01 Z0.5 F45
N320 M03 S2720
N330 G01 X1.18 Y5.75
O100 call
N330 G01 X3.9295 Y5.75
O100 call
* * * and so on
This all seems to work OK, although there is a funny Z2.345 move at the 
beginning that I can't account for.

Then, I have some one of a kind holes and slots at the end of the program,
N330 G01 X15.32 Y2.75
O100 call                     (the last subroutine call)
N340 Z0.5 F45

N05 G54 G92.1
N10 G01 F45 X8.2975 Y0.4725
N20 Z0.0100
N30 X8.7025 Z-0.0500 F15.00
N40 Y1.4875
Now, in this part of the program, the Z seems to be shifted up by that 
2.345 or whatever offset.
I specifically did not include a Z value in the G92 offset, and any 
offsets there should have been canceled by the G92.1, shouldn't it?

The problem with G10 is it offsets from MACHINE coords, I want to offset 
from my G54 coordinate system, and only shift X and Y.
Do I need to set Z to, say 0.5 while I'm in the G54 coord system and 
then say
N01 G55
N02 G92 X0 Y0 Z0.5

I wasn't sure this production system had the G10 L20 command in it, so I 
tried it.  I did :
G10 L20 P2 X0 Y0
G55
at the beginning of the subroutine, and got exactly the same result.

So, then I tried this at the beginning of the main program :
N300 G54
N301 G01 F45 X0 Y0 Z0.5
N302 G10 L20 P2 X0 Y0 Z0.5
N303 G55
N304 G54

Now the Z doesn't get shifted between what is done in the subroutine and 
what is done at the tail end of the main program in the G54 system.
But, I sure don't understand what is happening here.  I am guessing that 
there was a left-over value in the Z offset of the G55 system, and since 
it wasn't specified in the offset, it was somehow "restored" back to the 
G54 system?  I'm guessing that here I am FORCING the Z offset in the G55 
system to match the G54 system, and that seems a good plan.  But, if I 
understand what I was seeing, the G54's Z coordinate was being changed 
by going into G55 and back to G54, while never specifying a Z value.

I'm not sure anyone can replicate this with my poor description.  But, 
does anyone have a good way of doing stuff like this?


Jon





------------------------------------------------------------------------------

_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to