G code: G2
, G3
Function: This command interpolates an arc from the current position along a circular path to the target position. G2
moves clockwise and G3
moves counterclockwise.
The arc is defined as follows:
Radius method
Target coordinate + radius: Target coordinates are defined in X/Y/Z. The curve is defined by radius R.
Midpoint method
Target coordinate + midpoint coordinate: Target coordinates are defined in X/Y/Z. The curve is defined by the midpoint coordinate I/J/K. The midpoint coordinate is located on the perpendicular bisectors of the start and end points. If this is not the case, then the midpoint coordinate is corrected automatically. The deviation shall not be greater than 10%.
Opening angle method
Opening angle + midpoint coordinate: Opening angle defined in T and midpoint coordinates in I/J/K. The target position is calculated automatically.
Inconsistent parameters lead to a line being traveled instead of a circle. Examples: If the radius is less than half of the distance between the start and target, then the deviation cannot be corrected. This is also the case if the defined midpoint to the start and target position has a different distance.
Syntax
G2 X Y Z R A B C P Q U V W F E H L/O D S
G2 X Y Z I J K A B C P Q U V W F E H L/O D S
G2 I J K T A B C P Q U V W F E H L/O D S
G3 X Y Z R A B C P Q U V W F E H L/O D S
G3 X Y Z I J K A B C P Q U V W F E H L/O D S
G3 I J K T A B C P Q U V W F E H L/O D S
G code word |
Description |
---|---|
|
Target positions of the Cartesian axes |
|
Circle radius |
|
Circle midpoint coordinates |
|
Opening angle (in degrees) |
|
Target positions of the additional axes |
|
Path velocity, path acceleration/deceleration |
|
Switch point |
|
Tool radius |
|
S profile |
Graphical representation: An arc is represented by black end points. The end points can be moved when you select the element.
See also
You can use the radius method for generating an arc < 180°. The radius method is valid for two arcs. One is smaller than a semicircle and one is larger than a semicircle. The system always uses the smaller arc.
Use the midpoint method with I/J/K for generating an arc with an opening angle greater than 180°. The radius method is unique, except in the case that the start and end points of the circle are identical. This defines either a null circle or a full circle. In this case, the system inserts a full circle.
If you use the midpoint method, then you distinguish whether the coordinates I/J/K are relative or absolute. If I
, J
, and K
are not specified correctly, then an arc is not possible and the system replaces it with a line. If it is correct, then the distance between the midpoint and the start or end point is identical.
Examples
Same semicircle as in the radius method; specified by means of relative midpoint
N10 G1 X100 Y100 F100
N15 G99
N20 G2 X200 Y100 I50 J0
Same semicircle as in the radius method; specified by means of absolute midpoint
N10 G1 X100 Y100 F100
N15 G98
N20 G2 X200 Y100 I150 J100
See also