nc programming vik

36
Programming 1 Programming For the Fanuc 0T controller Axes convention Z Axis X Axis Absolute and Incremental co-ordinates In the absolute programming, the end point of a motion is programmed with reference to the program zero point. In incremental programming, the end point is specified with reference to the current tool position. X 0,0 20 30 50 50 N2 N1 Z Absolute traverse to N1, then to N2 X20.0 Z50.0 X50.0 Z30.0 Absolute traverse to N1, incremental to N2 X20.0 Z50.0 U30.0 W-20.0 Cadem Manufacturing Technology Center CNC Turning

Upload: patelvicky87

Post on 18-Nov-2014

833 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NC Programming Vik

Programming 1

Programming For the Fanuc 0T controller

Axes convention

Z Axis

X Axis

Absolute and Incremental co-ordinates In the absolute programming, the end point of a motion is programmed with reference to the program zero point. In incremental programming, the end point is specified with reference to the current tool position.

X

0,0

20

30 50

50 N2

N1

Z Absolute traverse to N1, then to N2 X20.0 Z50.0 X50.0 Z30.0 Absolute traverse to N1, incremental to N2 X20.0 Z50.0 U30.0 W-20.0

Cadem Manufacturing Technology Center CNC Turning

Page 2: NC Programming Vik

Programming 1

Programming For the Fanuc 0M controller

Axes convention The tool can be moved to any position in a 3 dimensional cartesian co-ordinate system. The Z axis is along the spindle axis. The X and Y axes are perpendicular to Z. VMC (Vertical Machining Center)

Z

Y

-

+

-+

X- +

+Z

-Z

+Y

-Y

-X +X

Cadem Manufacturing Technology Center CNC Milling

Page 3: NC Programming Vik

Programming 2

HMC (Horizontal Machining Center)

Y

Z

X

-+

-

+

-+

Part

Machine table

X

YZ

Cadem Manufacturing Technology Center CNC Milling

Page 4: NC Programming Vik

Programming 3

List of G-codes G-code Function G00 Positioning rapid traverse G01 Linear interpolation (feed) G02 Circular interpolation CW G03 Circular interpolation CCW G04 Dwell G20 Inch unit G21 Metric unit G28 Automatic zero return G30 2nd reference point return G40 Tool nose radius compensation cancel G41 Tool nose radius compensation left G42 Tool nose radius compensation right G43 Tool length compensation G52 Local co-ordinate system G54 Work co-ordinate system 1 selection G55 Work co-ordinate system 2 selection G56 Work co-ordinate system 3 selection G57 Work co-ordinate system 4 selection G58 Work co-ordinate system 5 selection G59 Work co-ordinate system 6 selection G74 Left hand tapping cycle G76 Fine boring cycle G80 Canned cycle cancel G81 Drilling cycle G82 Drilling cycle with dwell G83 Peck drilling cycle / deep drill G84 Tapping cycle G85 Boring / Reaming cycle G86 Boring cycle G87 Back boring cycle G90 Absolute command G91 Incremental command G94 Feed per minute G95 Feed per revolution G98 Return to initial point in canned cycle G99 Return to R point in canned cycle

Cadem Manufacturing Technology Center CNC Milling

Page 5: NC Programming Vik

Programming 4

List of M codes M codes vary from machine to machine depending on the functions available on it. They are decided by the manufacturer of the machine. The M codes listed below are the common ones. M-codes Function M00 Optional program stop automatic M01 Optional program stop request M02 Program end M03 Spindle ON clock wise (CW) M04 Spindle ON counter clock wise (CCW) M05 Spindle stop M06 Tool change M07 Mist coolant ON (coolant 1 ON) M08 Flood coolant ON (coolant 2 ON) M09 Coolant OFF M19 Spindle orientation M30 End of program, Reset to start M98 Sub program call M99 Sub program end There are other M-codes for functions like gear change, pallet change, pallet clamp / unclamp, door open / close etc.

Absolute and Incremental co-ordinates In the absolute programming , the end point of a motion is programmed with reference to the program zero point. In incremental programming, the end point is specified with reference to the current tool position.

X

Y

50

5030

20 N1

N2

0,0 Absolute traverse to N1, then to N2 G90 X20.0 Z50.0 X50.0 Z30.0 Absolute traverse to N1, incremental to N2 G90 X20.0 Z50.0 G91 X-20. Y30

Cadem Manufacturing Technology Center CNC Milling

Page 6: NC Programming Vik

Programming 5

G00 Rapid traverse When the tool being positioned at a point preparatory to a cutting motion, to save time it is moved along a straight line at Rapid traverse, at a fixed traverse rate which is pre-programmed into the machine's control system. Typical rapid traverse rates are 10 to 25 m /min., but can be as high as 80 m/min. Format N_ G00 X__ Y__Z__

G01 Linear interpolation (feed traverse) The tool moves along a straight line in one or two axis simultaneously at a programmed linear speed, the feed rate. Format N__ G01 X__ Y__Z__ F__

Part

Feed

Part

Feed

Cadem Manufacturing Technology Center CNC Milling

Page 7: NC Programming Vik

Programming 6

G02/03 Circular interpolation

Format N__ G02/03 X__ Y__Z__ I__ J__K__ F__ using the arc center OR N__ G02/03 X__ Y__Z__ R__ F__ using the arc radius G02 moves along a CW arc G03 moves along a CCW arc Arc center The arc center is specified by addresses I, J and K. I, J and K are the X, Y and Z co-ordinates of the arc center with reference to the arc start point.

X

Y

Arc center

Arc endArc start

- J

- I

I = X coord. of center - X coord. of start point J = Y coord. of center - Y coord. of start point K = Z coord. of center - Z coord. of start point I, J and K must be written with their signs. Arc radius

Cadem Manufacturing Technology Center CNC Milling

Page 8: NC Programming Vik

Programming 7

The radius is specified with address R.

X

Y

Arc center

Arc endArc startArc radius

Block format N__ G02 X__Y__ Z__ R__ F__ N__ G03 X__Y__ Z__ R__ F__

Cutter radius compensation (CRC) G40 Tool nose radius compensation Cancel G41 Tool nose radius compensation Left G42 Tool nose radius compensation Right

G41 G41

G42 G42

Block format

Cadem Manufacturing Technology Center CNC Milling

Page 9: NC Programming Vik

Programming 8

N__ G01 G41/42 X__ Y__ D__ F__ Feed rate mm/min

CRC offset number

CRC start co-ordinates absolute

CRC command code

Linear interpolation command code

Necessity of using CRC • Difficult to calculate cutter center co-ordinates • If cutter center co-ordinates are used Same diameter of cutter is required to be used Cutter wear can not compensated

Program Zero

Tool length compensation (G43) Different tools of different lengths are used in machining any part. The lengths of the tools are not considered in the part program. They are entered in the machine’s memory, and are considered automatically for each motion in the program depending on the tool that is being used. The tool lengths in the Z direction are called the Tool length offsets.

Cadem Manufacturing Technology Center CNC Milling

Page 10: NC Programming Vik

Programming 9

Gauge line

Length offset Length offset

Length offset

Length offset

Face milling cutter

Back boring tool

T-slot milling cutter

Boring tool

Part

Setting work co-ordinate system (G54 - G59) G54 Work co-ordinate system 1 selection G55 Work co-ordinate system 2 selection G56 Work co-ordinate system 3 selection G57 Work co-ordinate system 4 selection G58 Work co-ordinate system 5 selection G59 Work co-ordinate system 6 selection

Cadem Manufacturing Technology Center CNC Milling

Page 11: NC Programming Vik

Programming 10

Machine table

Work co-ordinatesystem 1 selection

Work co-ordinate system 4selection

Work co-ordinate system 3selection

Work co-ordinate system 6selection

Work co-ordinate system 5selection

Work co-ordinatesystem 2 selection

Canned cycles Canned or fixed cycles are programming aids that simplify programming. Canned cycles combine many programming operations and are designed to shorten the program length, minimize mathematical calculations, and use minimal tool motions. Examples : drilling, peck drilling, tapping, boring, back spot facing. G81 Drilling cycle G82 Drilling cycle with dwell (Counter bore cycle) G83 Peck drilling cycle / deep drill G84 Right hand tapping cycle G85 Boring / Reaming cycle G86 Boring cycle G87 Back boring cycle G74 Left hand tapping cycle G76 Fine boring cycle

Cadem Manufacturing Technology Center CNC Milling

Page 12: NC Programming Vik

Programming 11

Drilling cycle (G81)

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

FeedRapid

R point / Safe height

With G99 return to R point

Infeed feed rate mm/min

Return position codeDrilling cycle code

Safe height / R pointFinal depth

Block number

Format

N__ G98/99 G81 R__ Z__ F__

Cadem Manufacturing Technology Center CNC Milling

Page 13: NC Programming Vik

Programming 12

Counter bore cycle (G82)

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

Dwell at bottom

P

FeedRapid

R point / Safe height

With G99 return to R point

Dwell at bottom

P

Infeed feed rate mm/min

Return position codeCounter bore drilling cycle codeSafe height / R pointFinal depth

Block number

Format

N__ G98/99 G82 R__ Z__ P__ F__

Dwell at bottom

Cadem Manufacturing Technology Center CNC Milling

Page 14: NC Programming Vik

Programming 13

Peck drill cycle (G83)

FeedRapid

With G98 return to initial point

Initialpoint

Safe height / R point

Final depth

Peck depth

FeedRapid

With G99 return to R point

Initialpoint

Safe height / R point

Final depth

Peck depth

Infeed feed rate mm/min

Return position codePeck drilling cycle codeSafe height / R pointFinal depth

Block number

Format

N__ G98/99 G83 R__ Z__ Q__ F__

Peck depth

Cadem Manufacturing Technology Center CNC Milling

Page 15: NC Programming Vik

Programming 14

Tapping cycle (G84) Right hand tapping

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

Spindle CW

Spindle CCW

Final depth

Retract feed rateequals infeed feedrate

FeedRapid

R point / Safe height

With G99 return to R point

Initialpoint

Spindle CW

Spindle CCW

Final depth

Retract feed rateequals infeed feedrate

Feedrate = Spindle RPM x Pitch

Infeed / retract feed rate mm/min

Return position codeRight hand tapping cycle code

Safe height / R pointFinal depth

Block number

Format

N__ G98/99 G84 R__ Z__ F__

Spindle direction in RH tapping CW during infeed CCW during outfeed

Cadem Manufacturing Technology Center CNC Milling

Page 16: NC Programming Vik

Programming 15

Reaming cycle (G85)

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

Final depth

FeedRapid

R point / Safe height

With G98 return to R point

Initialpoint

Final depth

Infeed / retract feed rate mm/min

Return position codeReaming cycle code

Safe height / R pointFinal depth

Block number

Format

N__ G98/99 G85 R__ Z__ F__

Cadem Manufacturing Technology Center CNC Milling

Page 17: NC Programming Vik

Programming 16

Boring cycle (G86)

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

Final depth

Spindle stop

Spindle CW

FeedRapid

R point / Safe height

With G99 return to R point

Final depth

Spindle stop

Spindle CW

Infeed feed rate mm/min

Return position codeBoring cycle code

Safe height / R pointFinal depth

Block number

Format

N__ G98/99 G86 R__ Z__ F__

Cadem Manufacturing Technology Center CNC Milling

Page 18: NC Programming Vik

Programming 17

Back boring cycle (G87)

Safe height / R point

Final depth

Initial point Spindle orientation

Lateral shift

Bore axis

Spindle CW

Infeed feed rate mm/min

Return position codeBack boring cycle codeSafe height / R pointFinal depth

Block number

Format

N__ G98 G87 R__ Z__ Q__ F__

Lateral shift

Cadem Manufacturing Technology Center CNC Milling

Page 19: NC Programming Vik

Programming 18

Left hand tapping

FeedRapid

R point / Safe height

With G98 return initial point

Initialpoint

Spindle CCW

Spindle CW

Final depth

Retract feed rateequals infeed feedrate

FeedRapid

R point / Safe height

With G99 return R point

Initialpoint

Spindle CCW

Spindle CW

Final depth

Retract feed rateequals infeed feedrate

Feedrate = Spindle RPM x Pitch

Infeed / retract feed rate mm/min

Return position codeLeft hand tapping cycle code

Safe height / R pointFinal depth

Block number

Format

N__ G98/99 G74 R__ Z__ F__

Spindle direction in LH tapping CCW during infeed CW during outfeed

Fine boring cycle (G76)

Cadem Manufacturing Technology Center CNC Milling

Tapping cycle (G74)

Page 20: NC Programming Vik

Programming 19

FeedRapid

R point / Safe height

With G98 return to initial point

Initialpoint

Final depth

Spindle Orientation

Spindle CW

Lateral shift

Lateral shift

Dwell atbottom

FeedRapid

R point / Safe height

With G99 return to R point

Initialpoint

Final depth

Spindle Orientation

Spindle CW

Lateral shift

Lateral shift

Dwell atbottom

Infeed feed rate mm/min

Return position codeFine boring cycle codeSafe height / R pointFinal depth

Block number

Format

N__ G98 G76 R__ Z__ Q__ F__

Lateral shift

Cadem Manufacturing Technology Center CNC Milling

Fine boring cycle (G76)

Page 21: NC Programming Vik

Programming 20

Verifying NC programs Safety priorities Safety priorities must be followed when verifying programs. Operator safety - priority 1 Safety of the person operating the machine Machine tool safety - priority 2 Prevention of damage to the machine Workpiece safety - priority 3 Prevention of part rejection

Typical errors Syntax errors Errors which prevent the machine controller from executing a command. E.g., writing G101 instead of G01 Motion errors Machine does not generate an error, so these are difficult to diagnose. E.g., Writing X instead of Z; wrong co-ordinates; reversing CW and CCW commands; improper incremental/absolute mode selection. Omission errors Omitting decimal points, forgetting to program feed rates, forgetting to turn on the coolant Setup errors Wrongly measured work offset and tool offsets, or correct measurement and wrong entry

Program verification procedures A new program is checked by executing it in some or all of the verification modes. Dry run with Machine lock Used for checking syntax errors. Motion errors are not checked. • Set Machine lock ON and Dry run ON. • Set feed rate override switch to maximum to execute the cycle fast. • The spindle rotates, the turret indexes and the display changes as per program, but axes do not move. • Tool and work offsets need not be set.

Cadem Manufacturing Technology Center CNC Milling

Page 22: NC Programming Vik

Programming 21

Dry run with air cutting Used for checking motion errors and correctness of spindle direction. Since execution is at dry run feed, difference between rapid and feed motions is not known. Collisions cannot be checked. • Set the tool offsets. Set the work offset so that all motions occur away from work holding devices like

the chuck.. Do not load a part. • Set Machine lock OFF and Dry run ON. All machine functions and motions are active. • Set feed rate override switch to minimum for safety. Normal cycle with air cutting Used for checking collisions. • Set the tool offsets. Set the work offset so that all motions occur away from work holding devices like

the chuck.. Do not load a part. • Set all functions for normal machine execution. • For safety, when in doubt set the feed rate override switch to minimum. • Carefully watch for motions which result in tool colliding with the part or work holding device. Single block execution Used for checking motion errors and part dimensional accuracy. • Set the work offset normally, and load a part. • Set the tool offsets to leave excess stock on the part. • Set all functions for normal machine execution. • For safety, when in doubt set the feed rate override switch to minimum. • Check the Distance to go value to detect potential motion errors. • Check all dimensions. For critical dimensions alter the tool offsets and rerun the tool again to check

whether the dimension is within tolerance. Repeat till tolerance is achieved.

Cadem Manufacturing Technology Center CNC Milling

Page 23: NC Programming Vik

Programming 2

Radius and diameter programming X co-ordinates can be Radius or Diameter values.

Dia 50

Dia 100

50

100

A

B

Tool traverse from A to Bin Radius mode

N2 X25.N3 Z-50.N4 X50.N5 Z-100.

Tool traverse from A to Bin Diameter mode

N2 X50.N3 Z-50.N4 X100.N5 Z-100.

Cadem Manufacturing Technology Center CNC Turning

Page 24: NC Programming Vik

Programming 3

List of G-codes

G-code Function G00 Positioning rapid traverse G01 Linear interpolation (feed) G02 Circular interpolation CW G03 Circular interpolation CCW G04 Dwell G20 Inch unit G21 Metric unit G28 Automatic zero return G30 2nd reference point return G32 / G33 Thread cutting (single motion) G40 Tool nose radius compensation cancel G41 Tool nose radius compensation left G42 Tool nose radius compensation right G50 / G92 Local co-ordinate system setting, max. spindle speed setting G70 Finishing cycle G71 Stock removal in turning G72 Stock removal in facing G73 Pattern repeating G74 Peck drilling on Z axis / Face grooving G75 Peck drilling on X axis / Int-Ext grooving G76 Multiple threading cycle G94 / G98 Feed per minute G95 / G99 Feed per revolution G96 Constant surface speed control G97 Constant surface speed control cancel

List of M codes M codes vary from machine to machine depending on the functions available on it and the manufacturer of the machine decides them. The M codes listed below are the common ones.

M-codes Function M00 Optional program stop automatic M01 Optional program stop request M02 Program end M03 Spindle ON clock wise (CW) M04 Spindle ON counter clock wise (CCW) M05 Spindle stop M06 Tool change M07 Mist coolant ON (coolant 1 ON) M08 Flood coolant ON (coolant 2 ON) M09 Coolant OFF M30 End of program, Reset to start M98 Sub program call M99 Sub program end

There are other M-codes for functions like gear change, tail stock quill in/out, chuck clamp/unclamp, chip conveyor forward/backward, door open / close etc.

Cadem Manufacturing Technology Center CNC Turning

Page 25: NC Programming Vik

Programming 4

G00 Rapid traverse When the tool being positioned at a point preparatory to a cutting motion, to save time it is moved along a straight line at Rapid traverse, at a fixed traverse rate which is pre-programmed into the machine's control system. Typical rapid traverse rates are 10 to 25 m /min., but can be as high as 80 m/min. Format N_ G00 X_ Z_

Rapid traverse

G01 Linear interpolation (feed traverse) The tool moves along a straight line in one or two axis simultaneously at a programmed linear speed, the feed rate. Format N__ G01 X__ Z__ F__

Feed motion

Cadem Manufacturing Technology Center CNC Turning

Page 26: NC Programming Vik

Programming 5

G02/03 Circular interpolation

CW arc CCW arc Format N__ G02/03 X__ Z__ I__ K__ F__ using the arc center OR N__ G02/03 X__ Z__ R__ F__ using the arc radius G02 moves along a CW arc G03 moves along a CCW arc Arc center The arc center is specified by addresses I and K. I and K are the X and Z co-ordinates of the arc center with reference to the arc start point.

Z

X

Arc center

Arc endArc start

- I

- K

I =(X coord. of center - X coord. of start point)/2 K = Z coord. of center - Z coord. of start point I and K must be written with their signs.

Cadem Manufacturing Technology Center CNC Turning

Page 27: NC Programming Vik

Programming 6

Arc radius The radius is specified with address R.

Z

X

Arc center

Arc endArc startArc radius

N__ G02 X__ Z__ R__ F__ N__ G03 X__ Z__ R__ F__ If the radius is used, only arcs of less than 180 deg. can be programmed in a block. An arc with included angle greater than 180 deg. must be specified in two blocks.

Tool nose radius compensation G40 Tool nose radius compensation Cancel G41 Tool nose radius compensation Left G42 Tool nose radius compensation Right

X axis

Z axis

Right side G42

Left side G41

Right side G42

Left side G41

Cadem Manufacturing Technology Center CNC Turning

Page 28: NC Programming Vik

Programming 7

Theoretical tool tip (TTT) The Theoretical Tool Tip is the point on the tool that is used as the reference point for determining tool offsets. When a motion is commanded, the TTT point on the tool moves to the commanded point. The path of the TTT point (point A in the figure) normally will not match with the co-ordinates in the program. To get an accurate contour during machining, the TTT point must move in such a manner that the nose radius is tangential to the contour.

A

Effect of tool nose radius on the part 1. If tool nose radius compensation is not used for the motion from P1 to P2, excess cutting occurs as shown in the figure.

2. If tool nose radius compensation is not used for motion from P2 to P3, material is left out as shown in the figure.

Cadem Manufacturing Technology Center CNC Turning

Page 29: NC Programming Vik

Programming 8

Direction of immaginary tool nose Imaginary tool nose number (Type No) must be set in advance (before tool index) as well as offset values.

Type No. 1

ZX

Type No. 2

Z

X

X

Z

Type No. 5

Type No. 3

X

Z

Type No. 4

X

Z

Z

X

Type No. 7 X

Z

Cadem Manufacturing Technology Center

Z

Type No. 8

Type No. 6

X

CNC Turning

Page 30: NC Programming Vik

Programming 9

The direction of the imaginary tool nose viewed from the tool nose center is determined by the direction of the tool during cutting. Internal / External tools

12

43

Neutral tools

5

6

8

7

Cadem Manufacturing Technology Center CNC Turning

Page 31: NC Programming Vik

Programming 10

Thread cutting motion G32

G32

Thread cutting is done by moving the tool along the thread repeatedly at different depths tiil the final thread profile is formed. Each cut must start at the same angular position on the part. The spindle has an encoder, which generates a pulse at exactly the same angular position in every revolution. When a threading motion is programmed, the linear motion of the tool starts when this pulse is detected. This ensures that every cut starts at the same angular position. Thread cutting must be done at constant spindle speed. Block format N__ G32 X__ Z__ F__ X, Z are the end point of the thread and F is the pitch of the thread. The controller calculates feed rate through the following relationship Feed rate = Pitch x Spindle speed Each threading cut involves 4 motions: 1 threading motion and 3 rapid traverse motions. Since a thread normally requires multiple cuts, G32 results in a long program and is not normally used. The G76 canned cycle is normally used for threading.

Cadem Manufacturing Technology Center CNC Turning

Page 32: NC Programming Vik

Programming 11

Canned cycles

A canned cycle simplifies a program by using a few blocks containing G-codes functions to specify the machining operations usually specified in several blocks. Turning Cycle - G71 Format G71 U (d) R (e) G71 P (n) Q(n) U(u) W(w) F(f) S(s) T(t) N (n) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ N (n)_ _ _ _ d = Depth of cut e = Retract amount n = Number of the first block of the shape n = Number of the last last block of the shape u = Finishing allowance in X w =Finishing allowance in Z f = Feed rate s = Spimdle speed t = Tool number Facing Cycle - G72 Format G71 U (d) R (e) G71 P (n) Q(n) U(u) W(w) F(f) S(s) T(t) N (n) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ N (n) _ _ _ _ d = Depth of cut e = Retract amount n = Number of the first block of the shape n = Number of the last last block of the shape u = Finishing allowance in X w =Finishing allowance in Z f = Feed rate s = Spindle speed t = Tool number

Cadem Manufacturing Technology Center CNC Turning

Page 33: NC Programming Vik

Programming 12

Multipass Turning Cycle - G73 Format G73 U (i) W (k) R (d) G73 P (n) Q (n) U (u) W (w) F (f) S(s) T (t) N (n)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ N (n)_ _ _ _ _ i = Relief in the X axes direction k = Relief in the Z axis direction d = Number of cuts n = Number of first block of the shape n = Number of the last block of the shape u = Finishing allowance in X w = Finishing allowance in Z f = Feed rate s = Spimdle speed t = Tool number Axial Drilling Cycle -G74 Format G74R (e) G74X (U)_ Z (W)_ P(i) Q (k) R(d) F(f) e = Retract amount X = X component of point B U = Incremental amount from A to B Z = Z component of point C W = Increment amount from A to C i = Movement amount in X direction k = Depth of cut in Z direction d = Relief Amount of the tool at the cutting bottom f = Feed rate

Cadem Manufacturing Technology Center CNC Turning

Page 34: NC Programming Vik

Programming 13

Radial Grooving Cycle - G75 Format G75R (e) G75X (U)_ Z (W)_ P(i) Q (k) R(d) F(f) e = Retract amount X = X component of point B U = Incremental amount from A to B Z = Z component of point C W = Increment amount from A to C i = Movement amount in X direction k = Depth of cut in Z direction d = Relief Amount of the tool at the cutting bottom f = Feed rate Thread Cutting Cycle - G76 G76p (m) (r) (a) (d min) R (d) G76X (u) Z (W)_ R(i) P (k) Q(∆d) F(L) Format m = No.of idle passes r = Chamfering amount a = Angle of tool tip d min = Minimum thread depth d = Finishing Allowance i = Taper value k = Height of thread ∆d = Depth of cut in first cut L = Lead of thread

Cadem Manufacturing Technology Center CNC Turning

Page 35: NC Programming Vik

Programming 14

Verifying NC programs Safety priorities Safety priorities must be followed when verifying programs. Operator safety - priority 1 Safety of the person operating the machine Machine tool safety - priority 2 Prevention of damage to the machine Workpiece safety - priority 3 Prevention of part rejection

Typical errors Syntax errors This prevents the machine controller from executing a command. E.g., writing G101 instead of G01 Motion errors Machine does not generate an error, so these are difficult to diagnose. E.g., Writing X instead of Z; wrong co-ordinates; reversing CW and CCW commands; improper incremental/absolute mode selection. Omission errors Omitting decimal points, forgetting to program feed rates, forgetting to turn on the coolant Setup errors Wrongly measured work offset and tool offsets, or correct measurement and wrong entry

Program verification procedures A new program is checked by executing it in some or all of the verification modes. Dry run with Machine lock Used for checking syntax errors. Motion errors are not checked. • Set Machine lock ON and Dry run ON. • Set feed rate override switch to maximum to execute the cycle fast. • The spindle rotates, the turret indexes and the display changes as per program, but axes do not move. • Tool and work offsets need not be set.

Cadem Manufacturing Technology Center CNC Turning

Page 36: NC Programming Vik

Programming 15

Dry run with air cutting Used for checking motion errors and correctness of spindle direction. Since execution is at dry run feed, difference between rapid and feed motions is not known. Collisions cannot be checked. • Set the tool offsets. Set the work offset so that all motions occur away from work holding devices like

the chuck.. Do not load a part. • Set Machine lock OFF and Dry run ON. All machine functions and motions are active. • Set feed rate override switch to minimum for safety. Normal cycle with air cutting Used for checking collisions. • Set the tool offsets. Set the work offset so that all motions occur away from work holding devices like

the chuck.. Do not load a part. • Set all functions for normal machine execution. • For safety, when in doubt set the feed rate override switch to minimum. • Carefully watch for motions which result in tool colliding with the part or work holding device. Single block execution Used for checking motion errors and part dimensional accuracy. • Set the work offset normally, and load a part. • Set the tool offsets to leave excess stock on the part. • Set all functions for normal machine execution. • For safety, when in doubt set the feed rate override switch to minimum. • Check the Distance to go value to detect potential motion errors. • Check all dimensions. For critical dimensions alter the tool offsets and rerun the tool again to check

whether the dimension is within tolerance. Repeat till tolerance is achieved.

Cadem Manufacturing Technology Center CNC Turning