Professional Documents
Culture Documents
G - CODE
(G FUNCTIONS)
I
G00 Rapid
G04 Dwell
The movements in rapid mode are programmed with G00 code with indication of the
point to be reached.
The machining path programmed with G00 is performed by the programmed axes
simultaneously at the max. possible speed.
N.B. G00 undoes G99 (mm/Rpm)
Syntax
G00 X..Z..
Programming example :
.............
.............
G04 D5000
G00 X-16.5 Z45
G01 Z40.5 F150
G01 Z40 F150
.............
.............
The control calculates the speed vectors of each single axis, therefore the value
programmed under F represents the feed.
Syntax
G01 X..Z..F..
Programming example :
M03 S1500
G99 (mm/rpm)
G00 Z26
G01 Z-10 F0.5 (F0.5=0.5mm/rpm)
G54
or:
M03 S1500
G00 Z26
G01 Z-10 F750 (F750=750mm/1)
G54
IMPORTANT
Before programming G02 or G03 code, you must first select the working
plane to utilize (see G17/G18/G19).
Programming example :
or:
G04 Dwell
Syntax
G04 D..
Programming example :
............
............
G98
G00 X11.93 Z42
G04 D10
G01 X9.3 Z38 F100
G01 X8.8 Z25 F100
............
............
This function allows execution of the next programming block as soon as the axes
programmed in the previous blocks have stopped and are in position.
This function is not a modal function and it is valid only in the block in which it has been
programmed.
Syntax
G09
Programming example :
...........
............
M3 S800
G00 X11.93 Z42
G01 X9.3 Z38 F100
G01 X8.8 Z25 F100
G09 (before changing to the next block [S2000], it waits until the X and Z axes
have stopped and are in position)
S2000
G1 X7 Z20
............
This function enables the angular adjustment : B is programmed in degrees and X in mm.
The value set for the X axis defines the distance between tool point and chuck centre.
This function calculates the difference of the tool length to be added to or subtracted from
the programmed value based on the B angle that has been set.
Syntax
G10 B20X10
B= expressed in degrees
Programming example :
............
............
G00 Z42
G10 B20X10
G01 Z38 F100
G01 Z25 F100
............
............
N.B. : This function automatically calculates the software limit switches relative to the X axis on the base of
the B angle that has been programmed by the user.
Syntax:
G11 C xxx.x
xxx.x is composed of three integers and one decimal and is expressed in degrees.
This value has a range of 360 degrees. It must be multiple of 2.5 and cannot be smaller
than 2.5.
Programming example :
............
............
............
............
IMPORTANT
These functions can operate in the XY plane only, which is programmed
with G17.
Syntax:
G12 X.. Y.. Z.. I.. J.. F.. E..
X= final point of X axis for circular interpolation (it must be same as the initial point) (see
explanation for G02).
Y= final point of Y axis for circular interpolation (it must be same as the initial point) (see
explanation for G02).
Z= helical pitch in incremental mode (linear feed of Z axis at every circular interpolation).
I= value in incremental mode to define the centre of the circle with respect to the initial
point in X (see explanation for G02).
J= value in incremental mode to define the centre of the circle with respect to the initial
point in Y (see explanation for G02).
F= feed speed of the tool during the interpolation.
E= number of repeatitions of the single step. =1 by default (one complete circular
interpolation with feed of one step in Z).
Programming example :
............
............
G17
G00 X0Y12Z150
G12 X0Y12Z1I0J-12F500E5
............
NOTE : If a G91 code has been programmed before G12 or G13 also the values of X and Z
(as well as I and J) are to be programmed in incremental mode.
At the end of G12 or G13, G90 is automatically reactivated.
With the D parameter a delay time can be programmed. After this time has elapsed, the
control will execute the next instruction that has been programmed.
Should the D parameter be omitted, the Numerical Control will force its value to zero.
Syntax
G14 D..
Programming example :
............
............
G98
G00 X11.93 Z42
G14 D10
G01 X9.3 Z38 F100
G01 X8.8 Z25 F100
............
............
Syntax
G15
Programming example :
............
............
G98
G00 X11.93 Z42
G14
G01 X9.3 Z38 F100
G01 X8.8 Z25 F100
G15 (pusher return)
...........
...........
G17 - XY PLANE
G18 - ZX PLANE
G19 - YZ PLANE
G19 PLANE
G17 PLANE
G18 PLANE
Z
X
Remark : These functions are reset each time one of the following functions is
programmed: G33,G53,G54,G76,G76.1,M19.
They have thus to be reprogrammed when needed.
If the working plane has not been programmed, this will cause a non operation of the
circular interpolation.
Pict. 1
H Head length in Z
Y Head height in Y
Unit x.4
C
B=C+90
X+
Syntax
N.B.
Should the X Y plane not exist, the B parameter must be set to zero (B=0).
Should the Y Z plane not exist, the A parameter must be set to zero (A=0).
Programming example :
............
............
G00 Z42
G20 A10B20H75.5Y34.5
G01 Z38 F100
G01 Z25 F100
............
............
This function allows to move the axis /axes to zero in rapid. The movement sequence is as
follows:
- Recessing head
- Z Axis
- X Axis
- Y Axis
Syntax
G28 Z0 X0 Y0 U0
Programming example :
............
............
G01 Z31 F100
G01 X-19 Y19 F200
G28 Z0 X0 ; Z and X axes are moved to zero
G01 X19 F100
............
............
Remark : This function also performs the reset of the axes zero offset.
It also resets G98 (mm/1) and G40.
This function allows to program the unit for a single-pass threading cycle.
By means of this cycle, it is possible to perform tapered and cylindrical threads.
Please remember that the axis positioning at thread start as well as the number of the
single passes (No. of single passes = nth times G33) must always be programmed.
Syntax:
G33 X...Z...K...D..
Programming:
When programming this function with D parameter, the single-pass threading can be
performed with release/disarming of the Fette head at the value programmed by the
user.
In this case the approaching path is in the RIGHT direction. The compensation to select
will be G42.
D10
Tool radius G01Y10F5000
G01X30F5000
G17
G42
G01X10Y30F6000
.
.
.
In this case the approaching path is in the LEFT direction. The compensation to chose
will be G41.
D10
G01Y10F5000
G01X30F5000
G17 Tool radius
G41
G01X10Y30F6000
.
.
.
At the end of the compensation, remember to program G40, otherwise, all the next
programming steps will be performed with compensation ON.
N.B. : The blocks programmed in rapid (G0) stop the tool correction. After a G0 code, it
may happen that the axes included in the compensation function can move, in order to
compensate the programmed radius according to function G41/G42.
Should the user wish to avoid this movement, a value must be programmed enabling
the axis or the axes to stand still.
Example:
"****" By programming G00 x-43 [ -(35+8) ] the movement in the X axis is not performed.
Should this function not be programmed, at the next program block, X would reach the
value -35.
The tool radius compensation is automatically deactivated by programming G53 or G54.
Following we will use linear interpolation and raius compensation left to work with a
external recess (with insert) in the direction of the chuck.
The command G01 (linear) are follow by G00 (rapid) that need to get away from the part;
in G00 the radius compensation is temporary suspended.
The radius is in the parameter D (D7 in this example).
Before we introduce the preset of Z and X in the T parameter that now must be calculated
without the radius.
If we have a lenght of Z tool equal to 150.77 mm and the radius is 0.77 mm, we have to
introduce in preset of Z 150 mm, if the lenght of X is 20 mm we have to introduce 20.77
mm (must be -20.77 because the recessi is external). Then we have to introduce in the D
parameter the radius value.
T7
D7 ;radius=0.77
M03 S1300 P3
G0 X-15 Z55
G18
G41
G1 X-14.5 Z53 F3000 ;with the compensation the real position of X will be 15.27 mm
;instead of 14.5 mm programmed.
G1 X-14.5 Z17 F200
G1 X-15 F6000 ;here we get away from the part before write a G00.
G0 X-17 Z55 ;here we get away from the part in rapid movement (temporary
;suspended the compensation), the real position of X will be 17
;mm.
G1 X-8 Z55 F200
G1 X-8 Z43 F100
G1 X-9 F6000 ; here we get away from the part before write a G00.
G0 X-9.58 Z50
G1 X-9.58 Z42 F200
G1 X-11.9 Z39.28
G1 X-12 F6000 ; here we get away from the part before write a G00.
G0 X-12 Z42.5
G1 X-8.6 Z42 F200
G1 X-11.9 Z37.62 F100
G1 X-11.9 Z34 F200
G1 X-13.45 Z32.45
G1 X-13.45 Z17
G1 X-15 F6000 ; here we get away from the part before write G54.
G54 ;G54 remove the compensation like G40.
This function allows the axis/axes to perform a return movement according to a value set
by the user.
When programming this function, the user must check that the return value does not
cause any collision with the part being machined.
If the user is not in a hurry, he can choose G54 code, which moves the axis/axes back to
zero.
By means of F parameter you can program the speed at which G53 is performed. If this
parameter is omitted, the Numerical Control will automatically set the max. execution
speed.
Syntax:
G53ZxxXxxFxxxx
If F parameter (execution speed of movement) is omitted, the max. allowed speed will be
set (G0).
Programming example :
..............
..............
G01 Z31 F0.1
G01 X-19 F0.1
G97
G53Z10X10F10000
.............
.............
In G53 and G54 codes the return routine of the single axes is as follows:
Remark: For safety reasons, G53 or G54 must be programmed at the end of work program.
Should the Z axis not be programmed, it will be automatically moved to zero.
This function allows to move the axis/axes to the point nearest to the relative zero. In this
way, it is not necessary to program the axis return, since this is performed automatically.
Syntax:
G54
Programming example :
..............
..............
G01 Z31 F0.1
G01 X-19 F0.1
G97
G54
.............
.............
In G53 and G54 the zero return routine of the single axes is as follows:
Remark: For safety reasons, G53 or G54 must be programmed at the end of work program.
This function allows the unit program to be ended without moving the axes. The unit will
stop the axes in the position where they are (without returning to zero) and give the
program end command.
Be extremely careful, as the wrong use of this function might cause a collision with the
table.
Syntax:
G54.1
Programming example :
..............
..............
G01 Z31 F0.1
G01 X-19 F0.1
G97
G54.1
.............
.............
This function allows to change the position of origin of one or more than one axis. The
new positions programmed must be referred to the new origin.
Syntax:
Programming example :
..............
..............
G01 X0 Y10 F100
G56 X-10 Y0 ; change axis origin
G01 X0 Y10 F100 ; the axis X and Y move in positive direction of 10 mm
.............
.............
This function allow to add or sub from the axis origin the programmed quote. The
position programmed after G57 must be referred to the new origin.
Syntax:
Programming example :
..............
..............
G01 X0 Y10 F100
G56 X-10 Y0 ; change axis origin
G01 X0 Y10 F100 ; the axis X and Y move in positive direction of 10 mm
G57 X1 Y-1 ; this adds 1 mm to the origin of X (new origini sis X=-9
;mm)
;this subs 1mm from the origin of Y (new origin Y=-1
;mm)
.............
.............
This function introduces a revolution and degrees that the orbital unit has to make before
to continue with the program.
Syntax:
Programming example :
..............
..............
G01 X10 F100
G66 R10 D30 ; the unit wait 10 revolutions and 30 degrees before to
;continue with the program
G0 X0
.............
.............
This function allows to program the unit for a rigid threading cycle.
Syntax:
G76 Z(thread end value), U(thread pitch), R(Rpm spindle forward), H(Rpm spindle
backward), S(dwell at thread end), D(thread direction sense),P(pulley),G(spindle
orientation).
This function allows to program the unit for a single-tool threading cycle.
By means of this cycle it is possible to perform external, internal, tapered and cylindrical
threads.
Syntax:
G76.1 X...Z...U...W...L...R...P...Q...D...F...J...G...SBHCAT
Programming example :
............
G0Z32X10
G76.1 X20 Z1.5 U10 W20 L10 R0.75 P2 Q4 D0.07 F28.5 J1 G1 B1 T0.5
G54
If T parameter is not programmed , it is set as 0.2 by default (and it must be < 1 mm).
G L B J
|----|------------------|----|----|
W | Initial point of exiting path
from thread
1) ROUGHING UNIT
T40
D40
M3 S1200 P3
G0 X.9935
G0 Z2.7
M31
G76.5 X2.242 Z0.0785 U2.184 W2.26 L0.8252 R0.0869 P0 Q12 D0.001 F27 J2 B1 G2 A1 H4
M30
G53Z3.5
As regards the roughing unit you should have the following conditions:
P parameter=0
S parameter=0 or omitted
T80
D80
M3 S1200 P3
M21U82
G0 X.9935
G0 Z2.7
M31
G76.5 X2.242 Z0.0785 U2.184 W2.26 L0.8252 R0.0869 P0 Q12 D0.001 F27 J2 B1 G2 A5 H8 S46.17
M30
;M20
G53Z3.5
As for the finishing unit you should have the following conditions:
P parameter must be higher or same as 1
S parameter must indicate a phase degree value in relation to the spindle of the
roughing unit with a precision of 1/100 of a degree.
T90
D90
M3 S1200 P3
G0 X.9935
G0 Z2.7
M31
G76.5 X2.242 Z0.0785 U2.184 W2.26 L0.8252 R0.0869 P1 Q12 D0.001 F27 J2 B1 G2 A9 H12 S359.52
M30
M20
G53Z3.5
c
G76 Z(thread end value), U(thread pitch), R(Rpm spindle forward), H(Rpm spindle
backward), S(dwell at thread end), D(thread direction sense),P(pulley),G(spindle
orientation).
Programming example :
.....................
G0Z32
G75
G76.2Z6.5U1.5R500H800S10D1G90
If the parameter is omitted:
Please remember that G76.2 code is a dedicated function only and it must be utilized
exclusively for the transfer machines producing nuts. G76.2 code includes G15 (pusher
return) as well as G53 (unit return). Should G76.2 code be used, G15 and G53 must not
be programmed.
This function allows to program the unit for a single-tool threading cycle.
By means of this cycle it is possible to perform external, internal, tapered and cylindrical
threads.
This G Code hasnt the C parameter (equals increments) but it has a M parameter that
allows to work pulling or pushing with the recess.
This can be useful when the tool has 2 inserts (180 degrees of phase) on the Komet Head.
Syntax:
G76.5 X...Z...U...W...L...R...P...Q...D...F...J...G...SBHMAT
Programming example :
............
G0 Z32 X10
G76.5 X20 Z1.5 U10 W20 L10 R0.75 P2 Q4 D0.07 F28.5 J1 G1 B1 M1 T0.6
G4 D100
G54
If T parameter is not programmed , it is set as 0.2 by default (and it must be < 1 mm).
This function allows to call a subprogram with return to the next block of the work
program.
L. No. of subprogram
B. No. of subprogram block (it can be omitted)
R. No. of subprogram repeatitions (it can be omitted)
Syntax:
G79 L......BR
Programming example :
............
............
G0Z32
G79 L8000 B500 R2 it calls subprogram 8000, block 500 for 2 times
G76Z6.5P1.5R500D1
G4D100
G28Z0
This function enables to carry out a debourrage cycle with chip discharge.
At every repetition the linear axis returns to the starting value (previous line of G84) or to
the value programmed in G84.
Syntax:
Programming example 1 :
..............
..............
G0 Z31 F0.1
G84 Z20R5F100T500 [No. 5 repeatitions with return to Z31 because B has not been
programmed]
G97
G54
Programming example 2 :
..............
..............
G0 Z31 F0.1
G84 Z20B40R5F100T500 [No. 5 repeatitions with return to Z40 because B has been
programmed]
G97
G54
P parameter
This function enables to carry out a debourrage cycle with timed chip breaking.
At every repetition the linear axis stops at the actual value and waits for dwell end, if
programmed.
Syntax:
Programming example :
.............
.............
G0 Z31 F0.1
G84.1 Z20R5F100T500
G97
G54
............
............
P parameter
With this code, all dimensions are referred to a fixed origin, i.e. the unit zero.
The value that has been set is subtracted from the previous one, thus defining pathway,
displacement and direction.
Syntax:
G90
Programming example :
............
............
G90
G01 Z31 F0.1
G01 X-19 F0.1
G97
G54
............
............
With this code, all the subsequent dimensions are defined as differences in relation to the
position of block start (incremental programming).
Syntax:
G91
Programming example :
..............
..............
G91
G01 Z5 F0.1 (the Z azis moves by 5 mm in the positive direction sense)
G01 X-6 F0.1 (the X azis moves by 6 mm in the negative direction sense)
G54
.............
.............
This function enables to set and activate a limitation of maximum speed (Rpm) of the
spindle when G96 (constant cutting speed) is used.
Syntax:
G92 Sxxxx
Programming example :
...........
...........
G92 S1000
G96 S350
G01 Z31 F0.1
G01 X-19 F0.1
G97
G54
.............
.............
This function enables to cancel the maximum speed limitation (Rpm) defined by the user.
This function undoes G92.
Syntax:
G93
Programming example :
..............
..............
G92 S1000
G96 S100
G01 Z31 F0.1
G01 X-10 F0.1
G93 (this code cancels the spindle speed limitation)
G01 X-19 F0.1
G54
.............
.............
This function maintains a constant surface speed of spindle, depending on the actual
radius of the recessing axis.
Syntax
Programming example :
............
............
M03 S500
G92 S1000 (In case of spindles controlled by three-phase motors, G92 is
Necessary to allow operation of G96)
G96 S100 (m/min)
G98
G00 X11.93 Z42
............
............
This function disables G96 and maintains the actual speed of the spindle.
Syntax
G97
Programming example :
.............
.............
G92 S1000
G00 X-49 Z32
G96 S200
G99
G01 Z31 F0.1
G01 X-19 F0.1
G97
G54
............
............
With this function you can set with F the feed speed of the axes in mm/min.
N.B. After zeroing the units or after a G00, the machine will be in G98.
Syntax
G98
Programming example :
.........
.........
G98
G00 Z42
G01 Z5 F200
M05
G54
..........
..........
With this function you can set with F the feed speed of the axes in mm/revolution.
N.B. This function is cancelled by G00
Syntax
G99
Programming example :
M03 S2500
G00 Z42
G99
G01 Z18 F0.1 (0,1 mm. per spindle revolution=2500revs.*0,1mm/rev.=250mm/min.)
M05
G54