You are on page 1of 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 + X + -Y -Z -X +X

Y -

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
30
P6 P5 P4

20
P3 P2

10
P1 (0,0)

ABSOLUTE DIMENSIONING
POINTS

INCREMENIAL DIMENSIONING
POINTS

X 10 10 20 20 30 30

Z 0 -10 -10 -25 -25 -35

U 10 0 10 0 10 0

W 0 -10 0 -15 0 -10

P1 P2 P3 P4 P5 P6

P1 P2 P3 P4 P5 P6

10

15

10

100 70 P9 P8

P7 70 40 P3 20 P1 20 Reference Point POINTS P1 P2 P3 P4 P5 P6 P7 P8 P9 X VALUE 0 20 20 70 70 100 100 70 0 Y VALUE 0 0 20 20 0 0 40 70 70 P2 P5 70 100 POINTS P1 P2 P3 P4 P5 P6 P7 P8 P9 XVALUE 0 20 0 50 0 30 0 -30 -70 Y VALUE 0 0 20 0 -20 0 40 30 0 P6 P4

ABSOLUTE SYSTEM (G90)

INCREMENTAL SYSTEM (G91)

PREPARATORY FUNCTION (G - FUNCTION)


G codes are instructions describing tool movement
Common G-codes in turning G00 G01 G02 G03 G20 G21 G28 G70 G71 G74 G76 G90 G98 G99 Rapid Traverse Linear Interpolation (cutting feed) Circular Interpolation (clockwise) Circular Interpolation (counter clockwise) Imperial (input in inches) Metric (input in metric) Goto Reference Point (Home Position) Finishing Cycle Multiple Turning Cycle Peck Drilling Cycle Multiple Threading Cycle Box Turning Cycle Feed Per Minute 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 M01 M02 M03 M04 M05 M06 M08 M09 M10 M11 M30 M38 M39 M98 M99 Program Stop Optional Stop Program End Spindle Forward Spindle Reverse Spindle Stop Automatic Tool change Coolant On Coolant Off Vice / Chuck Open Vice / Chuck Close Program Stop & Rewind Door Open Door Close Sub program Call 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 2

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 Step1 Click AUTO

Click RESET

Step3 Click CYCLE START

Left-hand Tool

Grooving Tool

Finished Program

CNC Programming
Information needed by a CNC
1. 2. 3. 4. 5. 6. 7. Preparatory Information: units, incremental or absolute positioning Coordinates: X,Y,Z, RX,RY,RZ Machining Parameters: Feed rate and spindle speed Coolant Control: On/Off, Flood, Mist Tool Control: Tool and tool parameters Cycle Functions: Type of action required 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/G20 G98/G99 G40 G28 U0 W0 M06 T0101 M03 S1500 G00 X(VALUE) Z(VALUE)

G21 This code specifies that program is done in metric units G20 - This code specifies that program is done in Imperial units G98 Feed in mm/min G99 - Feed in mm/rev G40 Cutter radius compensation cancel G28 U0 W0- Makes the tool to go to home position. 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 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 M30


M30 Program stop and rewind M05 Stop the spindle rotation

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
( Using G00 and G01 )

30

27

15.0

50
ALL DIMENSION IN 'mm' BILLET SIZE :30 X 75 G CODES USED - G00,G01

O1000 N1 G21 G98 N2 G28 U0 W0 N3 M06 T0101 N4 M03 S2000 N5 G00 X30 Z1 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 N13 G00 X30 Z1 N14 G00 X 27 Z1 N15 G01 X27 Z-50 N16 G01 X30 Z-50 N17 G00 X30 Z1 N18 G28 U0 W0 N19 M05 N20 M30

SIMPLE FACING
( Using G00 and G01 )
40

10

20

ALL DIMENSION IN 'mm' BILLET SIZE :40 X 75 G CODES USED - G00,G01

O1002 G21 G98 G28 U0 W0 M06 T0101 M03 S2000 G00 X41 Z1 G00 X41 Z-1 G01 X10 Z-1 F30 G01 X10 Z1 G00 X41 Z1 G00 X41 Z-2 G01 X10 F30 G01 Z1 G00 X41 Z-3 G01 X10 F30 G01 Z1 G00 X41 Z-4 G01 X10 F30 G01 Z1 G00 X41 Z-5 G0I X10 F30 G01 Z1 G28 U0 W0 M05 M30

BOX TURNING CYCLE ( G90 )


SYNTAX G90 X (VALUE) Z(Value) F(Value) Tool movement R F F R

PROGRAM USING BOX TURNING CYCLE


O1003 TOOL PATH G21 G98 G28 U0 W0 M06 T0404 RAPID TRAVERSE M03 S1500 G00 X22 Z1 G90 X21 Z-30 F60 (Box turning cycle) PLAIN TURNING CYCLE X20 X19 X18 X17 X16 FEED RATE X15 X14 X13 X12 X11 X10 G28 U0 W0 M05 M30
R A PID TR A V ER SE FEED R A TE

30

70

10

22

PROGRAM FOR TAPER TURNING USING G90 CODE


SYNTAX G90 X (VALUE) Z(Value) R (Value) F(Value)
TAPER TURNING CYCLE RRapid

TAPER TURNING CYCLE R+


Rapid

Rapid

Rapid

CALCULATING R VALUE R = (Minor dia - Major dia) / 2

CALCULATING R VALUE R = (Major dia - Minor dia) / 2

SAMPLE PROGRAM TAPER TURNING


Dwg.No:06 G90 - TAPER TURNING R - ve
O1005 G21 G98 G28 U0 W0 M06 T0404 M03 S1200 G00 X32 Z1 G01 Z0 F60 (Box turning cycle) G90 X32 Z-15 R-0.5 F60 X32 R-1 X32 R-1.5 X32 R-2 X32 R-2.5 X32 R-3 X32 R-3.5 G28 U0 W0 M05 M30

G90 TAPER TURNING R-

15

70

R = (Minor dia - Major dia) / 2 = (25 - 32) /2 = -3.5

25

32

SAMPLE PROGRAM TAPER TURNING


G90 TAPER TURNING R+
O1006 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
22 R5 15

O1006
G21 G98 G28 U0 W0 M06 T0404 M03 S1200

10

R5

G00 X22 Z1 (Multiple turning cycle G71 U0.5 R1 G71 P10 Q20 U0.1 W0.1 F50 N10 G01 X0 Z0

15 70

15

10

G03 X10 Z-5 R5 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 G74

R X0 Z

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 G75

R X

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

15

G28 U0 W0
70

M05 M30

THREADING CYCLE ( G76 )


SYNTAX

G76 G76
Block 1

P X

Q Z

R P

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

DIA25 M12 X 1.75

15

O1008 G21 G98 G28 U0 W0 M06 T2 M03 S400 G00 X12 Z1 G76 P031560 Q50 R0.1 G76 X9.853 Z-15 P1073 Q100 F1.75 G28 U0 W0 M05 M30

PROGRAM FOR DRILLING AND BORING


N010 G21 G40 G98 N020 G28 U0 W0 (Center drill N030 M06 T0101 N050 M03 S1500 N060 G00 X0 Z3 N070 G74 R1 N080 G74 X0 Z-5 Q500 F30 (6mm drill N090 M06 T0303 N100 M03 S1500 N110 G00 X0 Z3 N120 G74 R1 N130 G74 X0 Z-20 Q500 F30 N140 G28 U0 W0 (12mm drill N150 N030 M06 T0505 N160 M03 S1000 N170 G00 X0 Z3 N180 G74 R1 N190 G74 X0 Z-20 Q500 F30 N200 G28 U0 W0 (10mm boring bar N210 M06 T0707 N220 M03 S1200 N230 G00 X12 Z2 N240 G71 U0.5 R1 N250 G71 P260 Q280 U0.2 W0.2 F50 N260 G01 X24 Z0 N270 G01 X12 Z-13 N280 G01 X11 N290 G70 P260 Q280 F50 N300 G28 U0 W0 N310 M05 N320 M30

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

1X45

15

M12 X 1.75

EXERCISE ON MULTIPLE TURNING CYCLE


WRITE A CNC PROGRAM FOR MACHINING THE GIVEN COMPONENT

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-22.5 Y-37.5 N070 G00 Z5 N080 G01 Z-1 F50 N090 G03 X-37.5 Y-22.5 R15 N100 G01 Y22.5 N110 G03 X-22.5 Y37.5 R15 N120 G01 X22.5 N130 G02 X37.5 Y22.5 R15 N140 G01 Y-22.5 N150 G03 X22.5 Y-37.5 R15 N160 G01 X-22.5

N170 G00 Z5 N180 G00 X-15 Y0 N190 G01 Z-1 F50 N200 G03 X15 Y0 R15 N210 G03 X-15 Y0 R15 N220 G00 Z5 N230 M05 N240 G91 G28 Z0 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__ Q__ K__ F__ : Reference point in Z direction. : defined as the Cut-in distance value or peck value. (Incremental only) : defined as the number of repeats, for a series of holes. When not specified K=1. : Feed rate

Circular Pocketing
G17 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. Syntax : X defines the pocket centre in X axis. 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: N10 G172 I-50 K0 P0 Q3 R0 X-25 Y-25 Z-6 N20 G173 I0 K0 P75 T1 S300 R75 F250 B3500 J200 Z5

For G172 block, I defines the pocket X length. 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 G00 X0 Y0 Z10 S3000 M03 ; N40 G01 Z0 F300 ; N50 G172 I-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 M71 - Y Mirror On M80 - X Mirror Off M81 - Y Mirror Off M70 sets X axis mirroring about the current X axis position. M71 sets Y axis mirroring about the current Y axis position. M80 disables X axis mirroring 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 N170 M71 N180 M98 P10008 N190 M81 N200 G00 Z5 N210 M05 N220 G91 G28 Z0 N230 G28 X0 Y0 N240 M30

O 0008 Subprogram N010 G90 G00 X10 Y10 N020 G01 Z -1 F50 N030 X40 N040 X10 Y40 N050 Y10 N060 G00 Z6 N070 G00 X0 Y0 N080 M99

EXERCISE ON CONTOUR MILLING

EXERCISE ON CONTOUR MILLING AND CIRCULAR POCKETING

EXERCISE ON CONTOUR MILLING AND RECTANGULAR POCKETING

EXERCISE ON MIRRORING

You might also like