100% found this document useful (1 vote)
837 views18 pages

Heidenhain M Codes & G CODES

- The document provides descriptions of various M codes and G codes used in CNC machining programs. M codes are used to control miscellaneous functions like spindle control and coolant while G codes specify motion and other functions. Some of the main codes described include M3/M4 for spindle control, G00/G01 for linear motion, G02/G03 for arc motions, and G codes for drilling, tapping, and coordinate systems. - Over 100 M and G codes are defined that control a wide range of functions from spindle and coolant control to tool definitions, compensation, and cycles for operations like drilling, milling, and probing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
837 views18 pages

Heidenhain M Codes & G CODES

- The document provides descriptions of various M codes and G codes used in CNC machining programs. M codes are used to control miscellaneous functions like spindle control and coolant while G codes specify motion and other functions. Some of the main codes described include M3/M4 for spindle control, G00/G01 for linear motion, G02/G03 for arc motions, and G codes for drilling, tapping, and coordinate systems. - Over 100 M and G codes are defined that control a wide range of functions from spindle and coolant control to tool definitions, compensation, and cycles for operations like drilling, milling, and probing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

‫ و مباحث ساخت وتولید‬CNC ‫برترین کانال آموزش نرم افسارهای ماشینکاری‬

@powerMILLTraining
https://telegram.me/powerMILLTraining
:‫شرح خدمات در سایت ذیل‬
Www.powermill.blog.ir
Heidenhain M Codes
M
Description
Code
M0 Stop program run (Spindle STOP, Coolant OFF)
M1 Optional program STOP (Spindle STOP, Coolant OFF)
Stop program run (Spindle STOP,Coolant OFF,Go to block 1,Clear the status
M2
display(depending on machine parameter))
M3 Spindle ON clockwise
M4 Spindle ON counterclockwise
M5 Spindle STOP
M6 Tool change (STOP program run (depending on machine parameter),Spindle STOP)
M8 Coolant ON
M9 Coolant OFF
M13 Spindle ON clockwise (Coolant ON)
M14 Spindle ON counterclockwise (Coolant ON)
M30 Same as M2
Vacant miscellaneous function or Cycle call, modally effective (depending on machine
M89
parameter)
M91 Within the positioning block: Coordinates are referenced to machine datum
Within the positioning block: Coordinates are referenced to position defined by machine
M92
tool builder, such as tool change position
M94 Reduce the rotary axis display to a value below 360°
M97 Machine small contour steps
M98 Machine open contours completely
M99 Blockwise cycle call (Cycle call, NON-MODAL)
M101 Automatic tool change with replacement tool if maximum tool life has expired
M102 Reset M101
M103 Reduce feed rate during plunging to factor F (percentage)
M104 Reactivate the datum as last defined
M105 Machining with second kv factor
M106 Machining with first kv factor
M107 Suppress error message for replacement tools with oversize
M108 Reset M107
M109 Constant contouring speed at tool cutting edge (increase and decrease feed rate)
M110 Constant contouring speed at tool cutting edge (feed rate decrease only)
M111 Reset M109/M110
M112 Enter contour transition between two contour elements
M113 Reset M112
M114 Automatic compensation of machine geometry when working with tilted axes
M115 Reset M114
M116 Feed rate for rotary axes in mm/min
M117 Reset M116
M118 Superimpose handwheel positioning during program run
M120 Pre-calculate radius-compensated contour (LOOK AHEAD)
M124 Contour filter
M126 Shortest-path traverse of rotary axes
M127 Reset M126
M128 Retain the position of the tool tip when positioning the tilted axes (TCPM)
M129 Reset M128
M130 Moving to position in an untilted coordinate system with a tilted working plane
M134 Exact stop at nontangential contour transitions when positioning with rotary axes
M135 Reset M134
M136 Feed rate F in millimeters per spindle revolution
M137 Reset M136
M138 Selection of tilted axes
M140 Retraction from the contour in the tool-axis direction
M141 Suppress touch probe monitoring
M142 Delete modal program information
M143 Delete basic rotation
Compensating the machine’s kinematics configuration for ACTUAL/NOMINAL
M144
positions at end of block
M145 Reset M144
M148 Retract the tool automatically from the contour at NC stop
M149 Reset M148
M150 Suppress limit switch message
M200 Laser cutting: Output programmed voltage directly
M201 Laser cutting: Output voltage as a function of distance
M202 Laser cutting: Output voltage as a function of speed
M203 Laser cutting: Output voltage as a function of time (ramp)
M204 Laser cutting: Output voltage as a function of time (pulse)


o

Heidenhain ISO G Codes


Tool movements
G code Description

G00 Straight-line interpolation, Cartesian coordinates, rapid traverse

G01 Straight-line interpolation, Cartesian coordinates

G02 Circular interpolation, Cartesian coordinates, clockwise

G03 Circular interpolation, Cartesian coordinates, counterclockwise

G05 Circular interpolation, Cartesian coordinates, without indication of direction

G06 Circular interpolation, Cartesian coordinates, tangential contour approach

G07 Paraxial positioning block

G10 Straight-line interpolation, polar coordinates, rapid traverse

G11 Straight-line interpolation, polar coordinates

G12 Circular interpolation, polar coordinates, clockwise

G13 Circular interpolation, polar coordinates, counterclockwise

G15 Circular interpolation, polar coordinates, without indication of direction

G16 Circular interpolation, polar coordinates, tangential contour approach


Chamfer/Rounding/Approach contour/Depart contour
G code Description

G24 Chamfer with length R

G25 Corner rounding with radius R

G26 Tangential contour approach with radius R

G27 Tangential contour approach with radius R

Tool definition
G code Description

G99 With tool number T, length L, radius R

Tool radius compensation


G code Description

G40 No tool radius compensation

G41 Tool radius compensation, left of the contour

G42 Tool radius compensation, right of the contour

G43 Paraxial compensation for G07, lengthening

G44 Paraxial compensation for G07, shortening

Blank form definition for graphics


G code Description

G30 (G17/G18/G19) min. point

G31 (G90/G91) max. point

Cycles for drilling, tapping and thread milling


G code Description

G83 Pecking
G84 Tapping with a floating tap holder

G85 Rigid tapping

G86 Thread cutting

G200 Drilling

G201 Reaming

G202 Boring

G203 Universal drilling

G204 Back boring

G205 Universal pecking

G206 Tapping with a floating tap holder

G207 Rigid tapping

G208 Bore milling

G209 Tapping with chip breaking

Cycles for creating point patterns


G code Description

G220 Circular pattern

G221 Linear pattern

SL Cycles, group 1
G code Description

G37 Contour geometry, list of subcontour program numbers

G56 Pilot drilling

G57 Rough-out
G58 Contour milling in clockwise direction (finishing)

G59 Contour milling, counterclockwise (finishing)

SL cycles, group 2
G code Description

G37 Contour geometry, list of subcontour program numbers

G120 Contour data (applies to G121 to G124)

G121 Pilot drilling

G122 Rough-out

G123 Floor finishing

G124 Side finishing

G125 Contour train (machining open contour)

G127 Cylinder surface

G128 Cylindrical surface slot

Coordinate transformation
G code Description

G53 Datum shift in datum table

G54 Datum shift in program

G28 Mirror image

G73 Rotation of the coordinate system

G72 Scaling factor (reduce or enlarge contour)

G80 Tilting the working plane

G247 Datum setting


Cycles for multipass milling
G code Description

G60 Run 3-D data

G230 Multipass milling of plane surfaces

G231 Multipass milling of tilted surfaces

G232 Face milling

Special cycles
G code Description

G04 Dwell time with F seconds

G36 Spindle orientation

G39 Program call

G62 Tolerance deviation for fast contour milling

G440 Measure axis shift

G441 Fast probing

Define machining plane


G code Description

G17 Working plane X/Y, tool axis Z

G18 Working plane Z/X, tool axis Y

G19 Working plane Y/Z, tool axis X

G20 Tool axis IV

Dimensions
G code Description

G90 Absolute dimensions


G91 Incremental dimensions

Unit of measure
G code Description

G70 Inches (set at start of program)

G71 Millimeters (set at start of program)

Other G functions
G code Description

G29 Transfer the last nominal position value as a pole (circle center)

G38 STOP program run

G51 Next tool number (with central tool file)

G79 Cycle call

G98 Set label number

Cycles for drilling, tapping and thread milling


G code Description

G240 Centering

G200 Drilling

G201 Reaming

G202 Boring

G203 Universal drilling

G204 Back boring

G205 Universal pecking

G206 Tapping with a floating tap holder

G207 Rigid tapping


G208 Bore milling

G209 Tapping with chip breaking

G241 Single-lip deep-hole drilling

Cycles for drilling, tapping and thread milling


G code Description

G262 Thread milling

G263 Thread milling/countersinking

G264 Thread drilling/milling

G265 Helical thread drilling/milling

G267 External thread milling

Cycles for milling pockets, studs and slots


G code Description

G74 Slot milling

G75 Rectangular pocket milling in clockwise direction

G76 Rectangular pocket milling in counterclockwise direction

G77 Circular pocket milling in clockwise direction

G78 Circular pocket milling in counterclockwise direction

G210 Slot milling with reciprocating plunge

G211 Round slot with reciprocating plunge

G212 Rectangular pocket finishing

G213 Rectangular stud finishing

G214 Circular pocket finishing


G215 Circular stud finishing

Cycles for milling pockets, studs and slots


G code Description

G251 Rectangular pocket, complete

G252 Circular pocket, complete

G253 Slot, complete

G254 Circular slot, complete

G256 Rectangular stud

G257 Circular stud

Cycles for creating point patterns


G code Description

G220 Circular point pattern

G221 Point patterns on lines

Cycles for multipass milling


G code Description

G230 Multipass milling of smooth surfaces

G231 Multipass milling of tilted surfaces

G232 Face milling

Touch probe cycles for measuring workpiece misalignment


G code Description

G400 Basic rotation using two points

G401 Basic rotation from two holes

G402 Basic rotation from two studs


G403 Compensate a basic rotation via a rotary axis

G404 Set basic rotation

G405 Compensating misalignment with the C axis

Touch probe cycles for datum setting


G code Description

G408 Slot center reference point

G409 Reference point at center of hole

G410 Datum from inside of rectangle

G411 Datum from outside of rectangle

G412 Datum from inside of circle

G413 Datum from outside of circle

G414 Datum in outside corner

G415 Datum in inside corner

G416 Datum circle center

G417 Datum in touch probe axis

G418 Datum in center of 4 holes

G419 Reference point in selectable axis

Touch probe cycles for workpiece measurement


G code Description

G55 Measure any coordinate

G420 Measure any angle

G421 Measure hole


G422 Measure cylindrical stud

G423 Measure rectangular pocket

G424 Measure rectangular stud

G425 Measure slot

G426 Measure ridge

G427 Measure any coordinate

G430 Measure circle center

G431 Measure any plane

Touch probe cycles for tool measurement


G code Description

G480 Calibrating the TT

G481 Measure tool length

G482 Measure tool radius

G483 Measure tool length and tool radius


sample

CNC Program
0 BEGIN PGM FK2 MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-40
2 BLK FORM 0.2 X+100 Y+100 Z+0
3 TOOL DEF 1 L+0 R+5
4 TOOL CALL 1 Z S500
5 L M6
6 L X-20 Y+30 R0 FMAX M3
7 L Z+2 FMAX
8 L Z-10 F500
9 L X+2 Y+30 RL
10 CC X+20 Y+30
11 C X+5.6 Y+40.8 DR-
12 L X+38 Y+84
13 CC X+50 Y+75
14 C X+63.656 Y+81.207 DR-
15 L X+88.656 Y+26.207
16 CC X+75 Y+20
17 C X+73.113 Y+5.119 DR-
18 L X+17.735 Y+12.143
19 CC X+20 Y+30
20 C X+2 Y+30 DR-
21 L X-20 R0
22 L Z+50 R0 FMAX M5
23 TOOL CALL 0 Z S60
24 L M6
25 L M2
26 END PGM FK2 MM

CNC Program
0 BEGIN PGM FK1 MM
1 BLK FORM 0.1 Z X-10 Y+0 Z-40
2 BLK FORM 0.2 X+110 Y+100 Z+0
3 TOOL DEF 1 L+0 R+5
4 TOOL CALL 1 Z S500
5 L M6
6 L X+50 Y+50 R0 FMAX M3
7 L Z+2 FMAX
8 L Z-10 F100
9 L Y+75 RL F500
10 CC X+50 Y+50
11 C X+26.805 Y+59.327 DR+
12 CC X+13.816 Y+64.55
13 C X+6.97 Y+76.762 DR-
14 CC X+50 Y+50
15 C X+93.03 Y76.762 DR-
16 CC X+86.184 Y+64.55
17 C X+73.195 Y+59.327 DR-
18 CC X+50 Y+50
19 C X+50 Y+75 DR+
20 L X+50 Y+50 R0
21 L Z+50 FMAX M5
22 TOOL CALL 0 Z S60
23 L M6
24 L M2
25 END PGM FK1 MM

CNC Program
0 BEGIN PGM 10120 MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-40
2 BLK FORM 0.2 X+100 Y+100 Z+0
3 TOOL DEF 1
4 TOOL DEF 2
5 TOOL DEF 3
6 CYCL DEF 14.0 CONTOUR GEOM.
7 CYCL DEF 14.1 CONTOUR LABEL 1/2/3/4/ / /
8 TOOL CALL 1 Z S500
9 L M6
10 CYCL DEF 15.0 PILOT DRILL
11 CYCL DEF 15.1 SET UP -2 DEPTH -20
12 CYCL DEF 15.2 PECKG -10 F50 ALLOW +1
13 L X+0 Y+0 R0 FMAX M13
14 L Z+2 FMAX M99
15 TOOL CALL 2 Z S1000
16 L M6
17 CYCL DEF 6.0 ROUGH OUT
18 CYCL DEF 6.1 SET UP -2 DEPTH -20
19 CYCL DEF 6.2 PECKG -10 F50 ALLOW +1
20 CYCL DEF 6.3 ANGLE +45 F200
21 L X+0 Y+0 R0 FMAX M13
22 L Z+2 FMAX
23 CYCL CALL M
24 TOOL CALL 3 Z S1000
25 L M6
26 CYCL DEF 16.0 CONTOUR MILLG
27 CYCL DEF 16.1 SET UP -2 DEPTH -20
28 CYCL DEF 16.2 PECKG -20 F50 DR+ F200
29 L X+0 Y+0 R0 FMAX M3
30 L Z+2 FMAX
31 CYCL CALL M
32 TOOL CALL 0
33 L M6
34 L M30
35 LBL 1
36 L X+35 Y+25 RL F M
37 CC X+35 Y+50
38 C X+35 Y+25 DR+
39 LBL 0
40 LBL 2
41 L X+65 Y+25 RL
42 CC X+65 Y+50
43 C X+65 Y+25 DR+
44 LBL 0
45 LBL 3
46 L X+35 Y+42 RL
47 L X+27
48 L Y+58
49 L X+43
50 L Y+42
51 L X+35
52 LBL 0
53 LBL 4
54 L X+65 Y+42 RL
55 L X+57
56 L X+65 Y+58
57 L X+73 Y+42
58 L X+65
59 LBL 0
60 END PGM 10120 MM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy