Reference for CNC Turning
Reference for CNC Turning
In the same operation mode (8) if the key G is pressed the screen will display:
TOOL OFFSETS/G53-G59
G53 X —— . — Z —— . —-
G54 X —— . — Z —— . —-
G55 X —— . — Z —— . —-
G56 X —— . — Z —— . —-
G57 X —— . — Z —— . —-
G58 X —— . — Z —— . —-
G59 X —— . — Z —— . —-
Attention:
The X,Z values refer to the machine zero point.
It must include all the geometrical and technological data required for the machine-tool
to perform the required functions and movements.
N : Block No.
G : Preparatory functions
4th, 3rd,X,Z : Coordinate values
F : Feedrate
S : Spindle speed
T : Tool No.
M : Miscellaneous functions
This order has to be maintained within each block, although each block does not
necessarily contain all of these items.
If the machine has a 3rd and/or 4th axis (the denomination of which is defined by the
machine parameter) it is possible to program them both in rapid positioning G00 and in
Linear Interpolation G01, with a maximum of 3 axes in the same block and in the following
order: 4th, 3rd X Z.
However, if the 3rd axis is of the C axis type, it is also possible to program circular
interpolations G02/G03 with it, as long as the G15 or G16 functions are activated.
Atention:
In the different programming formats throughout the manual, the 4th and
3rd axes will be indicated as such, although depending on the type of
machine, their display and programming will be as follows:
The movements programmed following G00 are executed at rapid feedrate set during the
final adjustment of the machine by means of the machine-parameters.
There are two different ways of movement in G00, depending on the value applied to
P607(3) machine-parameter.
The rapid feedrate value is independent for each axis, thus, the path is not controlled when
more than one axis move at the same time.
When several axes move simultaneously, the resulting path is a straight line between the
initial and the final point. Feed will be set by the slowest axis.
a) P607(3)=0 b) P607(3)=1
When programming G00 function, the last F programmed is not cancelled, that means that
when G01,G02 or G03 is programmed again, the mentioned F is recovered.
The G00 code freezes the tool radius offset (G41, G42). I.e., when it is working with G41
or G42 and G00 is programmed, the radius offset remains ineffective until G01, G02 or
G03 is programmed again.
The code G00 is modal and incompatible with G01,G02,G03 and G33. G00 function can
be programmed with G or G0.
The movements programmed after G01 are performed in a straight line at the feedrate F
programmed.
When two or three axes move simultaneously, the resulting path is a straight line between
the initial point and the final point. The machine moves along that path at the programmed
feedrate F.
The CNC calculates the feedrates of each axis so that the feedrate of the resulting path is
the programmed F.
Example:
The knob on the front panel of the CNC can be used to vary the programmed feedrate F
between 0% and 120% or between 0% and 100%, according to parameter P600(3).
If, during a G01 movement, the key is pressed, the movement will be performed at
twice the programmed feedrate if P600(3) is zero.
When the CNC is turned on, after executing M02/M30, after an EMERGENCY or after
a RESET, the CNC assumes the G01 code.
The movements programmed following G02/G03 are performed in a circular path at the
programmed feedrate F.
The definitions of clockwise (G02) and counter-clockwise (G03) have been fixed accor-
ding to the system of coordinates depicted below (right-hand or dextrogyratory system).
a) Parameter P600(1)=0
b) Parameter P600(1)=1
Functions G02/G03 are modal and incompatible both with one another and with G00,G01
and G33.
N4 : Block number
G02 (G03) : It defines the interpolation
X+/-4.3 : Coordinate value of the arc’s final point along the X axis.
Z+/-4.3 : Coordinate value of the arc’s final point along the Z axis.
I+/-4.3 : Distance from the arc’s starting point to the center along X axis.
K+/-4.3 : Distance from the arc’s starting point to the center along Z axis.
I,K Must be programmed with a sign. They must be programmed even when their value
is 0.
The block format to program a circular interpolation with polar coordinates is:
N4 : Block number
G02 (G03) : It defines the interpolation
A+/-3.3 : Angle from the polar arc center to the arc’s final point.
I+/-4.3 : Distance from the starting point to the arc’s center along X axis.
K+/-4.3 : Distance from the starting point to the arc’s center along Z axis.
When a circular interpolation is programmed in G02 or G03, the arc’s center is taken as
the new polar origin. Even when the X axis is programmed in diameters, I is always
programmed in radius.
If, during a G02/G03 movement, the key is pressed, the movement will be performed
at twice the programmed feedrate if P600(3) is zero.
G02(G03) being the function which defines the circular interpolation direction.
That means that the circular interpolation can be programmed with its final point plus the
radius instead of the center (I,K) coordinates.
If the arc is smaller than 180º, the radius will be programmed with positive sign and if it
is bigger than 180º, the sign will be negative.
If P0 is the starting point and P1 is the final point of the arc, for a same value of R, there
are four different arcs which pass through both points.
By combining the direction (G02/G03) and the sign of R(+/-) the required arc is identified.
In this way, the format of the programming of the drawing’s arcs is as follows:
Arc 1 G02 X Z R-
Arc 2 G02 X Z R+
Arc 3 G03 X Z R+
Arc 4 G03 X Z R-
By adding G06 in a block containing a circular interpolation, the coordinates for the center
of the arc (I,K) can be given in absolute values. That is, referred to the part’s datum point
instead of being referred to the arc’s starting point.
G06 is not MODAL, therefore, it must be programmed every time absolute center
coordinates are to be used.
When programming in this way, the value of I must be either in diameters or radius
depending on the setting of machine parameter P11.
1.
2.
When G74 is programmed in a block, the CNC moves the axes to the machine-reference
point.
a) Two axes standard referencing (X Z). Only G74 programmed in the block. The CNC
moves first the X axis and then the Z axis.
b) One or two axes referencing (Z X). If machine reference search is required in an order
other than the above, G74 is programmed, followed by the axes in the required order.
When the axis moved reaches the machine-reference point, the CRT displays the distance
between the mentioned point and the last part’s zero programmed, minus the tool
dimension along the relevant axis (X or Z).
The programming of the coordinates of a point, may be carried out, either in absolute
coordinates G90 or in incremental coordinates G91.
When operating on G90, the coordinates of a point programmed, are referred to the point
of the coordinate origin.
When operating on G91, the coordinates of the point programmed, are referred to the
path’s previous point; i.e. the programmed values identify the distance to go along the
relevant axis.
When turning on and after executing M02,M30, EMERGENCY or RESET, the CNC
assumes the function G90.
The functions G90 and G91 are incompatible with each other when being in the same
block.
or
or
When the code G94 is programmed, the CNC assumes that the values entered by F4 are
in mm/minute (inches/10 minutes).
G94 is modal; i.e. it remains active until G95,M02,M30, EMERGENCY or RESET, are
programmed.
When the code G95 is programmed, the CNC assumes that the values entered by F3.4 are
in mm/rev. In inches the format is F2.4 and the maximum programmable value is 19.685
inches/rev.
The CNC assumes G95 on being turned on or after M02,M30 or a general RESET.
Atention:
The meaning of F (feed programming) differs, according to whether we
are working in G94 or G95, from the value of machine parameter P611
(5) when we are working in G94 and from the system used in programming
either in mm or inches. All this will be dealt with later in the section
FEED PROGRAMMING.
When the code G96 is programmed, the CNC assumes that the values entered by S4 are
in m/minute (feet/minute) and the lathe operates in constant surface speed mode.
The CNC assumes as spindle working range the one currently selected. If no range is
selected, the desired range (M41, M42, M43, M44) must be programmed in the same
block.
It is recommended that G96 and S4 spindle speed be programmed in the same block. If G96
is programmed alone, the CNC assumes as Constant Surface Speed the last one used in that
mode. If none was previously used, the CNC will issue error 10.
If the first movement after G96 is made in rapid (G00), to calculate spindle revolutions,
the CNC assumes as part diameter the one at the end of this movement.
If the first movement after G96 is made in G01, G02 or G03, the CNC assumes as part
diameter, the value at the time G96 is executed.
To calculate the number of rev./minute, the CNC will assume as diameter the actual value
when starting G01,G02 or G03.
G96 is modal; i.e. it remains active until G97, M02, M30 is programmed, EMERGENCY
or RESET
When the code G97 is programmed, the CNC assumes that the values entered with S4 are
in rev./minute.
If S4 is not programmed in the same block as G97, the CNC will take as programmed value,
the speed at which the spindle is actually running.
The CNC assumes G97 on being turned on, after M02,M30, EMERGENCY or RESET.
- Tool number. The two digits to the left of the decimal point may have any value
between 00 and 99. This value is used for selecting the required tool in the case of a
machine with automatic turret, and may be limited to a value lower than 99 according
to the machine parameter. This value is used to select the required tool.
- Tool compensation (tool offset table). The two digits to the right of the decimal point
may have any value between 01 and 32. With these figures the desired values are
selected in the tool offset table.
As soon as T2.2 is read, the CNC applies the X,Z,I,K values stored in the table except when
P604(5) is 1, in which case these values will be applied after an M06.
When G41 or G42 is programmed, the CNC applies the value stored at the programmed
T address (01-32) as radius compensation value.
If no T has been programmed, the CNC applies the address T00.00, which corresponds to
a tool of zero dimensions.
The following values are recorded in every tool offset table address (01-32).
To offset the tool nose radius the location code (F) of the tool must also be stored. Possible
codes are: F0-F9 (see figure).
Same as M00 except that the CNC only takes it into account if the conditional stop input
is activated.
This code indicates end of program and performs a general reset function of the CNC
(reversion to initial state). It also acts as an M05.
As in the case of M00, it is recommended that this function be set so that it is executed at
the end of the block in which it is programmed.
Same as M02 except that the CNC goes back to the first block at the beginning of the
program. It also acts as an M05.
This code means that the spindle starts running clockwise. It is recommended that this
function be set so that it is executed at the beginning of the block in which it is
programmed.
Same as M03 except that the spindle rotates in the opposite direction.
It is recommended that this be set so that the CNC executes it at the end of the block in
which it is programmed.
Format:
P0: Absolute X coordinate value of the starting point (A) in radius or diameters.
P5: Max. depth of cut per pass (radius). It must be greater than zero or error code 3 will
be displayed. The real step calculated by the CNC will be equal or smaller than the
max. step.
P7: Finishing stock allowance along X axis (radius). It must be greater or equal to zero,
or error code 3 will be displayed.
P8: Finishing stock allowance along Z axis. It must be greater or equal to zero or error
code 3 will be displayed.
If P9=0, there will be no finishing pass; but there will be a final roughing pass
maintaining the excess material indicated by P7 and P8.
If it has a negative value, neither a final roughing pass nor a finishing pass will be
carried out.
P14: Number of the last block to define the pattern. It must be greater than P13.
Otherwise error code 13 is generated.
When programming this canned cycle the following should be borne in mind:
1. The distance between the starting point 0 and final point (B) along X generating error
31 when operating with tool compensation the value of this distance (from 0 to B)
should be equal to P7+NP5, N being an entire number (any multiple of P5).
3. The definition of the pattern must not include point A because it is identified by P0
and P1.
7. If the last movement prior to calling the canned cycle (G68) has been executed in
G00, tool radius compensation (G41,G42) can be used. Otherwise error 35 will be
displayed.
The figure shows the elemental cycle. The movements 1-2 and 2-3 will be performed at
the programmed feedrate and the 0-1 and 3-0 in rapid.
N100 —
N110 G42 G00 X120 Z0
N120 G68 P0=K0 P1=K-10 P5=K2 P7=K0.8 P8=K0.8 P9=K100 P13=K200 P14=K250
N130 G40 X130 Z10
N140 M30
N200 G03 X40 Z-30 I-6 K-26
N210 G01 X40 Z-40
N220 G02 X80 Z-60 I25 K5
N230 G01 X80 Z-70
N240 X100 Z-80
N250 X100 Z-90
EXAMPLE: Let us suppose the coordinate values of the drawing’s points are: A(X0 Z0)
B(X90 Z-45) 0(X134 Z47) and the programming of X axis is in diameters.
N90 G00 X134 Z47 .................. (The tool located in point 0).
N100 G81 P0=K0 P1=K0 P2=K90 P3=K-45 P5=K5 P7=K3 P8=K4 P9=K100
P5: Max. step. It must be greater than zero or error code 3 will be displayed. The real
value calculated by the CNC will be smaller or equal to the max. step.
P7: Finishing stock allowance on the X axis. It must be greater or equal to zero or error
code 3 will be displayed.
P9: Feedrate of the finishing pass. If it is zero, there will be no finishing pass. If it is
negative, error code 3 will be displayed.
When programming this canned cycle, the following should be borne in mind:
1. The distance between the starting point 0 and final point (B) along the X axis must
be equal or greater than P7. To avoid passes that are too thin or generating error 31
when operting with tool compensation the value of this distance (from 0 to B) should
be equal to P7+NP5, N being an entire number.
4. If the position of the tool is not correct to execute the cycle, error code 4 will be
displayed. If it is correct a horizontal turning will be carried out until it is reached
and then the cycle will be executed.
5. If there is a finishing pass the cycle will be completed on the starting position of the
tool (0). Otherwise the cycle will end on point F.
6. If the last movement prior to calling the canned cycle (G81) has been executed in
G00, tool radius compensation (G41,G42) can be used. Otherwise error 35 will be
displayed.
The figure shows the elemental cycle. The movements 1- 2 and 2-3 will be performed at
the programmed feedrate and the 0-1 and 3-0 in rapid.
EXAMPLE: Let us suppose the coordinate values of the drawing’s points are: A(X90 Z-
45) B(X0 Z0) 0(X136 Z39) and the programming of X axis is in diameters.
N90 G00 X136 Z39 ............... (The tool located in point 0).
N100 G82 P0=K90 P1=K-45 P2=K0 P3=K0 P5=K5 P7=K3 P8=K4 P9=K100
P5: Max. step. It must be greater than zero or error code 3 will be one displayed. The
real step calculated by the CNC will be smaller or equal to the max. step.
P7: Finishing stock allowance on the X axis. It must be greater or equal to zero or error
code 3 will be displayed.
P9: Feedrate of the finishing pass. If it is zero there will be no finishing pass. If it is
negative, error code 3 will be displayed.
NOTES:
1. The distance between the starting point 0 and final point (B) along the Z axis must
be equal or greater than P8. To avoid passes that are too thin or generating error 31
when operting with tool compensation the value of this distance (from 0 to B) should
be equal to P8+NP5, N being an entire number.
2. The distance from 0 to A along the X axis should be higher than P7.
4. If the position of the tool is not correct to execute the cycle, error code 4 will be
displayed. If it is correct a vertical facing will be carried out until it is reached and
then the cycle will be executed.
5. If there is a finishing pass, the cycle will be completed on the tool’s starting position
(0). If there is no finishing pass the cycle will end at point F.
6. If the last movement prior to calling the canned cycle (G82) has been executed in
G00, tool radius compensation (G41,G42) can be used. Otherwise error 35 will be
displayed.
The figure shows the elemental cycle. The movements 1-2 and 2-3 will be performed at
the programmed feedrate and the 0-1 and 3-0 in rapid.
Format:
N4 G86 P0=K P1=K P2=K P3=K P4=K P5=K P6=K P7=K P10=K P11=K P12=K
P0: Absolute X value of the starting point of the thread (A) in radius or diameters.
P2: Absolute X value of the final point of the thread (B) in radius or diameters.
P4: Depth of the thread (in radius). If will have a positive value in external threads and
a negative one in internal threads. If it is zero error code 3 will be displayed.
- If the sign is positive, the depth of the second pass will be P5 2 and the
depth of the 11th will be P5 n , until the finishing depth is reached.
- If the sign is negative, the penetration increment will be constant and of a value
equal to the absolute value of the parameter.
- If the value is positive, this movement will be done in G05 (rounded corner).
The 0 value is considered positive.
- If the value is negative, this movement will be done in G07 (square corner).
P7: Finishing pass (in radius), this pass is carried out with radial approach.
- If the value is positive, the finishing pass will be carried out maintaining a P12/
2 angle with the X axis.
- If the value is negative, the finishing pass will be done with radial entry.
P11: Thread exit. It defines the distance from the end of the thread to the point where the
exit starts. If it is negative, error code 3 will be displayed. If it is different from zero,
the section CB’ is a tapered thread whose pitch along Z axis is P10. If it is zero, the
section CB’ is executed in G00 (X only while Z decelerates).
P12: Angle of the tool’s nose. It makes the starting points of the successive passes to be
at a P12/2 angle with X axis. Do not forget to adjust the tool angle by 1/2° if you
want each pass to shave the thread wall.
The machining conditions (feedrate, spindle rotation, etc.) must be programmed before
calling the cycle. The parameters can be programmed in the calling block or in previous
blocks. The parameters P80 to P99 are altered. The exit conditions are G00,G07,G40, G90
and G97. The cycle starts with a G00 approach to point A’ and ends at A’ as well. When
executing the block, the F feedrate speed cannot be altered by turning the FEEDRATE
knob whose value will be frozen at 100%.