Hello Guest it is March 28, 2024, 04:08:39 AM

Author Topic: G12 Trouble...  (Read 4459 times)

0 Members and 1 Guest are viewing this topic.

G12 Trouble...
« on: September 30, 2013, 07:30:58 AM »
Hello - I am struggling to make a small circle using G12. 

The code:

Code: [Select]
g0 x.8622 y.8207
g12 h.125 i.078125 f10

makes a line, not a circle -  3/16" line along X only.  It is not only that it cuts only a line, but in the toolpath display, only a line is shown.  The Y axis simply does not get moved.

I have restarted the computer, and it is highly repeatable for me.

The code

Code: [Select]
g0 x.8624 y.8207
g12 h.125 i.078125 f10

creates a circle, as expected.  Note the only change is to shift the X axis by .0002"  It also works to move the Y axis by .0002".  It appears this problem shows up in very specific x,y positions.  Unfortunately, this snippet is part of a larger program which triggers this behavior in about 40% of the holes.

I found a couple previous threads:
http://www.machsupport.com/forum/index.php/topic,23272.0.html has no resolution. 

http://www.machsupport.com/forum/index.php/topic,9850.0.html solves his problem with scaling - I am not sure how I would use scaling in my program, but I could imagine that tweaking the scaling would change the x,y positions enough to avoid the issue.

I am attaching a photo of Mach3 running the combined code:

Code: [Select]
g0 x.8622 y.8207
g12 h.125 i.078125 f10
g0 x.8624 y.8207
g12 h.125 i.078125 f10

As you can (hoipefully) see, the toolpath display has a large circle with a highlighted line running from the center of the circle to the right edge.

In the next photo, the only change is that I commented out the second G0 line.  There is no circle, just a short line (and it is all very small).  The toolpath displays are accurate in terms of what my machine actually does, but not in terms of what the GCode seems to be asking for.

Any thoughts as to a) why this is happening or b) how I can avoid it?

Thanks!

Bart


Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G12 Trouble...
« Reply #1 on: September 30, 2013, 09:21:54 AM »
The g13/13 works as defined. It uses the I to define the radius to be cut. THere IS no H parameter

G12 I1.000 F20

Moves out from the current position a value of the I parameter in the direction of 3 oclock. Then moves in a complete circle. Then returns down the straight line path it created to move to the original start point.

IT is not really a complete command as most controllers use the G12/13 to do a circular pocket.   Nor is it a complete circle command as it cuts a long leadin and leadout.

You can use the G12 to do circular pockets IF you are really creative and know Sub programming.

(;-) TP
Re: G12 Trouble...
« Reply #2 on: September 30, 2013, 10:05:13 AM »
I am glad to learn the H parameter is not needed - not sure why I had it there.

Removing it does not fix the problem.

I understand that G12 does not cut a pocket, I just want it to describe a circle and it does not always do that.

The new code:

Code: [Select]
g0 x.8622 y.8207
g12 i.078125 f10
g0 x.8624 y.8207
g12 i.078125 f10

behaves exactly as the old code did, which is to say, it does not describe a circle @ (.8622, .8207) but it does at (.8624, .8207).

Bart

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G12 Trouble...
« Reply #3 on: September 30, 2013, 11:41:23 AM »
I have never seen it fail here. I even have pocketing routines based on it.

It ALWAYS moves the prescribed I distance and then the circle at that radius. Are you by chance running it in G91 mode instead of G90 ? Are you trying run it with tool comp?

NOW rememeber that the move is the center line of the tool NOT the tool radius. YOU have to do that math to get a proper sized cut.

Just a thought, (;-) TP



Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G12 Trouble...
« Reply #4 on: September 30, 2013, 11:56:42 AM »
OK I just tried YOUR code and it moved to exactly where the code stated.

(;-) TP
Re: G12 Trouble...
« Reply #5 on: October 01, 2013, 06:38:44 AM »
Thank you for giving it a try.

The little code segment I posted is enough to cause the behavior - no other G codes.

So given that this is very uncommon, if not unique to my setup, what could be causing it?  It does not appear to be an issue with the CNC machine itself, so it must be the computer setup, no?  This is a licensed copy of Mach3 installed on a machine with nothing but XP on it.  It certainly does not seem to have any trouble keeping up.  I am at a loss.

I did find a partial solution - I reduced the precision from .0001 to .001 and I was able to bore all the holes I needed.  I thought it was a real solution until I jogged to a new location and it cut only the short line.

Is there some Mach3 configuration that would affect precision or otherwise affect how G12 is executed?

Thanks so much for your help

Bart

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G12 Trouble...
« Reply #6 on: October 02, 2013, 08:45:12 AM »
The g12/G13 is an orphin Gcode very few people even use it as it does NOT conform to nomal usage. You would be better off just using G2/G3 and programing a circle.

Precision is SET by the steps per unit and the courseness of your leadscrews.  Based on your setup mach3 will make an exact step OR the next closest step to get to the position. Some setups do not allow full step precision as the next step would take you PAST the next position so it has to stop short to prevent gouging.

So you setup YOUR machine according to the mechanics of the drives.   Feedscrew pitch X reduction (if any) X microsteps of the drive = steps per unit.

(;-) Tp