Sunteți pe pagina 1din 26

INSTITUSI TEKNIKAL JEPUN MALAYSIA

JABATAN TENAGA MANUSIA


KEMENTERIAN SUMBER MANUSIA
INSTITUT TEKNIKAL JEPUN MALAYSIA
MALAYSIA

KERTAS PENERANGAN
J14 DIPLOMA IN MANUFACTURING ENGINEERING TECHNOLOGY
KOD DAN NAMA
KURSUS
J15 DIPLOMA IN PRECISION MACHINING ENGINEERING TECHNOLOGY
KOD DAN NAMA
DPB1302 / DJB1302 NUMERICAL CONTROL PROGRAMMING
MODUL
PENGALAMAN
7.0 CNC MILLING PROGRAMMING II
PEMBELAJARAN
NO. TUGASAN NONE
BERKAITAN

UPON COMPLETION OF THIS TOPIC, STUDENTS SHOULD BE ABLE TO:


1. Describe the function of G00 and G01.
2. Explain the function of Circular Cutting by Circular
Interpolation (G02, G03)
TUJUAN 3. Describe the function of G04 and G28
PEMBELAJARAN
4. Describe the Tool Diameter Compensation (G40, G41 G42)
5. Describe the Tool Length Compensation (G43, G44, G49)

Upon completion of this course students should be able to :

Describe the history development, advantages and


CLO 1
disadvantages of CNC Machine

CLO 2 Describe the mechanism and controlled of CNC Machine


OBJEKTIF
PEMBELAJARAN Describe the various types and production system utilization of
CLO 3
CNC Machine

CLO 4 Write the CNC programming for Lathe and Milling

CLO 5 Write the CNC programming for Macro Program


This topic further explains various functions and commanding methods which are required
for the programming of the mechanical work and paths of tools to machine workpieces using
exercises.
You will be able to perform routine programming for machining centers by learning topic 8
and 9. However, details of commanding methods of programs vary with types of machining
center or manufacturers. Furthermore, in addition to the functions explained in this topic,
there are a variety of functions.

Fig. 7-1 Example of program

7-1 Rapid Traverse by Positioning (G00)


The positioning (G00) is a function which allows the tool to traverse rapidly from the present
position (start point) to the commanded position (end point). As shown in Fig. 7-2, the
positioning command designates the movement command of each axis by the address X, Y,
Z following G00.
Fig. 7-2 Commanding method of G00

Fig. 7-3 Command of G00

For the movement command, it is possible to command up to three axes at the same time as
shown in Fig. 7-3 (c). For the command value, the incremental command commands the
amount of movement from the present position to the commanded position, and the absolute
command commands a coordinate value in the selected work coordinate system, as shown
by the example of program in Fig. 7-4.
G00 is a modal G-function and G00 command can be omitted when the positioning is
continuously commanded.

Fig. 7-4 Example of program


7-2 Straight Cutting by Linear Interpolation (G01)
The linear interpolation (G01) is a function which gives the tool a cutting feed from the
present position to the commanded position along the straight line. As shown in Fig. 7-5, the
linear interpolation command commands the movement command of each axis by the
address X, Y, Z following G01 and the feed speed by the address F. Fig. 4-6 shows an
example of the program of the linear interpolation.

Fig. 7-5 Commanding method of G01

Fig. 7-6 Example of program

In the linear interpolation, linear cutting for a surface in parallel with the movement axis can
be performed by the one-axis movement command, and linear cutting for an inclined surface
can be performed by the two-axis movement command, as the example of program shows.
Furthermore, G01 and the F-function are modal and the commands of G01 and the F-
function (unless the feed rate is changed) can be omitted when the linear cutting is
continuously commanded.
When a workpiece with a three-dimensional shape, such as a free form surface, is
machined, the simultaneous three-axis movement command is sometimes commanded. In
ordinary operations, however, the form of a workpiece is machined by the movement
commands of the two axes, X and Y, and drilling is performed by the Z-axis movement
command.
Exercise 1
Make programs for the tool paths shown in Figs. 7-8 to 7-11 by using G00 and G01. In the
figures, it is assumed that the dotted line represents rapid traverse and the solid line
represents cutting feed. It is also assumed that the work coordinate system is G54 and the
feed speed is 150 mm/mm.

Fig 7-8 Tool path Fig 7-9 Tool path

Fig. 7-10 Tool path Fig. 7-11 Tool path


Exercise 2
Complete the programs for the tool paths shown in Figs. 7-12 and 7-13 by entering
necessary information into the parentheses.

Fig. 7-12 Tool path

Fig. 7-13 Tool path


7-3 Circular Cutting by Circular Interpolation (G02, G03)

The circular interpolation is a function which gives the tool a cutting feed from the present
position to the command position along the circular arc. The circular cutting in the clockwise
direction can be commanded by G02 command and that in the counterclockwise direction
can be commanded by G03 command.
The circular interpolation is commanded as shown in Fig. 7-14. The circular interpolation is
performed in a designated plane. Therefore, in the plane where GI 7 is selected (XY-plane),
the command value is given by the addresses X, Y and I, J. For G18 (ZX-plane), the
command value is given by the addresses X, Z and 1, K, and for G19 (YZ-plane), the
command value is given with the addresses Y, Z and J, K.

Fig. 7-14 Commanding method of G02 and G03 Fig. 7-15 Circular interpolation

Fig. 7-16 IJK command and R command in circular interpolation

For the center of the circular arc in the circular interpolation, there are two command
methods; i.e. a method which commands the distance from the start point of the circular arc
to its center by the address I, J, K (hereinafter referred to as IJK command), and a method
which commands the radius of the circular arc by the address R (hereinafter referred to a R
command) (Refer to Fig. 7-16.). The IJK command and the R command are always given in
an incremental value. Fig. 7-17 shows an example of the program of the circular
interpolation. As mentioned above, there are four kinds of command methods for the circular
interpolation.

Fig. 7-17 Example of program

Also, for the circular interpolation by the R command, two tool paths of A and B can be
considered, value as shown in Fig. 7-18. Therefore, in order to distinguish A and B, a
command is given by adding a minus (-) sign to the radius of the circular arc in the R
command when the angle of the circular arc is 1800 or more.

Fig. 7-18 Example of program

In the circular interpolation, when the coordinate value of the end point is omitted, entire-
circle machining which uses the present position of the tool as the end point can be
commanded. Fig. 7-19 shows an example of the program of entire-circle machining. The
entire-circle machining cannot be commanded by the R command.

Fig. 7-19 Example of program


Exercise 3

Make programs for the tool paths shown in Figs. 7-20 to 7-23 by using G02 and G03. In the
figures, it is assumed that the solid line represents cutting feed. It is also assumed that the
work coordinate system is G54 and the feed speed is 150 mm/mm.

Fig. 7-20 Tool path

Fig. 7-21 Tool path

Fig. 7-22Tool path

Fig. 7-23 Tool path


Exercise 4
Complete the program for the tool path shown in Fig. 7-24 by entering necessary information
into the parentheses.

Fig. 7-24 Tool path


7-4 Dwell (G04)

The dwell (G04) is a function which delays the execution of the next block by a specified
time. As shown in Fig. 7-25, the dwell commands the dwell time (sec) by the address P (or
X) following G04. As shown in the example of program in Fig. 7-26, the dwell is used to stop
the movement of tools at the bottom of holes temporarily in order to smooth machined
surfaces during drilling, spot facing, chamfering, etc.

Fig. 7-25 Commanding method of G04

Fig. 7-26 Example of program

The dwell time to be commanded is generally the length of time during which a tool makes
more than one turn at the bottom of a hole, as shown in the example shown below. When a
command is given by the address X, it is possible to input a decimal point of the dwell time.
In general, however, this approach is not often used because it is necessary to distinguish if
from the X-axis movement command. The dwell time is commanded by the address P.
However, since a decimal point cannot be inputted with the address P, the dwell time is
commended after converting into 1/ 1000 sec. (Example: 1 sec of dwell time is P1000.)

Example Dwell time at a main spindle speed of 300 mm-1 (Calculation formula)
Dwell time = 60 (sec)/300 (turns) = 0.2 (sec)

Consequently, a dwell of 0.2 sec or more is required. Assuming the dwell time to be 0.5 sec
with a margin, the dwell is commanded with G04 P500; (or G04 X0.5).
7.5 Automatic Return to Origin (G28)

Returning the tool from the present position to the machine reference point is called return to
origin. A function which can command this return to origin in a program is the automatic
return to origin (G28). The automatic return to origin commands an intermediate point
following G28, as shown in Fig. 7-27. When the G28 block is executed, the tool returns in
from the present position to the machine reference point of through the intermediate point in
rapid traverse. A command value of the intermediate point for the absolute command differs
from that for the incremental command, as shown in Fig. 7-28.

Fig. 7-27 Commanding method of G28

Fig. 7-28 Example of program

Fig. 7-29 G28 command in G91

In the incremental command, when a command is given with the present position of a tool as
the intermediate point, the tool automatically returns directly to the reference point of the
machine, as shown in Fig. 7-29. The machine reference point is the machines own position
which is set in it. Generally, tool change is made at this position. Therefore, it is necessary to
command the return to origin of the tool before the tool change is commanded. G28 is a one-
shot G-function and even when the G28 block is executed, the previous modal information
remains effective. Therefore, in principle, the tool diameter compensation and the tool
position offset, which are described on the following pages, have to be cancelled before G28
is commanded. The machines own position which is set by the NC unit is called reference
point. In general, the machine reference point is set at the same position as the reference
point, and thus the machine reference point and the reference point can be considered to be
synonymous. Consequently, the return to origin is also called the return to reference point. In
this textbook, the word of return to origin is used.

7-6 Tool Diameter Compensation (G40, G41 G42)

When contour machining of a workpiece is performed, a tool path should be such that the
tool is offset by the amount of its radius as shown in Fig. 7-30. A function which performs this
offset automatically is called tool diameter compensation. The programming which uses the
tool diameter compensation is described hereunder.

a. Commanding method of tool diameter compensation

A plane on which the tool offset is made is selected (selection of offset plane) by the plane
designation commands (G17, G18, and G19). For the tool offset, the offset vector (direction
and magnitude of the offset; Refer to Figs. 7-30 and 7-31.) on the selected plane is
calculated. The tool offset is made during the tool movement which is made by the
positioning command (G00) or linear interpolation command (G01). The tool diameter
compensation cannot be commanded by the circular interpolation commands (G02, G03).

Fig. 7-30 Offset tool path Fig. 7-31 Commanding method of G41 and G42
Fig. 7-32 Commanding method of G40 Fig. 7-33 Direction of offset

The tool is offset to the left in relation to the tool advance direction by the tool diameter
compensation left command (G41). In this case, cutting is downward. (Fig. 7-31 (a)) The tool
is offset to the right in relation to the tool advance direction by the tool diameter
compensation right command (G42). In this case, the cutting is upward. (Fig. 7-33 (b))

Fig. 7-34 Example of program

The movement command is given by the address X, Y, Z. The movement command must
be for more than one axis on the selected offset plane, and must involve the actual
movement of the tool. Following the address D, the tool 1iameter compensation number is
commanded with a numerical value of 2 digits or less (01 to9, 00 corresponds to
compensation amount of zero). The tool is offset by compensation amount which
corresponds to the compensation number commanded here (the compensation amount set
in the tool compensation memory of the NC unit). The tool compensation offset memory can
use up to 99 compensation numbers, including those of the tool position offset and the tool
length compensation which are described in the following sections. G41 or G42 offset is
cancelled (released) by G40 command (Fig. 7-32). The range from the time G41 or G42 is
commanded until the time G40 is commanded is called offset mode. Fig. 7-34 shows an
example of the program which uses the tool diameter compensation. In the tool diameter
compensation, compensation amount can be rewritten arbitrarily. Consequently, when the
tool diameter compensation is used, the exact shape of a workpiece can be programmed
regardless of the sizes of tool diameters (Fig. 7-35 (b)). In addition, there are other
advantages. For example, by adjusting the compensation amount, any amount to finishing
allowance can be set, ant repeated rough cutting, and finish cutting can be done with one
program (Fig. 7-35 (c)).

Fig. 7-35 Utilization of tool diameter compensation

b. Tool movements in the tool diameter compensation

In the tool diameter compensation, the following tool movements are made in the sequence
of cancel mode, start-up, offset mode, and offset cancel, as shown in Fig. 7-36.

Fig. 7-36 Tool movements in the tool diameter compensation

1. Cancel mode
After the power source is switched on, the reset button on the CRT control panel is pressed
and the program is terminated by the execution of M02 and M30, the tool is in the cancel
mode of the offset.
In the cancel mode, the magnitude of the offset vector is always 0 and the center of the tool
coincides with the programmed path. The program is terminated by the cancel mode. If the
program is terminated in the offset mode, the tool stops at the position where it is offset by
compensation amount.
2. Start-up
A tool movement when the cancel mode is shifted to the offset mode is called start-up. The
start-up is made when a block which satisfies all of the following conditions is executed.

Fig. 7-37 Two-block advance reading

In the start-up, two-block advance reading is made (Fig. 7-37), and an offset vector (an
arrow mark in the figure) which makes a right angle with the tool advance direction is created
at the end position of the start-up and the center of the tool is positioned at the tip of the
offset vector. Fig. 7-38 shows the tool paths at the start-up.

Fig. 7-38

Fig. 7-39 Path of the center of tool in the offset mode

3. Offset mode
The start-up turns the tool path in subsequent blocks into the path which is offset by
compensation. This is called offset mode. In the offset mode, offset is made even when the
movement command is given by G00 or G00, or even by G02 or G03, as shown in Fig. 4-38.
In the offset mode, two-block advance reading is made, and the center of the tool moves
towards the point at which the two offset paths intersect. The tool path from N6 to N7 is as
shown in Fig. 7-39.
4. Offset cancel
A tool movement when the offset mode is shifted to the cancel mode is called offset cancel.
By commanding the offset cancel, it is possible to cancel the offset mode of G41 or G42, and
to position the center of the tool at the position commanded by the program. The offset
cancel is made when a block which satisfies any of the following conditions is executed.

i G40 is commanded.
ii The tool number 00 is commanded.

The offset cancel is commanded by the movement command block by G00 or G01 Fig. 7-40
shows tool movements commanded by the offset cancel.

Fig. 7-40

c. Matters to be noted regarding the tool diameter compensation

1. Change of compensation amount


When the compensation amount is changed in the offset mode, the offset vector at the end
of a block is calculated by the compensation amount specified in the block and a tool
movement as shown in Fig. 7-41 is made

Fig. 7-41 Tool path in offset mode Fig. 7-42 Circular cuffing by rewriting the
compensation amount (positive and
negative)
2. Positive and negative of compensation amount
Generally, the compensation amount of the tool diameter is input in the tool compensation
memory of the NC unit in a positive value. However, if it is input in a negative value, the tool
makes the same movement as in a case where G41 and G42 are exchanged each other.
Fig. 7-42 shows an example of circular cutting.

3. Block which does not involve movements


If two or more blocks which do not involve movements are commanded consecutively
following the start-up or in the offset mode, a point at which the tool paths intersect can not
be calculated and thus the offset does not take place and this may cause excessive cutting
(or insufficient cutting), as shown in Figs. 7-43 and 7-44

Fig. 7-43 Excessive cutting in the offset mode 1

Fig. 7-44 Excessive cutting in the offset mode 2

When the tool is positioned at the start point of machining by the G17 plane designation, the
following program is prepared so that blocks of only the Z-axis movement command (on the
XY-plane, Z-axis movement is not regarded as a movement axis on the offset plane.) is not
in succession.
Fig. 7-45 Program for positioning the start point of machining

4. Changeover of offset modes


The changeover of the G41 and G42 offset modes is usually done after G40 is commanded.
If the offset direction is changed over in the offset mode, the tool makes a movement as
shown in Fig. 7-46 However, the offset direction cannot be changed over from the start-up
block to the next block.

Fig. 7-46 Changeover of offset modes

Fig. 7-47 Excessive cutting due to tool diameter compensation


5. Excessive cutting due to tool diameter compensation
When the inside of a circular arc smaller that the tool radius is machined as shown in Fig. 7-
47 (a), or when a groove smaller than the tool radius is machined as in Fig. 7-48 (b),
excessive cutting occurs due to the tool diameter compensation. For this reason,
immediately after the execution of last, block the NC unit gives an alarm and stops.

Exercise 5
Make a program for the tool path shown in Fig. 7-49 according to the columns of instruction
items in Table 4-1.

Fig. 7-49

Table 4-1
Exercise 6
Make a program for the tool path shown in Fig. 7-50 according to the columns of instruction
items in Table 4-2.

Fig. 7-50

Table 4-2
4-8 Tool Length Compensation (G43, G44, G49)
A function which offsets the tool movement on the Z-axis, by the compensation amount
which is set in the NC device is called tool length compensation. When the tool length
compensation is used, there is an advantage that the program can be made irrespective of
the tool length when making a program for the case of using plural tools of different length.
The programming which uses the tool length compensation is described below.

Fig. 7-51 Commanding method of G43 and G44 Fig. 7-52 Commanding method of G49

Fig. 7-53 Example of program by G43

Fig. 7-54 Example of program by G44

By the command of the tool length compensation + (G43), the compensation amount is
offset to the plus side (addition) in relation to the Z-axis movement command, as shown in
Fig. 7-51. Also, by the command of the tool length compensation - (G44), the compensation
amount is offset to the minus side (subtraction) in relation to the Z-axis movement command,
as shown in Fig. 7-52. Following the address H, the tool length compensation number is
commanded with a numerical value of 2 digits or less (01 to 99, 00 corresponds to zero
compensation amount.) The tool is offset by the compensation amount corresponding to the
compensation number commanded here (the compensation amount which is set in the tool
compensation memory of the NC device). Up to 99 compensation numbers, including the
offset number of the tool diameter compensation and the tool position offset which are
described in the last paragraph can be used.
By G49 command, the tool length compensation by G43 or G44 is cancelled (released).
When the G49 block is executed, the tool returns to the position commanded by the
program. By the command of the compensation number H00, the tool length compensation
can also be cancelled in the same way as G49. Recently, the tool length compensation can
be cancelled when the tool returns to its origin by G28 command. In this case G49 command
can be omitted.

b. Tool length compensation in the absolute command


As already mentioned, the absolute command gives the movement command within the
established work coordinate system. Therefore, for the tool length compensation in the
absolute command, tool length compensation setting methods as shown in Figs. 7-60 to 7-
62 are used because of the relationship between the origin of the Z-axis in the work
coordinate system and the compensation amount that is set in the tool length compensation.
Fig. 4-60 shows the method which measures all tool lengths in advance and uses measured
values as the compensation amounts (+ value). Fig. 7-61 shows the method which uses the
distance from the tip of the cutting edge to the reference surface of the workpiece as the
compensation amount (It becomes a minus value.). In this case, the origin of the Z-axis in
the workpiece coordinate system is squared with the reference point of a machine. Fig. 7-62
shows the method which designates a reference tool first, and uses the difference in length
between the reference tool and other tools as the compensation amount. In this case, the
distance from the tip of the cutting edge of the reference tool to the reference surface of the
workpiece is measured and the measured value is used as the compensation amount on the
Z-axis in the work coordinate system. Also, the compensation amount for the reference tool
is set to be 0.

Fig. 7-60 When the tool length is used as the compensation amount
Fig. 7-61 When the distance from the tip of the cutting edge to the reference surface of the
workpiece is used as the compensation amount.

Fig. 7-62 When the difference between the reference tool and used as the compensation
amount.
Exercise 7

Complete a program for machining the workpiece shown in Fig. 7-63 by entering necessary
information in the parentheses in the example of program. Figs. 7-64 and 7-65 show the tool
path in the example of program, and the kinds of tools to be used and cutting conditions.

Fig. 7-63

Fig. 7-64 Tool path on the XY-plane

Fig. 7-65 Tools to be used and tool path on the Z-axis


Example of program

S-ar putea să vă placă și