Вы находитесь на странице: 1из 80

CNC

INTRODUCTION TO CNC MACHINES & AXES

DIMENSIONING SYSTEM

G-CODES & M-CODES

FEATURES OF CNC TRAIN SIMULATION


SOFTWARE

PROCEDURE FOR EXECUTING A PROGRAM

SAMPLE PROGRAMS

EXERCISE
AXES IN CNC MACHINES

CNC axis may be either a linear axis in which movement is in a straight


line, or a rotary axis with motion following a circular path.

Depending on the machine type there are commonly two to five axes.
Rotary axes
The rotary motion about the X,Y and Z-Axis are identified by a,
b and c respectively. Clockwise is designated as +ve.
Z Axis
The Z Axis of motion is always the axis of the main spindle of
the machine. It doses not matters whether the spindle carries
the work piece or the cutting tool. On vertical machining
centers Z axis is vertical and on horizontal machining center
and turning centers Z axis is horizontal.
Positive Z Movement is away from the spindle.
X-Axis
It is always horizontal and parallel to the work holding
surface. Positive X Axis movement is identified as being to the
right, when looking from the spindle towards its supporting
column.
Y- Axis
It is at right angle to both X-Axis and Z-Axis
AXES IN MILLING MACHINE
A Milling machine has 3 axes of movement identified by X, Y & Z axes

+
+Z
Z
- +Y

Y +
X -X +X
- -
+

-Y
-Z
AXES IN CNC LATHE

Lathe has two axes identified by X and Z axes


ZERO POINTS &REFERENCE POINT
DIMENSION SYSTEM
Dimensional information in a work piece drawing can be stated in two ways
Absolute Dimension System or Incremental Dimension System.

Absolute Dimension System


Data in absolute dimension system always refer to a fixed
reference point. This point has the function of a coordinate zero point.
The dimension lines run parallel to the coordinate axes and always
start at the reference point.
Incremental Dimension System
When using Incremental Dimension system, every
measurement refers to a previously dimensioned position Incremental
dimensions are distance between adjacent points. These distances are
converted into incremental coordinates by accepting the last
dimension point as the coordinate origin for the new point. This may
be compared to a small coordinate system, i.e., shifted consequently
form point to point.
DIMENSION SYSTEM (TURNING)
30

P6 P5
20

P4
P3 10
ABSOLUTE INCREMENIAL
DIMENSIONING DIMENSIONING
P2 P1
POINTS X Z POINTS U W

(0,0)
P1 10 0 P1 10 0
P2 10 -10 P2 0 -10
P3 20 -10 P3 10 0
P4 20 -25 P4 0 -15
P5 30 -25 P5 10 0
P6 30 -35 P6 0 -10
10 15 10
100
70
P9 P8

P7

70

40
P3 P4

20
P5 P6
P1 20 P2
70
Reference Point 100

POINTS X VALUE Y VALUE POINTS XVALUE Y VALUE


P1 0 0 P1 0 0
P2 20 0 P2 20 0
P3 20 20 P3 0 20
P4 70 20 P4 50 0
P5 70 0 P5 0 -20
P6 100 0 P6 30 0
P7 100 40 P7 0 40
P8 70 70 P8 -30 30
P9 0 70 P9 -70 0

ABSOLUTE SYSTEM (G90) INCREMENTAL SYSTEM (G91)


PREPARATORY FUNCTION (G - FUNCTION)
G codes are instructions describing tool movement
Common G-codes in turning

G00 Rapid Traverse


G01 Linear Interpolation (cutting feed)
G02 Circular Interpolation (clockwise)
G03 Circular Interpolation (counter clockwise)
G20 Imperial (input in inches)
G21 Metric (input in metric)
G28 Goto Reference Point (Home Position)
G70 Finishing Cycle
G71 Multiple Turning Cycle
G74 Peck Drilling Cycle
G76 Multiple Threading Cycle
G90 Box Turning Cycle
G98 Feed Per Minute
G99 Feed Per Rev.
MISCELLANEOUS FUNCTIONS (M - CODES)
M Codes are instructions describing miscellaneous functions like calling
the tool, spindle rotation, coolant on/off etc.

M00 Program Stop


M01 Optional Stop
M02 Program End
M03 Spindle Forward
M04 Spindle Reverse
M05 Spindle Stop
M06 Automatic Tool change
M08 Coolant On
M09 Coolant Off
M10 Vice / Chuck Open
M11 Vice / Chuck Close
M30 Program Stop & Rewind
M38 Door Open
M39 Door Close
M98 Sub program Call
M99 Subprogram Exit
CNC TRAIN SIMULATION SOFTWARE

Click Start menu - Programs - CNC simulation CNCTRAIN


(or) Double click icon on the desktop
SCREEN DESCRIPTION

Main Menu

Simulation Screen

Combo Box

CNC Editor
SELECTION OF CONTROLLER TYPE

Click Control Type


For Turning select Fanuc O Turning
For Milling select Fanuc O Milling
How to write a new program
click

Click file on the main menu and click new CNC program and
type the program in the CNC editor screen .
How to load an existing program ?

1.Click file on the main menu and click load CNC program

2.Select a program and click open


How to save a CNC Program ?

click save as - enter file name - click save button - click yes to save

The existing program can also be saved by clicking - save


CNC program
PROCEDURE FOR EXECUTING A PROGRAM

Editing the program


Setting the tool and billet
Simulation
Sample Program O0007
G21 G98
G28 U0 W0
M06 T02 (Roughing tool )
M03 S2000
G00 X33 Z1
G71 U0.5 R1
G71 P1 Q2 U0.2 W0.0 F100
N1 G01 X5
G01 Z0
G01 X10 Z-10
G01 X10 Z-15
G02 X20 Z-25 R10
G01 X20 Z-30
G03 X25 Z-37 R7
G01 X25 Z-42
G01 X32 Z-47
N2 G01 X33
G70 P1 Q2 S2500 F50
G28 U0 W0
M06 T0404 (Grooving tool)
M03 S650
G00 X21 Z-28
G75 R1
G75 X10. Z-30 P100 Q1000 F20
G28 U0 W0
M05
M30
Edit Program
Click File - new CNC Program from the main
Click Edit on the combo box

Click here to Edit or


Writing the program

Type the program in


the Editor Screen
Saving the Program
Click : File - Save As
Type file name : Sample
Click Save icon
Setting tool

Step 1
Tool setting is done by clicking
Job/Tooling - Tool Offset

Step 2
Click the corresponding tool
Step 3
Click Select Tooling

Step 4 Double click to select tool from tool list


Step 5
Click Tool offsets

Step 7

Step 6
Step 8 click ok
Verify that left-hand tool is displayed on the tool 2 position
Likewise select the Tool4 (Grooving tool)by following step 2 to 8
Setting the Billet

Click Job/tooling-Billet Setting

Enter the length of billet

Enter the Dia of the billet

Click ok
Simulation

Step2 Click RESET

Step1 Click AUTO


Step3 Click CYCLE START
Left-hand Tool

Grooving Tool Finished Program


CNC Programming

Information needed by a CNC

1. Preparatory Information: units, incremental or absolute


positioning
2. Coordinates: X,Y,Z, RX,RY,RZ
3. Machining Parameters: Feed rate and spindle speed
4. Coolant Control: On/Off, Flood, Mist
5. Tool Control: Tool and tool parameters
6. Cycle Functions: Type of action required
7. Miscellaneous Control: Spindle on/off, direction of rotation,
stops for part movement

These information is conveyed to the machine through a set


of instructions arranged in a desired sequence Program.
BLOCK FORMAT

N135 G01 X1.0 Y1.0 Z0.125 F5


Restrictions on CNC blocks

Each may contain only one tool move.

Each may contain any number of non-tool move G-codes.

Each may contain only one feed rate.

Each may contain only one specified tool or spindle speed.

The block numbers should be sequential.


The data within a block should follow the sequence shown
in the above sample block
PROGRAM BUILD-UP FOR CNC LATHE
(FANUC CONTROLLER)

START UP OF CNC PROGRAM


While writing a program on fanuc controller first line has to be
started with letter o followed by four digit number which
specifies the program name.
O1024 G21 This code specifies that program is done in metric units
G20 - This code specifies that program is done in Imperial units
G21/G20 G98/G99 G40
G98 Feed in mm/min
G28 U0 W0 G99 - Feed in mm/rev
G40 Cutter radius compensation cancel
M06 T0101
G28 U0 W0- Makes the tool to go to home position.
M03 S1500 M06 T0101 Tool change. The first two digits after T specify the
tool position in the turret and last two digits denotes the tool offset
G00 X(VALUE) Z(VALUE) number.
M03 Makes the spindle rotate in clockwise direction
S1500 Spindle rotates at 1500 rpm
G00 -Gives rapid position of the too to a point specified in the X
and Z address
PROGRAM BUILD-UP FOR CNC LATHE
(FANUC CONTROLLER)

END OF THE PROGRAM

G28 U0 W0- Makes the tool to go to home position.


G28 U0 W0
M05 M05 Stop the spindle rotation

M30
M30 Program stop and rewind
PROGRAM FOR SIMPLE TURNING

CODE USED G00, G01

Syntax
Rapid Traverse
G00 X (VALUE) Z(Value)

Linear Interpolation
G01 X (VALUE) Z(Value) F(Value)
SIMPLE TURNING O1000
( Using G00 and G01 ) N1 G21 G98
N2 G28 U0 W0
N3 M06 T0101
N4 M03 S2000
N5 G00 X30 Z1
30
27 N6 G00 X29 Z1
N7 G01 X29 Z-50 F50
N8 G01 X30 Z-50
N9 G00 X30 Z1
N10 G00 X28 Z1
N11 G01 X28 Z-50
N12 G01 X30 Z-50
15.0 50 N13 G00 X30 Z1
ALL DIMENSION IN 'mm' N14 G00 X 27 Z1
BILLET SIZE :30 X 75
G CODES USED - G00,G01 N15 G01 X27 Z-50
N16 G01 X30 Z-50
N17 G00 X30 Z1
N18 G28 U0 W0
N19 M05
N20 M30
O1002
SIMPLE FACING G21 G98
G28 U0 W0
( Using G00 and G01 ) M06 T0101
M03 S2000
40 G00 X41 Z1
G00 X41 Z-1
G01 X10 Z-1 F30
G01 X10 Z1
G00 X41 Z1
G00 X41 Z-2
10 G01 X10 F30
G01 Z1
G00 X41
Z-3
G01 X10 F30
G01 Z1
G00 X41
Z-4
G01 X10 F30
G01 Z1
20 5 G00 X41
Z-5
ALL DIMENSION IN 'mm' G0I X10 F30
BILLET SIZE :40 X 75
G01 Z1
G CODES USED - G00,G01
G28 U0 W0
M05
M30
BOX TURNING CYCLE ( G90 )

Syntax

G90 X (VALUE) Z(Value) F(Value)

Tool movement
R

F R

F
PROGRAM USING BOX TURNING CYCLE
O1003
G21 G98 TOOL PATH
G28 U0 W0
M06 T0404 RAPID TRAVERSE
M03 S1500

RAPID TRAVERSE
G00 X22 Z1

FEED RATE
G90 X21 Z-30 F60 (Box turning cycle)

22
10
X20 PLAIN TURNING CYCLE
X19
X18
X17
X16 FEED RATE
X15
30
X14
X13
70
X12
X11
X10
G28 U0 W0
M05
M30
PROGRAM FOR TAPER TURNING
USING G90 CODE

Syntax

G90 X (VALUE) Z(Value) R (Value) F(Value)

TAPER TURNING CYCLE R- TAPER TURNING CYCLE R+


Rapid Rapid
F Rapid Rapid
F F F

CALCULATING R VALUE CALCULATING R VALUE


R = (Minor dia - Major dia) / 2 R = (Major dia - Minor dia) / 2
SAMPLE PROGRAM TAPER TURNING
Dwg.No:06
O1005
G90 - TAPER TURNING R - ve G21 G98
G90 TAPER TURNING R-
G28 U0 W0
M06 T0404
M03 S1200
G00 X32 Z1
G01 Z0 F60
(Box turning cycle)
G90 X32 Z-15 R-0.5 F60

32
25
X32 R-1
X32 R-1.5
X32 R-2
15
X32 R-2.5
X32 R-3
70
X32 R-3.5
G28 U0 W0
R = (Minor dia - Major dia) / 2 M05
M30
= (25 - 32) /2 = -3.5
SAMPLE PROGRAM TAPER TURNING
O1006
G90 TAPER TURNING R+
G21 G98
G28 U0 W0
M06 T0404
M03 S1200
G00 X33 Z-25
G01 X32 F60
G90 X31 Z-50 R0.5 F60
X30 R1
X29 R1.5
X28 R2
X27 R2.5
X26 R3
X25 R3.5
G28 U0 W0
M05
M30
R = (Major dia - Minor dia) / 2
= (32 - 25) /2 = 3.5
G02 Circular Interpolation (CW)
G03 Circular Interpolation (CW)

The G02 command requires


an endpoint and a radius in
order to cut the arc.
I,J, and K are relative to the
start point.

N_ G02 X2 Y1 I0 J-1 F10


or
N_ G02 X2 Y1 R1
MULTIPLE TURNING CYCLE ( G71 )
Syntax
G71 U(Value) R(Value)
G71 P(Value) Q (Value) U (Value) W (Value) F (Value)
U Depth of cut, in mm
R Retraction, in mm
P Starting block number
Q End block number
U - Finishing Allowance in X axis, in mm
W - Finishing Allowance in Z axis, in mm
F - Feed rate for the cycle

FINISHING CYCLE ( G70 )


Syntax
G70 P (Value) Q (Value) S (Value) F (Value)
P Starting block number
Q End block number
S Spindle Speed for Finishing
F - Feed rate for finishing
Dwg.No:09
PROGRAM USING MULTIPLE TURNING CYCLE
G71 - MULTIPLE TURNING CYCLE O1006
G21 G98
G28 U0 W0
22
M06 T0404
R5 M03 S1200
15
10 G00 X22 Z1
R5
(Multiple turning cycle
G71 U0.5 R1
G71 P10 Q20 U0.1 W0.1 F50
N10 G01 X0 Z0
5 15 15 10 5 G03 X10 Z-5 R5
70 G01 Z-15
G01 X15 Z-30
G01 Z-45
N20 G03 X22 Z-50 R5
(Finishing cycle
G70 P10 Q20 S2000 F30
G28 U0 W0
M05
M30
MULTIPLE FACING CYCLE ( G72 )
Syntax

G72 W(Value) R(Value)


G72 P(Value) Q (Value) U (Value) W (Value) F (Value)

W Depth of cut in each passes along Z axis, in mm


R Retraction, in mm
P Starting block number
Q End block number
U - Finishing Allowance in X axis, in mm
W - Finishing Allowance in Z axis, in mm
F - Feed rate for the cycle
PROGRAM USING MULTIPLE FACING CYCLE
N010 G21 G40 G98
N020 G28 U0 W0
N030 M06 T0404
N040 M03 S1200
N050 G00 X31 Z5
N060 G01 Z0
(Multiple facing cycle
N070 G72 W0.5 R1
N080 G72 P90 Q180 U0.2 W0.2 F30
N090 G01 Z-22.5 X30 F40
N100 X26
N110 Z-17.5
N120 X20 Z-15
N130 Z-10
N140 G02 X10 Z-5 R5 F40
N150 G01 Z-2.5 F50
N160 X5 Z0
N170 Z0
(Finishing cycle
N180 G70 P90 Q180
N190 G28 U0 W0
N200 M05
N210 M30
PECK DRILLING CYCLE ( G74 )
Syntax

G74 R
G74 X0 Z Q F

R Retract value of each peck, in mm


Z Final hole depth, in mm
Q Peck increment in micron without sign
F Feed rate
SAMPLE PROGRAM - PECK DRILLING
N010 G21 G40 G98
N020 G28 U0 W0
N030 M06 T0101 (Center drill
N050 M03 S1500
N060 G00 X0 Z3
N070 G74 R1
N080 G74 X0 Z-5 Q500 F30
N085 G28 U0 W0
N090 M06 T0303 (6mm drill
N100 M03 S1500
N110 G00 X0 Z3
N120 G74 R1
N130 G74 X0 Z-20 Q500 F30
N140 G28 U0 W0
N150 M06 T0505 (12mm drill
N160 M03 S1000
N170 G00 X0 Z3
N180 G74 R1
N190 G74 X0 Z-20 Q500 F30
N200 G28 U0 W0
N210 M05
N220 M30
GROOVING CYCLE (G75 )

Syntax

G75 R
G75 X Z P Q F

R Retraction, in mm
X Required Diameter, in mm
Z Left end point of Groove in Z axis, in mm
P Peck increment in each cut in X axis, in micron
Q Z Axis stepping distance, in micron
F Feed rate
SAMPLE PROGRAM - GROOVING
Dwg.No:13

G75 - GROOVING CYCLE


O1007
32
28 G21 G98
G28 U0 W0
M06 T0404 (2mm Groove tool width)
M03 S 800
G00 X33 Z-17
G75 R1
G75 X28 Z-20 P200 Q1000 F20
5 15
G28 U0 W0
70 M05
M30
THREADING CYCLE ( G76 )
Syntax
G76 P Q R
G76 X Z P Q F
Block 1
P A(02)B(15)C(60),
A-First 2 digit No of times to call the finishing cycle
B-Second 2 digit Pullout angle, in deg
C-Last 2 digit Thread angle, in deg
Q depth of cut, in micron
R Finishing allowance, in mm
Block 2
X Core Diameter of thread, in mm
Z End of the Thread, in mm
P Thread Height, in micron
Q depth of first cut, in micron
F Pitch of the thread, in mm
SAMPLE PROGRAM - THREADING

O1008
DIA25 G21 G98
M12 X 1.75 G28 U0 W0
M06 T2
M03 S400
G00 X12 Z1
G76 P031560 Q50 R0.1
G76 X9.853 Z-15 P1073 Q100 F1.75
15 G28 U0 W0
M05
M30
PROGRAM FOR DRILLING AND BORING

N010 G21 G40 G98 N180 G74 R1


N020 G28 U0 W0 N190 G74 X0 Z-20 Q500 F30
(Center drill N200 G28 U0 W0
N030 M06 T0101 (10mm boring bar
N050 M03 S1500 N210 M06 T0707
N060 G00 X0 Z3 N220 M03 S1200
N070 G74 R1 N230 G00 X12 Z2
N080 G74 X0 Z-5 Q500 F30 N240 G71 U0.5 R1
(6mm drill N250 G71 P260 Q280 U0.2 W0.2 F50
N090 M06 T0303 N260 G01 X24 Z0
N100 M03 S1500 N270 G01 X12 Z-13
N110 G00 X0 Z3 N280 G01 X11
N120 G74 R1 N290 G70 P260 Q280 F50
N130 G74 X0 Z-20 Q500 F30 N300 G28 U0 W0
N140 G28 U0 W0 N310 M05
(12mm drill N320 M30
N150 N030 M06 T0505
N160 M03 S1000
N170 G00 X0 Z3
EXERCISE ON MULTIPLE TURNING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE GIVEN COMPONENT
EXERCISE ON MULTIPLE FACING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE GIVEN COMPONENT
EXERCISE ON GROOVING AND THREADING
WRITE A CNC PROGRAM FOR MACHINING THE GIVEN COMPONENT

6 1X45

M12 X 1.75
5 5 15
EXERCISE ON MULTIPLE TURNING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE GIVEN COMPONENT
CNC MILLING
PROGRAMMING AND SIMULATION
File Menu
Options Menu
Dual Edit Option

Full Screen Mode


Graphics Options
View Options
Graphics Speed and Control Panel
Billet Setting
Tool Offset Select Tooling
Important M Codes for Milling

M00 - Program Stop


M00 waits for EOB (end of program) to be pressed.
M02 - End of Program
M02 halt program execution. The spindle is turned off and the tool moves to the
most positive position on the Z axis.
M03 - Start Spindle
M04 - Reverse Spindle
M05 - Stop Spindle
M06 - Change Tool
M08 - Coolant On
M09 - Coolant Off
M70 - X Mirror On
M71 - Y Mirror On
M80 - X Mirror Off
M81 - Y Mirror Off
M98 - Subprogram Call
M99 - Subprogram Exit
Important G Codes for Milling
G00 - Rapid Traverse or fast Traverse

G01 - Linear Interpolation or Slow Traverse

G02 - Clockwise Circular Interpolation

G03 - Counter - Clockwise Circular Interpolation

G04 - Dwell

G20 - Imperial Units

G21 - Metric Units

G28 - Go to Reference Point

G40 - Cancel Tool Radius Compensation

G41 - Left Hand Radius Compensation

G42 - Right Hand Radius Compensation

G73 - Peck Drilling Cycle

G90 - Absolute Movement

G91 - Incremental Movement

G94 - Per Minute Feed

G95 - Per Revolution Feed


Program using Linear and circular interpolation

O1694
[BILLET X100 Y100 Z10
N010 G21 G94
N020 G91 G28 Z0
N030 G28 X0 Y0
N040 M06 T2
N050 M03 S1200
N060 G90 G00 X-25.5 Y-37.5
N070 G00 Z5
N080 G01 Z-1 F50
N170 G00 Z5
N090 G03 X-37.5 Y-22.5 R15
N180 G00 X-15 Y0
N100 G01 Y22.5
N190 G01 Z-1 F50
N110 G03 X-22.5 Y37.5 R15
N200 G03 X15 Y0 R15
N120 G01 X22.5
N210 G03 X-15 Y0 R15
N130 G02 X37.5 Y22.5 R15
N220 G00 Z5
N140 G01 Y-22.5
N230 M05
N150 G03 X22.5 Y-37.5 R15
N240 G91 G28 Z0
N160 G01 X-25.5
N250 G28 X0 Y0
N260 M30
Deep Hole Peck Drilling Cycle ( G83 )

Syntax
G83 X___ Y___ Z___ Q___ R___ F___ ;

X__ Y__ : defined as the hole position, in absolute or incremental values.

Z__ : Distance from the reference point to the bottom of the hole in incremental
mode, or the position of the hole bottom in absolute mode.

R__ : Reference point in Z direction.

Q__ : defined as the Cut-in distance value or peck value. (Incremental only)

K__ : defined as the number of repeats, for a series of holes. When not specified K=1.

F__ : Feed rate


Circular Pocketing

G170 block,
R defines the position of the tool to start cycle ie. 0 (surface of job).
P defines roughing/ finishing cycle. (P is 0 for roughing cycle & 1 for finishing)
Q defines the peck increment.
X defines the pocket centre in X axis. Syntax
Y defines the pocket centre in Y axis. N10 G170 R0 P0 Q3 X0 Y0 Z-6 I0 J0 K-24 ;
Z defines the pocket base (depth) from job surface. N20 G171 P75 S30 R75 F250 B3500 J200 ;
I defines the side finish allowance.
J defines the base finish allowance.
K defines the radius of pocket. (Negative value - cut in CCW direction).
G171 block,
P defines the cut width percentage.
S defines the roughing spindle speed.
R defines the roughing Feed in Z.
F defines the roughing feed for X and Y.
B defines the finishing spindle speed. (Not applicable for roughing only).
J defines the finishing feed. (Not applicable for roughing only).

When setting offsets the value R must be included, R being the radius of the cutter.
The direction of the cutter path is controlled by K, a negative value for K means the cutter path is in a
CCW direction and if the K value is positive the cutter path is in a CW direction.
The Q value is always positive.
Program for Circular Pocketing

O 0002 ;

N10 G91 G28 X0 Y0 Z0 ;

N20 M06 T01 ;

N30 G90 G00 X0 Y0 Z10

N40 M03 S3000;

N50 G01 Z0 F300 ;

N60 G170 R0 P0 Q3 X0 Y0 Z-6 I0 J0 K-24 ;

N70 G171 P75 S3000 R75 F250 B3500 J200 ;

N80 G00 Z25 ;

N90 M05 ;

N100 G91 G28 X0 Y0 Z0 ;

N110 M30 ;
Rectangular Pocketing

Syntax
For G172 block, N10 G172 I50 J50 K0 P0 Q3 R0 X-25 Y-25 Z-6
I defines the pocket X length. N20 G173 I0 K0 P75 T1 S300 R75 F250 B3500 J200 Z5
J defines the pocket Y length.
K defines the radius of corner roundness.
P defines that 0 = roughing cycle.
Q defines the pocket Z increment.
R defines the Absolute Z reference point.
X defines the pocket corner X (Absolute position relative to the X datum position).
Y defines the pocket corner Y (Absolute position relative to the Y datum position).
Z defines the absolute Z base of pocket (depth).
For G173 block,
I defines the pocket side finishing allowance.
K defines the pocket base finishing allowance.
P defines the cut width percentage (% of tool dia.).
T defines the pocket tool.
S defines the spindle speed for roughing.
R defines the roughing feed for Z .
F defines the roughing feed X and Y .
B defines the finishing spindle speed.
J defines the finishing feed.
Z defines the safety Z position above 'R' point.
Program for Rectangular Pocketing
O 0005 ;
N10 G91 G21 G28 X0 Y0 Z0 ;
N20 M06 T01 ;
N30 G90 G00 X0 Y0 Z10 S3000 M03 ;
N40 G01 Z0 F300 ;
N50 G172 I-50 J-50 K0 P0 Q3 R0 X-25 Y-25 Z-6 ;
N60 G173 I0 K0 P75 T1 S300 R75 F250 B3500 J200 Z5 ;
N70 G00 Z25 M05 ;
N80 G91 G28 X0 Y0 Z0 ;
N90 M30 ;
Sub-program call and Mirroring

M70 - X Mirror On M70 sets X axis mirroring about the current X axis position.
M71 - Y Mirror On M71 sets Y axis mirroring about the current Y axis position.
M80 - X Mirror Off M80 disables X axis mirroring
M81 - Y Mirror Off M81 disables Y axis mirroring
M98 - Subprogram Call
M98 causes another program to be executed. The "P" value specifies the program number and
the number of times to execute it. The right most 4 digits are the program number. The digits to the left are
the number of repetitions. There can be up to 999 repetitions, if the value is omitted it is called once.
Examples: M98 P12
and M98 P10012 both execute CNC program 12 once.
M99 - Subprogram Exit
Returns control to the program that called the current program.
If a "P" value is specified then execution begins form the block with the same "N" number, otherwise it is
form the block after the subprogram call.
If an M99 is specified in the main program then the execution is from the start of the program. This is
called looping (or) nesting of one or more programs
Example: M99 - Returns to the block following the call.
M99 P10 - Returns to the block with "N" value 10.
Program by Mirroring Option
[BILLET X100 Y100 X10
N010 G21 G94
N020 G91 G28 Z0
N030 G28 X0 Y0
N040 M06 T2
N050 M03 S1800
N060 G90 G00 X0 Y0
N070 G00 Z5
N080 M98 P10008
N090 M70
N100 M98 P10008
N110 M80
N120 M70
N130 M71
N140 M98 P10008
N150 M80
N160 M81 O 0008 Subprogram
N170 M71 N010 G90 G00 X10 Y10
N180 M98 P10008 N020 G01 Z -1 F50
N190 M81 N030 X40
N200 G00 Z5 N040 X10 Y40
N210 M05 N050 Y10
N220 G91 G28 Z0 N060 G00 Z6
N230 G28 X0 Y0 N070 G00 X0 Y0
N240 M30 N080 M99
EXERCISE ON CONTOUR MILLING

33

33
EXERCISE ON CONTOUR MILLING AND CIRCULAR POCKETING
EXERCISE ON CONTOUR MILLING AND RECTANGULAR POCKETING
EXERCISE ON MIRRORING

Вам также может понравиться