CNC Exercises
CNC Exercises
Boxford DUET
Tutorial 1:
10 9 8 7 6 5 4 3 2 1
Y+
D C
B A
X-
X+
1 2 3 4 5 6 7 8 9 10
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 -1 -2 -3
H
ORIGIN X0 Y0
-4 -5
-6 -7 -8 -9 -10
Y-
Examples of these co-ordinates are shown in the first table on the next page.
Boxford DUET
The Z axis is the vertical axis and the datum used is normally the surface of the work. Z is positive when moving away from the surface and negative when moving towards or into the surface.
POINT X Y DATUM 0 0 A 5 4 B 10 5 C -4 5 D -9 7 E -7 -3 F -4 -6 G 7 -5 H 5 -2
Incremental Co-ordinates The code G91 is used to select this type of programming. The points on the path to be machined are defined relative to the previous position. The points for the example on the previous page are shown in the table below.
POINT X Y
DATUM 0 0
A 5 4
B 5 1
C -14 0
D -5 2
E 2 -10
F 3 -3
G 11 1
H -2 3
The Z axis is again the vertical axis, and the points are defined relative to the previous position; positive when moving away from the surface and negative when moving towards or into the surface.
Boxford DUET
Tabulate the positions of the points A to H shown in the illustration below: a) b) in absolute co-ordinates in incremental co-ordinates
Y+ D
6 5
4 3 2
A B X+
1 2 3 4 5 6 7 8
X-8 -7 -6 -5 -4 -3 -2
1 -1 -1 -2 -3 -4
-5 -6
Y-
Boxford DUET
Tutorial 2:
Linear Interpolation
This tutorial illustrates the use of the G01 code; cutting takes place in a straight line at a controlled feed rate. Consider the component illustrated below; it is required to mill the two L shaped slots.
45
B
50 20
15
A
15 20
F
30 80
Y X
Material: Grooves: Tool change at: Tool used:
Absolute Co-ordinates The absolute co-ordinates of the points are shown in the table below:
POINT X Y A 15 15 B 15 35 C 45 35 D 65 35 E 65 15 F 35 15 T.C. 0 0
The program can be written in tabulated format as shown on the following page. Note: G00 is a default value and need not be programmed. The first tool is selected when entering the program into the computer.
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF
TUT 2/1
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE SPINDLE 2mm ABOVE POINT A FEED TO 2 DEEP POINT B POINT C 2mm ABOVE WORK ABOVE POINT D FEED TO 5 DEEP POINT E POINT F 2mm ABOVE WORK PARK POSITION END OF PROGRAM
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150 N160
Boxford DUET
Using compact format, the program for the component shown previously will be as follows: N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150 N160 Incremental Co-ordinates The incremental co-ordinates for the component are shown in the table below. Using these co-ordinates the program can be written as shown as follows:
POINT X Y TOOL CHANGE 0 0 A 35 35 B 0 20 C 30 0 D 20 0 E 0 -20 F -30 0 T.C. FROM F -35 -15
G90 G71 X0 M03 X15 G01 G01 G01 Z2 X65 G01 G01 G01 Z2 M05 M30
Boxford DUET
SHEET No. 1
OF 1
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE INCREMENTAL PROGRAMMING SPINDLE START RAPID TO 2mm ABOVE A FEED TO mm DEPTH FEED FROM A TO B FEED FROM B TO C RAPID TO CLEARANCE PLANE RAPID TO 2mm ABOVE D FEED TO 2mm DEPTH FEED FROM D TO E FEED FROM E TO F RAPID TO CLEARANCE PLANE STOP SPINDLE RAPID TO PARK POSITION END OF PROGRAM
N
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150 N160
G
90 71
0 91 03 01 01 01 0 30 15
25
15
1500
20 0
20 01 01 01 0 30
05 30
35
15
23
1. 2. 3.
Examine the program listed Enter the program into the computer Simulate the machining process and compare the movement of the cutter with the program
Boxford DUET
1. 2. 3.
For the component shown below, use a programming sheet and write a program for the cutter to cut a groove along the path from A to H. Enter your program into the computer and give it a test run. Edit your program if necessary.
F C
50
E H G B
D A
Y X
Material: Slots: Tool change at: Tool used:
Absolute Co-ordinates
POINT X Y TOOL CHANGE 0 0 A 20 10 B 60 10 C 20 30 D 20 20 E 60 40 F 20 40 G 60 20 H 60 30
Boxford DUET
Tutorial 3:
B
50 20
C
4 x 5 holes 10 deep
15
A
20 40 80
POINT X Y
A 20 15
B 20 35
C 60 35
D 60 15
Boxford DUET
DRAWING NUMBER
TUT3/1
SHEET No. 1
OF 1
TUT 3/1
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE RAPID TRAVERSE 2mm ABOVE HOLE A SPINDLE ON 1500 rev/min DRILL A 10mm DEEP RAPID TRAVERSE TO B DRILL B RAPID TRAVERSE TO C DRILL C RAPID TRAVERSE TO D DRILL D SPINDLE STOP TOOL CHANGE END OF PROGRAM
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140
Boxford DUET
G88 Rectangular Milling This code mills a rectangular pocket. The tool should be positioned 2mm above the pocket centre on the previous line. Enter X Y Z J F the side length of the rectangle the side width of the rectangle the distance from the workpiece face to the bottom of the pocket the number of cuts feed rate
The tool returns to its start point when the cycle is complete.
50
15
2.5 Rad
40 80
The program for the above component is shown on the following page:
Boxford DUET
DRAWING NUMBER
SHEET No. 1
OF 1
TUT3/2
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS RAPID TO TOOL CHANGE SPINDLE ON 1500 rev/min 2mm ABOVE CENTRE OF POCKET MILL POCKET SPINDLE STOP TOOL CHANGE END OF PROGRAM
90 71 5 03 40 88 05 30 40 5 25 15 5 2 8 25 4 125 5 25 1500
1. 2. 3.
Examine the two programs. Enter each program into the computer. Simulate the machining process for each program and compare the movement of the cutter with the program.
Boxford DUET
Exercise 3:
For the component shown below: 1. 2. Tabulate the co-ordinates. Use a programming sheet and write a program to drill the holes mill the square pocket (For tool changing, refer to Section 9.9). 3. 4. Enter your program into the computer and give it a test run. Edit your program if necessary.
30
4 x 3 through holes
30
50
10
20
60 80 15mm thick Plastic Material: Square Pocket: 5mm deep Tool change at: X 0, Y O
30
Boxford DUET
Tutorial 4:
Y X
X - Y Plane
X Z
X - Z Plane
Y Z
Y - Z Plane
- and can be complete (90) or partial (less than 90), within a single quadrant:
After entering G02 the following extra information is needed: X value Y value Z value two of these values specify the co-ordinates of where the curve finishes, the other value must be left blank.
Boxford DUET
I value the distance from the arc centre (incremental) to the tool position at the start of the cuts measured along: a) b) the X axis when cutting in X-Y or X-Z plane the Y axis when cutting in the Y-Z plane J value the distance from the arc centre (incremental) to the tool position at the start of the cut measured along: a) b) the Y axis when cutting in the X-Y plane the Z axis when cutting in the X-Z or Y-Z plane Note that I and J are unsigned values. Alternatively the radius of the arc can be entered as the I value and J left blank. Clockwise Circular Interpolation (G02) a) Single quadrant 90 arc in the XY plane To mill from A to B arc of centre C clockwise interpolation (G02)
CUTTER STARTS AT A
G = 02
X = 35
Y = 20
I=0
J = 10
A B
10 R
Y
30
C
25
Datum
Boxford DUET
b)
Single quadrant partial arc in the XY plane To mill from A to B arc of centre C clockwise interpolation (G02) G = 02 X = (25 + 5) = 30
A
30 o
I=0
J = 10
30
C
25
To calculate co-ordinates of B, construct triangle BCD CD = BD = 10 x cos60 10 x sin60 = 10 x 0.5 = 10 x 0.866 =5 = 8.66
A B Y
60 o
X D
Boxford DUET
Circular Interpolation Counter-clockwise This code moves the table in such a way that a counter-clockwise circular arc is cut in the work within a single quadrant. The cutter is positioned at the start of the arc on the previous line of the program. As with the G02 code, the arc may be in the X-Y, X-Z or Y-Z planes
Y X
X - Y Plane
X Z
X - Z Plane
Y Z
Y - Z Plane
- and can be complete (90) or partial (less than 90), within a single quadrant:
After entering G03 the following extra information is needed: X value Y value Z value two of these values specify the co-ordinates of where the curve finishes, the other value must be left blank.
I value the distance from the arc centre (incremental) to the tool position at the start of the cut measured along: a) b) the X axis when cutting in X-Y or X-Z plane the Y axis when cutting in the Y-Z plane
Boxford DUET
J value the distance from the arc centre (incremental) to the tool position at the start of the cut measured along: a) b) the Y axis when cutting in the X-Y plane the Z axis when cutting in the X-Z or Y-Z plane Note that I and J are unsigned values. Alternatively the radius of the arc can be entered as the I value and J left blank. Counter-Clockwise Circular Interpolation (GO3) a) Single quadrant 90 arc in the XY plane To mill from B to A arc of centre C counter-clockwise interpolation (G03) G = 03 X = 25 Y = 30 I = 10 J=0
A B
10 R
Y
30
C
25
Datum
Boxford DUET
b)
Single quadrant partial arc in the X-Y plane To mill from B to A arc of centre C G = 03 X = 25 Y = 30 I=5 J = 8.66
A
30 o
10 R
30
C
25
To calculate co-ordinates of B, construct triangle BCD CD BD = 10 x cos60 = 10 x sin60 = 10 x 0.5 = 10 x 0.866 =5 = 8.66
A B Y
60 o
X D
Boxford DUET
Example
D C B A
10
50
E F G
POINT X Y
A 10 10
B 20 20
C 30 30
D 40 40
E 50 30
F 60 20
G 70 10
The program for the above component is shown on the following page. Note: Blocks N70 to N90 define the arc in terms of its radius. Blocks N100 to N120 define the arc in terms of the co-ordinates of its centre
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF 1
TUT4
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE SPINDLE START POINT A FEED TO DEPTH A TO B B TO C C TO D D TO E E TO F F TO G RAPID OUT SPINDLE STOP TOOL CHANGE END OF PROGRAM
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150
90 71 5 03 10 01 02 03 02 02 03 02 20 30 40 50 60 70 20 30 40 30 20 10 2 05 30 5 5 25 10 2 2 10 10 10 0 10 0 10 0 10 125 5 25 1500
1. 2. 3.
Examine the program. Enter the program into the computer. Simulate the machining process and compare the movement of the cutter with the program.
Boxford DUET
D
50
10 Rad
A
25
J C B E
10 Rad
10 Rad
10 80 Material: 15mm deep Plastic Slot: 5 wide, 2 deep Tool change at: X 0, Y 0
For the cutter path shown above: 1. 2. 3. 4. Tabulate the co-ordinates A to J. Use a programming sheet to write a program for the path of the cutter centre line. Enter your program into the computer and give it a test run. Edit your program if necessary. Note: The curve must be programmed in a series of quadrants (90).
Boxford DUET
Tutorial 5:
A E
50 20
30
D
4 x 5 holes
15
B
15 13
20
40
C
Material: Plastic Tool change at: X 0, Y 0
1. 2. 3.
Mill the steps Drill the holes Mill the 30mm diameter pocket
Note: Tool Changing The program for the above component illustrates the method of programming a tool change; block N120 moves the cutter to a tool change position and block N130 calls up a new tool. M06 I J denotes a tool change gives the tool type, the tool diameter, and
Boxford DUET
SHEET No.
1 OF
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE CUTTER RAPID TRAVERSE 2mm ABOVE A SPINDLE ON 1500 rev/min FEED TO DEPTH MILL FIRST STEP RAPID TRAVERSE 2mm ABOVE C FEED TO DEPTH MILL SECOND STEP TOOL CHANGE POSITION TOOL CHANGE (5mm DRILL) RAPID TRAVERSE OVER HOLE D SPINDLE ON DRILL D 17mm DEEP RAPID TRAVERSE OVER HOLE DRILL E RAPID TRAVERSE OVER HOLE F DRILL F
N
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N120 N130 N140 N150 N160 N170 N180 N190 N200
G
90 71
5 1 03 01 01 79 01 01 05 06 20 03 81 20 81 60 81 60 81 05 5 5
5 54
5 5
55 5
15
2 1500 17 125
RAPID TRAVERSE OVER HOLE G N210 DRILL G TOOL CHANGING POSITION N220 N230
Boxford DUET
DRAWING NUMBER
SHEET No.
OF 2
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
TOOL CHANGE 10mm DRILL RAPID TRAVERSE 2MM ABOVE CENTRE OF POCKET SPINDLE ON MILL POCKET SPINDLE OFF, RAPID FEED TO TOOL CHANGE POSITION END OF PROGRAM
N
N240 N250 N260 N270 N280 N290
M
06
I
2
J
10
40 03 89 05 30 30 5
25
2 1500
0 5
5 25
125
1. 2. 3.
Examine the program. Enter the program into the computer. Simulate the machining process and compare the movements of the cutters with the program.
Boxford DUET
80
O3
50
O2
5mm Groove
15
For the component shown above: 1. 2. 3. 4. 5. Write down the sequence of operations required to produce the part. Tabulate the co-ordinates required. Use a programming sheet to write a program. Enter your program into the computer and give it a test run. Edit your program if necessary.
Boxford DUET
Tutorial 6:
Subroutines
A subroutine can be regarded as a personalised canned cycle for use in a program which has repetitive shapes. The illustration below shows such a component; the milled grooves can be programmed as a subroutine.
55
20
50
B
15
20 Material: Grooves: Tool change at: A,B : 15mm thick Plastic 5 wide x 3 deep X 0, Y 0 start positions for subroutines
The codes used for subroutines are: M43 subroutine create On entering M43, a prompt is made for an identifying number to be given to the routine. The number is entered in the I column and may have a value from 1 to 99. The user should note this reference number and the purpose of the routine. The mode of programming is now changed: the line number automatically reverts to 10 and co-ordinate entry, if absolute, becomes incremental. There is no restriction on the range of G codes (except G25) and all the canned cycles are available.
30
15
Boxford DUET
M44 subroutine terminate On entry of the signal to end the subroutine the line numbers of the original program are restored and the current absolute position of the tool is shown in the X, Y and Z columns. If the program was previously being entered with absolute co-ordinates, it reverts to its former style. M45 subroutine call On entering M45 a prompt is made to input the reference number of the subroutine in the I column. A search is made in the subroutine file and the first file found with that reference number is executed. Note: Care is needed when allocating subroutine identification numbers. The program for the previous illustration shows subroutine blocks S10 onwards being typed into the system immediately after block N50. After this the cutter is repositioned before calling up the subroutine and completing the program. Editing of subroutines The program EDIT facility can be used. If this is brought into use the program is displayed for editing but a further option (SUB) is offered:
SUB HELP MENU
If SUB is chosen, then the subroutine is displayed for editing. 1. 2. 3. Examine the program. Enter the program into the computer. Simulate the machining process and compare the movements of the cutters with the program.
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF 1
TUT 6
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
N10 N20 TOOL CHANGE N30 N40 POINT A SUBROUTINE FOR GROOVES POINT B SUBROUTINE FOR GROOVES N50 N60 N70 N80 N90 N100
90 71 0 03 5 45 55 45 05 30 0 0 25 30 1 5 1 1 0 25 1500
43 3 15 20 15 20 3 44
Boxford DUET
Exercise 6: Subroutines
20
50
20
20
20
20 30 55 80
Material: Grooves:
For the component shown above: 1. 2. 3. 4. Tabulate the co-ordinates required. Use a programming sheet to write a program; the L shaped grooves can be programmed using a subroutine. Enter your program into the computer and give it a test run. Edit your program if necessary.
15
20
25
20
Boxford DUET
Tutorial 7:
Mirror Images
This tutorial demonstrates how a program written as a subroutine can be reflected about the X axis or about the Y axis or about both the X and the Y axes. It supports both linear and circular interpolation. Consider the shape shown in illustration A, which has been drawn in the sequence 12, 2-3, 3-4 and 4-1.
2 1
If the X co-ordinates are reflected with Y co-ordinates unchanged, the shape becomes:
1 2
with the 1-2, 2-3, 3-4 and 4-1 sequence maintained Alternatively, if the X co-ordinates are kept constant and the Y co-ordinates reflected, the outcome is:
4
C
1
Boxford DUET
D
1 2
If a program which calls a subroutine containing the original shape is written, then any or all of the above variations may be implemented. The as programmed case is achieved by the usual method of calling the subroutine. The mirror facility is accomplished by inserting a line in the program after positioning the tool at the start of the cycle but prior to calling the subroutine. The entry is: G X Y value 28 value 0 or 1 value either 0 or 1
For example To reflect the X co-ordinate with Y unchanged: Enter G28 with X = 1, Y = 0 B
To reflect both the X and the Y co-ordinates: Enter G28 with X = 1, Y = 1 To cancel the mirror facility: Enter G28 WITH X = 0, Y =0 Note: For mirror image programming incremental co-ordinates must be used. D
Boxford DUET
Example
C
D' C' A' B'
50
30
10
15
20
10 30 50 80 Material: 15mm thick Plastic Slots: 5 wide x 3 deep Tool change at: X 0, Y 0
In the program for the above illustration, note that blocks S10 to S80 onwards are typed into the system immediately after block N40. 1. 2. 3. Study the program. Enter the program into the computer. Simulate the machining process and compare the cutter movements with the program.
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE SPINDLE ON POINT A CALL SUBROUTINE POINT B
N
N10 N20 N30 N40 N50 N60 N70 MIRROR IMAGE REFLECT X CO-ORDINATE Y UNCHANGED CALL SUBROUTINE N80 N90
G
90 71
0 03 45 50 91 28 45 1 30
0 20
25 1 7 2000
20
0 7
S20 TI S80 REPEAT CANCEL MIRROR IMAGE ABSOLUTE PROGRAMMING START OF SHAPE C INCREMENTAL PROGRAMMING MIRROR IMAGE REFLECT Y CO-ORDINATE X UNCHANGED CALL SUBROUTINE N100 N110 N120 N130 N140 N150 91 28 45 S20 TO S80 REPEATS CANCEL MIRROR IMAGE ABSOLUTE PROGRAMMING START OF SHAPE D INCREMENTAL PROGRAMMING MIRROR IMAGE REFLECT BOTH X AND Y CO-ORDINATES N160 N170 N180 N190 N200 91 28 1 1 28 90 50 30 0 0 0 1 7 28 90 30 30 0 0
Boxford DUET
DRAWING NUMBER
SHEET No.
2 OF
TUT 7
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
N210
28 90 05 30
25
43 0 10 0 10 0 0 44 0 0 10 5 15 0 3 0 0 0 0 3
SUBROUTINE TERMINATE
S80
Boxford DUET
50 30
20
20 30 50 80 Material: 15mm thick Plastic Slots: 5 wide x 2 deep Tool change at: X 0, Y 0
For the component shown above: 1. 2. 3. Write a program to machine the grooved triangles using the mirror image technique. Enter your program on the computer and simulate the cutting action. Edit your program if necessary. The manufacture of the component shown below uses the G86 and G87 canned cycles.
15
Boxford DUET
Tutorial 8:
80
G86 Canned Cycle Pitch Circle Diameter Drilling This code produces a series of holes on a circular pitch. The tool is positioned at a 2mm stand off point above the centre of a hole on the PCD on the previous line. Enter: X Z I J F number of holes to be drilled (must not be less than two) incremental distance from the face of the workpiece to the bottom of the hole the distance from the circle centre (incremental) to the first hole measured along the X axis as the I value but measured along the Y axis Feed rate
Boxford DUET
G87 Canned Cycle Dish Milling This code will mill out a circular dish-shaped pocket. The dish is produced by cutting a series of concentric circular pockets starting at X diameter, with successive circles getting deeper as they reduce in diameter, until the last circle is at Y diameter and depth Z. The total number of circles is J. Increasing the number of cuts will produce a better dish but the time taken will be greater. Enter X Y Z I J F the top diameter the bottom diameter of the dish The incremental distance from the face of the workpiece to the bottom of the dish For a complete dish enter zero, or for hollow circles (an outline around the edge) enter a value is the number of cuts to produce the dish the feed rate at which the dish is to be milled
The cycle is best used in two stages. For the first stage enter I = 0; this will rough out a pocket, leaving a stepped profile. On calling the code again for the second stage enter a value for I = 1; this will mill around the circumference of the circles, thus smoothing the profile. The program for the illustration shown earlier is shown on the following page. 1. 2. 3. 4. Study the program. Enter the program into the computer. Simulate the machining process and compare the cutter movement with the program. View the component in 3D.
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF 1
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE 5 DRILL SPINDLE ON, Move to Centre of P.C.D. DRILL HOLES ON P.C.D. TOOL CHANGE TOOL CHANGE SPINDLE ON, Move to Centre of Pocket ROUGH MILL DISH FINISH MILL DISH PARK POSITION END OF PROGRAM
N
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120
G
90 71
0 03 86 05 06 03 87 87 05 30 40 30 30 0 40 6 0
0 25
25 2 5 0 20 80 2000
25 2 5 2000 0 1 5 5 80 80
25 10 10 0
2 5 5 25
Boxford DUET
Exercise 8: Use of Canned Cycles Pitch Circle Drilling and Dish Milling
80
25
For the component shown above: 1. Write a program to machine 2. 3. the holes on the P.C.D. the dished pocket.
Enter your program on the computer and simulate the cutting action. Edit your program if necessary.
Boxford DUET
Tutorial 9:
4 3
50 45
30
20
The following program uses a subroutine which will mill a 90 arc of radius 15mm counter-clockwise and 2mm deep. It then uses the G28 Mirror Image routine to mill the other three arcs. The program is shown on the following page. 1. 2. 3. Study the program. Key in the program and run the simulation. Compare the cutter movements with the program.
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF
TUT 9
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOL CHANGE POSITION SPINDLE START OVER POINT 1 SUBROUTINE CREATE FEED TO DEPTH MILL QUADRANT WITHDRAW TOOL SUBROUTINE TERMINATE SUBROUTINE CALL POINT 2 ABOVE POINT 3 INCREMENTAL PROGRAM MIRROR IMAGE REFLECT X, Y UNCHANGED SUBROUTINE CALL CANCEL MIRROR IMAGE POINT 4 ABOVE POINT 5 INCREMENTAL PROGRAM MIRROR IMAGE REFLECT BOTH X AND Y SUBROUTINE CALL
N10 N20 N30 N40 N50 S10 S20 S30 S40 S50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150 N160 N170
Boxford DUET
DRAWING NUMBER
SHEET No.
2 OF
TUT 9
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
CANCEL MIRROR IMAGE POINT 6 ABOVE POINT 7 INCREMENTAL PROGRAM MIRROR IMAGE REFLECT X, Y UNCHANGED SUBROUTINE CALL CANCEL MIRROR IMAGE POINT 8 SPINDLE STOP. TOOL CHANGE END OF PROGRAM
N N180
G 28
X 0
Y 0
90
35 60
5 20
91 28 45 28 90 05 30 0 45 0 0 5 0 1 25 0 1 9
Boxford DUET
60 44
21 36 44 59 80 15mm thick Plastic Material: Tool change at: X 0, Y 0 5mm Slot Drill Tool used:
For the component shown above: 1. 2. 3. Write a program to mill the curved slots using a subroutine and mirror images. Key in the program and run the simulation. Edit your program if necessary.
Boxford DUET
Tutorial 10:
Enter in the S column the line number to which the jump is to be made. G26 Return from Jump After using a G25 the program executes from the line specified in the S column until a G26 is encountered. The program then reverts to the line following that from where the G25 call was made. The G26 is only operative after a G25 loop has been called. At all other times it is transparent. G57 Datum Shift This code enables the X Y datum to be altered by an amount specified in the X and Y columns. Enter X value - new absolute X datum Enter Y value - new absolute Y datum Note: The Z datum cannot be altered with G57. G53 Cancel Datum Shift This code is used to cancel a G57 datum shift, i.e. it makes X and Y shift equal to zero. The above techniques are illustrated in the following example.
Boxford DUET
50
15
15
15 10
15 20 50 Material: Slots: Tool change at: Tool used: 80 15mm thick Plastic 5 wide x 2 deep X 0, Y 0 5mm Slot Drill
The program is shown on the following page. 1. 2. 3. Study the program. Key in the program and run the simulation. Compare the cutter movements with the program.
20
Boxford DUET
DRAWING NUMBER
SHEET No.
1 OF 1
TUT 10
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES
ABSOLUTE PROGRAMMING METRIC UNITS TOOLPARK POSITION DATUM SHIFT TO X20 Y10 SPINDLE START MOVE OVER NEW DATUM INCREMENTAL PROGRAMMING FEED TO DEPTH CUT FIRST L SHAPE CUT FIRST L SHAPE RAPID TO CLEAR RAPID TO NEW POSITION ABSOLUTE PROGRAMMING RETURN FROM JUMP CANCEL DATUM SHIFT DATUM SHIFT TO X50 Y20 JUMP TO BLOCK N60 CANCEL DATUM SHIFT TOOL PARK STOP SPINDLE END OF PROGRAM
N10 N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 N120 N130 N140 N150 N160 N170 N180 N190 N200
Boxford DUET
50
25
25
20
10
20 10 45 Material: Slots: Tool change at: Tool used: 80 15mm thick Plastic 5 wide x 2 deep X 0, Y 0 5mm Slot Drill
For the component shown above: 1. 2. 3. Write a program to mill the L-shaped slots using the Datum Shift and Jump to Line codes. Key in the program and run the simulation. Edit your program if necessary.
20
OPERATIONS SHEET
SHEET No.
OF
TOOL FEED
TOOL REQUIRED
PROGRAMMING SHEET
DRAWING NUMBER
SHEET No.
OF
PROGRAMMED BY
CO-ORDINATES FEED RATE SPINDLE SPEED
NOTES