Hello Guest it is March 28, 2024, 09:34:28 AM

Author Topic: g15/g16 problem  (Read 4522 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
g15/g16 problem
« on: May 02, 2011, 06:04:41 AM »
As some of you may know, i have been having a problem with the interaction between polar coordinates and the g83 drill with peck operation. At that stage I thought eh problem was in the g83 code.
I now think the problem actually lies in the g15/g16 code - and possibly with its interaction with subroutine calls. To explain:

I have a production system making a grid of units all together, in one batch. It saves hugely on tool changes.
One of the steps is to drill a ring of holes on each unit. I have been doing this using polar coordinates for the actual drilling. There were problems with the g83 instruction, which I resolved.

However, I have since found a much harder problem. I was testing out a new version of the program and hit Feed Hold and then Stop while the machine was drilling the holes. This left Mach3 in the polar coordinate state.
So I manually issued a g15 command to put it back in the cartesian coordinate system. It stayed in polar coords.
I unloaded the program and restarted it, with a g15 instruction at the start. It stayed in polar coordinates.
I killed and restarted Mach3 and all was well.
However, several development cycles later ... I was still having the same problem. It seems that once Mach3 gets into the polar coordinate state and is interrupted, it does not want to get out of the polar state.

I THINK that if I issue a g16 command and then a g15 command it does sort itself out. That is, I have to tell mach3 to go into polar cords even though at least part of it already is, then tell it to revert to cartesian.

Has anyone else had this problem?

Cheers

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: g15/g16 problem
« Reply #1 on: May 02, 2011, 09:51:02 AM »
Were you in a sub AND the Drill cycle when you stopped? You may have to cancell the Canned cycle as well G80 and issue the G15 to cancell out the entire process.

Most of the processes are first in first out so the order may be to G80 then G15.

I'l do some testing as well.

Just a thought, (;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: g15/g16 problem
« Reply #2 on: May 02, 2011, 10:25:09 AM »
That should have read First in Last out for functions.

I tested here and all is well IF you cancell out the G83 AND G16 after you stop. Issue a G80 G15

I stopped inside the drill cycle FH/stop then applied G80 G15 and all was well.

I restarted with RFH and all was well it restarted perfectly.

I Estopped and then cancelled out and all was well. Restarted with RFH ok.

NOW IF you do not cancell out both ,the active MODE will still be in effect. If you just cancell out the G16 then the G83 is still active AND will move to the next position commanded and START the drill cycle.

RFH gives you a way to restart in the proper mode to continue.

NOTE just make SURE the Z is UP to a clear Z position before you restart with a RFH or SNAP goes the bit. Mach gives you a screen to make sure the clear move is correct.

(;-) TP

« Last Edit: May 02, 2011, 10:27:35 AM by BR549 »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: g15/g16 problem
« Reply #3 on: May 02, 2011, 12:01:53 PM »

NOTE just make SURE the Z is UP to a clear Z position before you restart with a RFH or SNAP goes the bit.

Would setting a safe Z not prevent that? I know any time I have done a RFH the prep move always observes the safe Z I have set but it may be different in some circumstances?
Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: g15/g16 problem
« Reply #4 on: May 02, 2011, 12:19:13 PM »
HIYA Hood, Yes it would.  Personally I don't use the safe Z  I forget it is active and it gets me in trouble (;-) Without it I know exactly where the Z is at all times.

(;-) TP

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: g15/g16 problem
« Reply #5 on: May 02, 2011, 06:28:54 PM »
I tested here and all is well IF you cancel out the G83 AND G16 after you stop. Issue a G80 G15

Thanks! For both the info and for the testing. I see! Yes, it was doing a g83. The interactions are a trifle strange.

I gather Rewind does not issue the cancel instructions I was expecting. An assumption...

I guess I need a proper book rather than relying on just the M3M for information. But the books are all rather expensive ...

I have the same problem with SafeZ - I don't fully understand it, and prefer to know exactly where the control point is at any time. More learning needed.

Cheers

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: g15/g16 problem
« Reply #6 on: May 02, 2011, 06:33:17 PM »
On my mill I have the Safe Z set in Machine coords and to 0mm so I always know exactly where the Z axis will go to, ie as high as possible above the table.
Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: g15/g16 problem
« Reply #7 on: May 02, 2011, 07:00:20 PM »
I think of Gcode as talking to a 3 year old you can not take anything For granite AND must be very specific in what you tell them to do.

Where SafeZ normally gets me is IF I use a piece of code that was built on a bridgemill where there is lots of overhead room and try to run it on the Kneemill. I end up resetting the Z to better matach the code and then the safeZ travels DOWN to zero insted of UP to zero.  AND you know the rest of the story.

Don't get too excited about the books MACH does have some strange ways about it that are not exactly like everyone else BUT then so does all other controllers. Somewhere long ago the controller manfs decided that each of them were the only ones that really knew how to do Gcode and there is a LOT of hybrid Gcodes out there.



(;-) TP
« Last Edit: May 02, 2011, 07:04:13 PM by BR549 »