how does G2,G3 work??

# Thread: how does G2,G3 work??

1. ## how does G2,G3 work??

I am trying to understand how g2 or g3 works. Does anybody know where I can find a good explanation of how this works?
It is most likely very simple and I am over thinking it....LOL
This may sound like a dumb question, but I have never programmed with G code only Mastercam, relying on good post processors.

Thanx

2. They work good!

Actually, to put it briefly, the G2 or G3 is a call code for your controller to use it's circular interpolation hardware to generate sinusoidal motion on two axis. Each axis moves different amounts and speeds during the movement, just as your pencil must do in X and Y if you were to draw a circle on a graph.

A G1 by contrast, is a call for simple linear motion of one or more axis, that means that they all start and end their linear movements at the same instants, but each axis moves at a constant speed throughout the movement.

The G2 and G3 commands also look more complex, because the controller also needs a parameter that describes where the center of the arc is supposed to be, in order that it can base its internal calculations on the correct point. So, quite often you will see the arc center described in terms of I and J, which are synonymous with the X and Y coordinates of the arc's center.

Your machine is always assumed to be at the start of the arc before reading the G2 or G3, so the G2 or G3 contains an X and Y component which describes the final position after the arc has been traversed.

More modern controllers, use a simple R (radius) value to determine the arc center, and leaves the geometric calculation of the center point up to your controller to figure out. This makes programming appear simpler to read, although it can skew a whole toolpath, if the R value is edited at the controller.

3. Wow HuFlung, That wore me out reading it. BadRandle wanted a "simple" explanation.

G2 will cut an arc in the Clockwise direction. G3 will cut an arc in the CounterClockwise direction. Make a linear move (G1) to where the starting point of the arc. Then program a line with G2 or G3 and an X,Y,I,J as follows:
X = the X coordinate of the end point of the arc.
Y = the Y coordinate of the end point of the arc.
Note: if cutting a full cirlce, X/Y will be the same as the starting point.
I = the distance and direction in the X axis from the starting point of the arc to the arc center.
J = the distance and direction in the Y axis from the starting point of the arc to the arc center.
Note: direction for I/J is defined using positve or negative numbers.

Also beware of cutter compensation (G41/G42) when using G2/G3. This will determine if you will cut to the inside of your arc or on the outside.

4. Don't overlook that some controllers require the arc center coordinates to be absolute coordinates, if your main program is in absolute, whereas others require that those arc center coordinates must be in incremental, even if your end coordinates are in absolute.

There are several permutations of these things that can drive a person wacky. Some things just look simple. but are very complex, the deeper you delve.

5. ## Lets not........

Lets not forget controls that only require an "R".
Thats the easy way to go if your just starting to
prog. manually.

6. Summery:

G2 clock wise (CW) move.
G3 counter clock (CCW) wise move.
(G1 linear move.)
(G0 rapid traval)
And these codes are generally always model, that is, stay active until canceled.
G, X, Y, I, J, format.
The position BEFORE the G2 or G3 must lay on the arc.
The X & Y in the G2 or G3 block also lays on the arc.
The I & J tells the control where the center of the arc is.

The I & J standard format is the signed incremental distance from the start point, that is, the postion BEFORE the current active G arc block.

Then next most common I & J format is the I & J are the absolute coordinates of the arc center (I = X center, J = Y center.)

On old NC controls the I & J are the unsigned incremental distance from the start block postion to the arc center. An in that old format the end G arc code end X & Y coordinate must lay within 90 degress of the start block coordinate. The old quarter quadrant arc block format.

There were a few other formats that were in use (non-G2 or G3 formats.)

In the standard format:

I is equal to (the center block X - the start block X coordinate.)
J is equal to (the center block Y - the start block Y coordinate.)

The radius is equal to the square root of ( I^2 + J^2)

The X & Y in the block is the end point of the arc move.

7. hardmill's got it right. R and end point are the way to go. Center points will mess with you. E-Stop also has it. Only depending on the machine you do or don't need I and J. My Fanuc doesn't.

8. ## G2 / G3 ... 2Nd Semester

Good stuff guys ... Just thought I'd pile on a couple of thoughts.

--- Modality---

G2/G3 are modal (in most machines.). Meaning that they stay active until cancled by another modal command in therir "Group". This would include G1, G2 or G3, Canned Cycles like G81 etc. Check the code list in your manual.

So after calling a G2, the next arc move does not require you to call another G2, Just the appropriate X Y Z I or J.

--- Helical Interpolation ---

If your control supports helical interpolation, this is usualy acomplished with a G2 o G3 that contains a Z Value in addition to X Y I & J. In this case all of the other values work the same.

-- Arcs in other planes ---

Most Fanuc type controls spend most of their life in the G17 (XY plane). Your programs prolly have a G17 up near teh beginning, and maybe before and or after a toolchange.

G17 is a modal command that tells the control to generate movement in the X,Y axis. (ie. the arc centerline is paralell to the Z axis). For working in other planes, you can still use the G2 or G3, But you must first tell the control to change planes. G18 and G19 is commanded to use XZ or YZ Arcs (centerline paralel to X or Y axis). For an example of this, toolpath an YZ Arc in Mastercam. Depending on how your post is set up and whether uo comp to the tip or the center of a ball mill you may need to check the filter box. Post the code and check it out. You should see a G18 or G19 then your G2 or G3. Notice the X or Y is replaced with Z.

A point of interest here. If you (or your post) dont command G17 before you change tools, you will probably receive an error message that seems to make no sense. The machine will be telling you it cant Go Home or to tool change position because the coordinate system is all goofed up.

To get really tricky you can use polar coordinates and do pretty cool stuff with G2 and G3 (machine domes etc.) that would be a topic for another day.

Hope that helps.

9. ## learning curve

Hi Guys,

I am new to cnc and I am about to pick up a foamcutter (foamlinx)and I want to be able to use it for more than just cutting wings. Can you recommend good software that I can use to make other shapes and that will not take the fun out of learning to use it?

I read through a few of these threads and I want to get to it!

Thanks in advance for any help you can give me.
David

10. Fanuc's are one of the easiest to do arc's on. Just take it to whatever start point you want, then put in the finish point and either G2 or G3 and away you go.

I remember the machines I used at college were a ****ing nightmare to do rads on

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•