G18 Arcs in a G17 G68 rotation?

A place to discuss and ask questions about all things Machining for Mills, Lathes, Laser, and Routers

Moderator: cnckeith

Post Reply
Bham-Tech-RM
Posts: 13
Joined: Mon Jul 03, 2023 2:52 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0326130718
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

G18 Arcs in a G17 G68 rotation?

Post by Bham-Tech-RM »

Apparently G68 doesn't behave the way I thought it did.

I am trying to cut a quarter-toroidal pocket (center is open, so tool clearance isn't an issue there.)

The idea was to run a G18 XZ arc through 90 degrees, then G68 a small amount, then loop that all the way around. Almost works too, but the arc flips to convex on the way to 180degrees and then flips back heading toward 360 degrees.

Why? Shouldn't the arc solve identically in a rotated coordinate system?

I also tried setting up the arc in G91 incremental and using the IJK definition -- different inputs to get the first arc to solve correctly, of course, but had the same behavior in the G68 loop regardless.

I've already programmed an alternative toolpath that stays in G17 and just spirals down. It is a better toolpath but it was also a lot more complicated to construct. I'd just like to understand why the first approach didn't work as expected.

Any ideas?

Code: Select all

%
O0125; RING GROOVE
;
;
#101=4.; RING INNER RADIUS
#102=.5 ; GROOVE RADIUS
#103=.25 ; BALL MILL RADIUS
#104=1. ; ANGULAR STEP
;
;*********************
;
G00 G17 G20 G40 G49 G80 G90;
G54 M25;
T1 M6; 
;
X[#101+#102-#103] Y0. S2500 M3; START POINT
G43 H1 Z2.;
G1 F25. Z.1;
F5. Z0.;
;
#105=0; START ANGLE
;
N100 
G17 G90; 
G68 X0. Y0. R[#105]; ROTATE
G00 G90 X[#101+#102-#103] Y0.; MOVE TO POINT ON RIM
G1 Z0. F5.; FEED DOWN
G18 G03 X[#101-#102+#103] Z[-#102] R[#102]  F25.; CUT ARC
G1 G91 X-.1; MOVE OFF
G00 G90 Z.1; RETRACT
#105=[#105+#104]; INCREMENT ANGLE
IF [#105 LT 360] GOTO100; GO FULL CIRCLE
;
G00 G90 Z2.;
G69 M5;
M25;
G53 Y0;
M30;
%
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: G18 Arcs in a G17 G68 rotation?

Post by cncsnw »

I have never tried to use G68 with a G18 or G19 arc. It does seem like it ought to work, but it also seems like something that might never have been tried, tested, or specified.

For what it's worth, Centroid has its own codes that do exactly what you were trying to do. See G118 in the manual.

For an example, use Intercon to program your XZ arc, then use Intercon's Subprogram -> Rotate to sweep it around the circle. You will see that the posted codes use G118.
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: G18 Arcs in a G17 G68 rotation?

Post by cncsnw »

If you are looking for a takeaway lesson for CNC machining students, though, it is this:

When it comes to advanced geometry, there is a reason that CAD/CAM systems just post thousands of short G1 moves. Anything else is too dependent on the whims of one control system or another.

G68 G18 probably works on some controls.

G118 works only on Centroid controls.

G1 works on all controls.
Bham-Tech-RM
Posts: 13
Joined: Mon Jul 03, 2023 2:52 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0326130718
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G18 Arcs in a G17 G68 rotation?

Post by Bham-Tech-RM »

G118 was what I needed. This code gave the desired result.

Code: Select all

G1 Z0. F5.; FEED DOWN
G18; XZ PLANE SELECT
G03 G118 P#105 X[#101-#102+#103] Z-#102 R#102 F25.; ROTATE ARC PLANE & CUT ARC
G1 G91 X-.1; MOVE OFF
The intended takeaway is to demonstrate that even complex shapes can often be reduced to simple patterns. The exercise will be to convert the code into programs for corner rounding bores and cores.

I am also just a nerd for long-hand programming and this was an interesting exercise.

Thanks for your help. My takeaway today is to RTFM.
Post Reply