Download ppt - Cnc milling

Transcript
Page 1: Cnc milling

Special G codes of CNC Special G codes of CNC ProgrammingProgramming

Prepared by

M.Ganesh Murugan

Page 2: Cnc milling

Mirror Image On / Off: G15.1 / Mirror Image On / Off: G15.1 / G50.1G50.1

Function and Purpose:-

Mirror image mode can be turned on and off for each axis using G-codes. Higher priority is given to the mirror image setting with the G-codes over setting by any other methods.

 Programming Format

G51.1 X__ Y__ Z__          Mirror image ON

G50.1 X__ Y__ Z__           Mirror image OFF

Detailed:-

Use the address and coordinates in a G51.1 block to specify the mirroring axis and mirroring center (using absolute or incremental data), respectively

If the coordinate word is designated in G50.1, then this denotes the axis for which the mirror image is to be cancelled .Coordinate data, even if specified, is ignored in that case

After mirror image processing has been performed for only one of the axes forming a plane, the rotational direction and the offset direction become reverse during arc interpolation, tool diameter offsetting, or coordinate rotation

Since the mirror image processing function is valid only for local coordinate systems, the center of mirror image processing moves according to the particular counter preset data or workpiece coordinate offsetting data

Page 3: Cnc milling

Sample ProgramsSample ProgramsG00 G90 G40 G49 G80M98 P100G51.1 X0.0M98 P100G51.1 Y0.0M98 P100G50.1 X0.0M98 P100G50.1 Y0.0M30.

(SUB PROGRAM O100)O0100G91 G28 X0.0 Y0.0 G90 G00 X20.0 Y20.0G42 G01 X40. D.01F120Y40.X20.Y20.G40 X0.0 Y0.0M99

Page 4: Cnc milling

G68 and G69 - Coordinate G68 and G69 - Coordinate System RotationSystem Rotation A rotation transformation can be applied to the controlled

point coordinates commanded by a part program or by the MDI line. To do this program

G68 X__Y__R__ The X and Y words specify the center about which the

rotation is to be applied in the current coordinate system. R is the angle of rotation in degrees with positive values being counter-clockwise.

If X or Y are omitted then zero is assumed. A and B can be used as synonyms for X and Y respectively.

To cancel rotation program G69. If a G68 is used while rotation is in operation a G69 is implied

before it. In other words successive G68s are not cumulative and the X and Y points are always in an un-rotated system.

When a rotation is in use the X and Y axis DROs will be red to remind the operator that these values are program coordinate values which will be rotated

Page 5: Cnc milling

An ExampleAn ExampleG68 X0 Y0 R30M98 P0001G68 X0 Y0 R60M98 P0001G68 X0 Y0 R120M98 P0001G68 X0 Y0 R180M98 P0001

And O0001G83 G99 R2 Z-10 Q1 F100X 20 Y-20<etc >M99

Note:

• G68 may only be used in the XY plane (G17 mode)

• The effects of changing work offsets when a rotation transformation is in

effect will be non-intuitive so it is wiser not to program this. Indeed care

should be taken proving any program including transformations.

• There is very little standardization of the functions of this code across

different CNC controls so careful checks should be made on code written for

other machines.

• Jogging always takes place in the direction of the machine axes. The tool

path display frame is oriented to the physical axes and will show the part at

the angle at which it will be cut

No relationship between program and diagram It is just a model

Page 6: Cnc milling
Page 7: Cnc milling

G15 and G16 - Exit and Enter G15 and G16 - Exit and Enter Polar ModePolar Mode It is possible for G0 and G1 moves in the X/Y plane only to

specify coordinates as a radius and angle relative to a temporary center point; program G16 to enter this mode. The current coordinates of the controlled point are the temporary center

FormatG15 to revert to normal Cartesian coordinatesG0 X2.0 Y2.0 ( normal G0 move to 2.0,2.0 )G16 - start of polar mode.G01 X1.0 Y45( this will move to X = 2.7071, Y = 2.7071 which is a spot on a circle) (of radius 1.0 at 45 degrees from the initial coordinates of 2.0,2.0 )

Page 8: Cnc milling

Example - Drilling a circle of Example - Drilling a circle of holesholes The code below moves to a circle of holes every 90 degrees on a

circle of radius 2.5", center X = 0.5, Y = 0.6 and high- speed peck drills to Z = -0.6G00 Z0.0;G01 X0.5 Y0.6; (go to the center point)G16; (enable Polar coordinates)G81 X2.5 Y0.0 R0.0 Z-.6 F3;(in G16 mode the X becomes the offset from center and the Y becomes the degrees of rotation from the center)X2.5 Y90;X2.5 Y180;X2.6 Y270;G15; (cancels the g16)G80; (cancels the canned cycle)G01 Z0.0;G00 X0.0 Y0.0;M30;Note:

(1) You must not make X or Y moves other than by using G0 or G1 when G16 is active;(2) This G16 is different to a Fanuc implementation in that it uses the current point as the polar center. The Fanuc version requires a lot of origin shifting to get the desired result for any circle not centered on 0, 0

No relationship between program and diagram It is just a model

Page 9: Cnc milling

CIRCULAR POCKET MILLING EXERCISE

• G12 CIRCULAR POCKET MILLING CW (or)• G13 CIRCULAR POCKET MILLING CCWX Position to center of pocketY Position to center of pocketZ Depth of cut or increment downI Radius of First Circle (or thefinish radius If K is not used)

K Radius of Finished Circle(if specified)

Q Radius step over Increment(must be used with K)D Cutter Comp. number(Enter cutter size into offset display register number)

L Loop count for repeatingdeeper cuts

F Feedrate in inch (mm) per min

Page 10: Cnc milling

EXAMPLE: G13 ONE PASS "I" ONLYO01041N1 (D01 DIA. OFFSET IS .500)N2 T1 M06 (1/2 DIA. 2 FLT END MILL)N3 G90 G54 G00 X2.5 Y2.5 (position

to X Y center of circular pocket)N4 M03 S2600N5 G43 H01 Z0.1 M08N6 G13 Z-0.5 I0.5 D01 F15. (1.0 Dia.

x .5 deep circular pocket 1 pass)N7 G00 Z1. M09N8 G28 G91 Y0 Z0N9 M30

Page 11: Cnc milling

EXAMPLE: G13 MULTIPLE PASSES I, K & Q

O01042N1 (D01 DIA. OFFSET IS .500)N2 T1 M06 (1/2 dia. 2 FLT end mill)N3 G90 G54 G00 X2.5 Y2.5 (X

Y center location of circular pocket)

N4 S2600 M03N5 G43 H01 Z0.1 M08N6 G13 Z-0.5 I0.3 K1.5 Q0.3 D01 F15

(3.0 Dia. x .5 dp circular pocket)N7 G00 Z1. M09N8 G28 G91 Y0 Z0N9 M30

Page 12: Cnc milling

G18 ZX CIRCULAR PLANE SELECTION

• The G18 code is used to select the ZX plane for circular motion. In the XZ plane• (G18), circular motion is defined as clockwise for the operator looking from

the rear of the machine out toward the control panel

Page 13: Cnc milling

Pattern defined by AnglePattern defined by Angle02704 (ANGULAR ROW)N1 G20;N2 G17 G40 G80;N3 G90 G54 G00 X2.0 Y2.0 S900 M03;N4 G43 Z1.0 H01 M08;N5 G99 G81 R0.1 Z-0.163 F3.0;N6 G91 X3.8637 Y1.0353 L6;N7 G80 M09;N8 G28 Z0 M05;N9 G28 X0 Y0;N10 M30;

No relationship between program and diagram It is just a model

Page 14: Cnc milling

ThanksThanks

M.Ganesh Murugan