Hello Guest it is June 12, 2025, 06:59:55 AM

Author Topic: G2 didn't work  (Read 4411 times)

0 Members and 1 Guest are viewing this topic.

G2 didn't work
« on: January 23, 2025, 09:59:31 AM »
OK, so it's probably just the format.  In Mach 3, with the center at X=0, Y=0, move the bit to X=1 and a G2X1Y0J0 would get you a nice one inch radius circle around the centerpoint.

Did not work in Mach 4.  What gives?

Offline thosj

*
  •  540 540
Re: G2 didn't work
« Reply #1 on: January 23, 2025, 12:52:26 PM »
I think you'll need an I in there, and remember, I and J are relative, not absolute.

https://www.cnccookbook.com/cnc-g-code-arc-circle-g02-g03/#defining-the-center-via-ijk-relative-offsets
--
Tom
Re: G2 didn't work
« Reply #2 on: January 23, 2025, 12:55:42 PM »
Mach 3 didn't need the I, but I will try it.  That is one of my most used functions.  Any time I need a hole and I don't have the right size mill bit, I use that command with a smaller bit to get the hole I need.

Offline thosj

*
  •  540 540
Re: G2 didn't work
« Reply #3 on: January 23, 2025, 01:03:26 PM »
I THINK, but I'm not certain, that Mach4 used Fanuc type gcode where Mach3 had sort of a conglomeration!!!
--
Tom

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: G2 didn't work
« Reply #4 on: January 23, 2025, 05:24:10 PM »
Mach4 uses standard Fanuc so :-

G00 X0 Y0
G01 X1. F10
G02 I-1.
M30
Without engineers the world stops
Re: G2 didn't work
« Reply #5 on: January 30, 2025, 07:52:59 PM »
Hi,

Quote
Mach 3 didn't need the I, but I will try it.  That is one of my most used functions.

All arcs in Mach3 were and still are 'Incremental', and this is what Mach users became accustomed to.

Mach 4 can be either 'Incremental' and therefore match Mach3 practice, and how I normally us Mach4 myself, or 'Absolute' which is more akin to
industrial practice. Depends on what you are used to.

Mach4 tends to be a lot fussier about code......there are a lot of shortcuts in Mach3, and they have been so widely used that we mistakenly came to assume
that they are standard...when they are not. Mach4 adheres to Fanuc21i very closely so much so that you might think 'Mach4 is broken' when in fact it is Mach3 'that is so loose'.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G2 didn't work
« Reply #6 on: February 01, 2025, 03:38:13 PM »
I finally figured it out.  The G2 command in Mach 4 defaults to incremental mode.  That is the only way I-1 could get you a center point of 0,0.  The G2/G3 instructions DO NOT tell you this.  They also don't tell you what omitted parameters default to.  With only I specified, what is it using for X,Y and J?  The instructions don't tell you.

When I do G90.1 first and put it in absolute mode, then the command G2X1Y0J0 works in Mach 4 like it always did in Mach 3.

I also figured out I was using the wrong command for circular pockets anyway.  I should have been using G12/G13 all along.
Re: G2 didn't work
« Reply #7 on: February 02, 2025, 12:06:39 AM »
Hi,

Quote
The G2 command in Mach 4 defaults to incremental mode.

Yes, that is correct. If you wish it otherwise you can set it that way.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G2 didn't work
« Reply #8 on: February 02, 2025, 12:13:18 AM »
Hi,

Quote
The G2/G3 instructions DO NOT tell you this.

This is from the MillGcode Manual, Mach4Hobby/Docs.
You might claim it's not clear....but it does tell you.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: G2 didn't work
« Reply #9 on: February 02, 2025, 12:14:19 AM »
Oh, there it is!  The Gcode programming manual says;

"Mach has two settings for how I, J, and K should be specified, absolute and incremental. This setting can be changed by G code, G90.1 and G91.1, or in the general tab in the Mach configuration."

It should say the defaults tab.