Vous êtes sur la page 1sur 9

G-Codes

Code G00 G01 G02 G03 G04 G05 G06 G07 G08 G09 G10 - G12 G13 G14 - G14.1 G15 - G16 G15 - G16.1 G16.2 G17 G18 G19 G20 G21 G22 - G23 G22.1 - G23.1 G24 G28 G29 G30 G31.1 - G31.4 G33 G34 G35 G36 G37 G38 Application positioning (rapid traverse) (M,T) linear interpolation (feed) (M,T) circular Interpolation CW (M,T) circular Interpolation CCW (M,T) dwell, a programmed time delay (M,T) unassigned parabolic interpretation (M,T) cylindrical diameter values (T) programmed acceleration (M,T) exact stop check (M,T) unassigned or lock and unlock devices computing line and circle intersect (M,T) used for scaling (M,T) polar coordinate programming (M) cylindrical interpolation - c axis (T) end face milling - c axis (T) XY plane selection (M,T) ZX plane selection (M,T) YZ plane selection (M,T) input in inch input in mm machine axis off limit area (M,T) cutting tool off limit area (M,T) single-pass rough facing cycle (T) return to reference point (M,T) return from reference point (M,T) return to alternate home position (M,T) external skip function (M,T) thread cutting, constant lead (T) thread cutting, increasing lead (T) thread cutting, decreasing lead (T) automatic accel. and deccel. (M,T) used for tool gaging (M,T) measure dia. and center of hole (M)

G40 G41 G42 G43 G44 G45 G46 G47 G48 G49 G50 G50.1 G51.1 G52 G53 G54 G55 G56 G57 G58 G59 G60 G61 G62 G64 G65 G66 G66.1 G67 G68 G69 G70 G71 G72 G72 G73 G74 G74 G74 G75 G76

cutter compensation cancel (M) cutter compensation left (M) cutter compensation right (M) cutter offset, inside corner (M,T) cutter offset, outside corner (M,T) tool offset decrease tool offset double increase tool offset double decrease scaling off tool length compensation cancel tool offset increase cancel mirror image (M,T) program mirror image (M,T) offset axis w/ respect to 0 point (M,T) motion in machine coordinates (M,T) work coordinate system 1 select work coordinate system 2 select work coordinate system 3 select work coordinate system 4 select work coordinate system 5 select work coordinate system 6 select single direction positioning exact stop check mode (M,T) reduce feed rate on inside corner (M,T) cutting mode (M,T) custom parametric macro (M,T) custom macro for motion blocks (M,T) custom macro for all blocks (M,T) stops custom macro (M,T) coordinate syslaim rotation ON (M) coordinate syslaim rotation OFF (M) inch programming (M,T) metric programming (M,T) circular interpolation CW (M) finished cut along z-axis (T) peck drilling cycle (T) counter tapping cycle (M) rough facing cycle (T) cancel circular interpolation (M,T) circular interpolation (M,T) fine boring

G80 G81 G82 G83 G84 G84.1 G85 G86 G87 G88 G89 G90 G91 G92 G93 G94 G95 G96 G97 G98 G99

canned cycle cancel drilling cycle, no dwell (M,T) drilling cycle, dwell (M,T) deep hole, peck drilling cycle (M,T) right hand tapping cycle (M,T) left hand tapping cycle (M,T) boring, no dwell, feed out (M,T) boring, spindle stop, rapid out (M,T) boring, manual retraction (M,T) boring, spindle stop, manual ret. (M,T) boring, dwell and feed out (M,T) absolute dimension input (M,T) incremental dimension input (M,T) set absolute zero point (M,T) inverse time feed rate (M,T) per minute feed (M,T) per revolution feed (M,T) constant surface speed control (T) stop constant surface speed control (T) return to initial point in canned cycle return to R point in canned cycle

Understanding Common Fanuc Style G-Codes For CNC Milling & Turning Centers.
Word Addresses X## = X position I## = X arc center U## = linear opposite X
sometimes used as incremental (lathe)

Y## = Y position J## = Y arc center V## = linear opposite Y


sometimes used as incremental (lathe)

Z## = Z position K## = Z arc center W## = linear opposite Z


sometimes used as incremental (lathe)

A## = rotary around X F## = feedrate ## =

B## = rotary around Y R## = drill retract ## =

C## = rotary around Z Q## = drill peck ## =

R+## = arc radius(+) if < 180 D## = cutter dia/rad offset P## = dwell time in 10000th sec

R-## = arc radius(-) if > 180 H## = tool length offset

G-Codes G00 = Rapid linear move example: G00 X## Y## Z## (X,Y,Z = position) G01 = Feed linear move example: G01 F## X## Y## Z## (F=feedrate to move at) G02 = Circular move CW example: G02 X## Y## I## J## (XY=end point, IJ=center point) G02 = Circular move CW example: G02 X## Y## R## (R=size of radius arc to swing. R+ if radius < 180, R- if radius is > 180) G03 = Circular move CCW example: G03 X## Y## I## J## (XY=end point, IJ=center point) G03 = Circular move CCW example: G03 X## Y## R## (R=size of arc radius to swing. R+ if radius < 180, R- if radius is > 180) G04 = Dwell time example: G04 P## (P=time to dwell. P20000 is 2 seconds) G10 = Zero offset shift example: G10 X## Y## Z##(X=shift dist. Y=shift dist. Z=shift dist.) G11 = Zero offset shift cancel example: G11 G17 = Contour plane is XY (Z = spindle) example: G17 G18 = Contour plane is ZX (Y = spindle) example: G18

G19 = Contour plane is YZ (X = spindle) example: G19 G20 = Inch mode (G70 on older controls) example: G20 G21 = MM mode (G71 on older controls) example: G21 G28 = Return to reference point example: G0 G91 G28 X## Y## Z## (Go to machine XYZ home,passing thru XYZ incremental zero) G29 = Return from reference point example: G0 G90 G29 X## Y## Z## (Go to this XYZ position, returning from home) G30 = Return to 2nd, 3rd (ect..) reference point example: Similar to G28 G40 = Cutter (dia.or rad.) compensation off example: G40 X## Y## G41 = Cutter compensation to the left of the programmed path example: G40 X## Y## G42 = Cutter compensation to the right of the programmed path example: G40 X## Y## G43 = Tool length compensation with spindle approach from + side example: G43 H## Z## G44 = Tool length compensation with spindle approach from - side example: G44 H## Z## G49 = Tool length compensation cancel example: G49 G45 = Increase end position by tool offset value example: G45 X## D## (Go to X position, plus offset value in D##) G46 = Decrease end position by tool offset value example: G46 X## D## (Go to X position, less offset value in D##) G47 = Increase end position by twice the offset value example: G47 X## D## (Go to X position, plus 2x the offset value) G48 = Decrease end position by twice the offset value example: G48 X## D## (Go to X position, less 2x the offset value)

G53 = Coordinate system referenced from machine home example: G53 X## Y## Z## (Go to this XYZ position referenced from machine home) G54 = Work coordinate shift,offset #1 example: G54 X## Y## Z## (Go to this XYZ position referenced from WCS #1) G55 - G59 = Work coordinate shift,offset G55-G59 example: G5# X## Y## Z## (Go to this XYZ position referenced from WCS G55-G59) G09 = Exact stop positioning move example: G09 F## X## Y## Z## (active for single block only) G61 = Exact stop cutting mode example: G61 X## Y## Z## (Decelerated at point XYZ, before next move) G64 = Exact stop mode off example: G64 X## Y## Z## (Tool is not decelerated at point XYZ) G63 = Feed overide lock out example: G63 X## Y## Z## G62 = Feed compensation on inner corner example: G62 G02 X## Y## I## J## G81 = Basic drilling cycle - Feed in , rapid out. example: G81 X## Y## Z## R## F## G82 = Counter bore cycle - Feed in, dwell, rapid out. example: G82 X## Y## Z## R## F## P#### G83 = Peck drilling cycle - Feed in peck amount, rapid out, rapid in within .050 of last peck & repeat until depth is reached. example: G83 X## Y## Z## R## F## Q## G84 = Tapping cycle - Feed in, spindle stop, reverse, feed out. (note: this cycle will vary depending on the machine mfgr.) example: G84 X## Y## Z## R## F## G85, G86, G87, G88, G89 = Boring cycles. Function & imput will vary depending on the machine mfgr. Variations include.... Feed in, feed out. Feed in, dwell, feed out. Feed in, dwell, spindle stop, rapid out. Feed in, dwell, spindle stop, move insert from wall, rapid out. Rapid in, dwell, start spindle, feed up, dwell, rapid down, dwell

(reverse counter boring, back facing, back boring cycle). G90 = Absolute coordinate positioning. Points based from XYZ zero. example: G90 G00 X## Y## Z## G91 = Incremental coordinate positioning. Point to point positioning. example: G91 G00 X## Y## Z## G92 = Absolute Zero Pre-Set - An old format used to set XYZ Zero. The current position is set to the values shown in the line. example: G92 X10 Y5 Z-3 After running this command the current position is X10 Y5 Z-3. Very strange way to shift zero's. Avoid this code if you can. G94 = Feedrate is read as Inches/Minute. Used mostly for milling. example: G94 G01 X## Y## Z## F## G95 = Feedrate is read as Inches/revolution. Used mostly for turning. example: G95 G01 X## Y## Z## F##.### G96 = Constant surface speed (CSS) control (lathe). Increases the RPM as the tool moved closer to the center line of the part (smaller diameter). This keeps the amount of material (chip load) moving past the tip of the tool constant for and improved tool load, tool wear and surface finish. In the example below, the control will do an internal calculation to keep the tool moving at 200 surface feed/second. example: G96 S200 G97 = The opposite of constant surface speed control (G96). example: G97 G98 = Retract the tool to the starting Z height when drilling. Used for high retrect clearance moved between drilled holes. Assume Z is currently at Z+1.0. Running the line below will rapid to the R plane, drill to the Z depth and return to the starting height of Z+1.00 when the cycle is finished. example: G98 G81 X## Y## Z-.875 R.100 F## G99 = Retract the tool to the R plane when the drilling cycle is finished. Regardless of the starting height, the tool will return to Z.100 (the Rplane shown below). example: G99 G81 X## Y## Z-.875 R.100 F## G= example: G=

example: G= example: G= example: G= example: M-Function Codes

M00 = Program stop M01 = Optional program stop M02 = End of program (no rewind or return to start of program) M03 = Start the spindle in the forward direction (CW) M04 = Start the spindle in the reverse direction (CCW) M05 = Stop the spindle / Spindle off. M06 = Tool change command M07 = Coolant on mist M08 = Coolant on flood M09 = Coolant off M13 = Spindle on forward, coolant on M14 = Spindle on reverse, coolant on M15 = Spindle off, coolant off M19 = Spindle orientation on. Used to locate the tool tip position for boring tools. Sometimes output with a value that represents the angle of the tool tip orientation. M20 = Spindle orientation off M30 = End of program (rewind/return to start of program) M98 = Call sub program

M99 = Sub program end Not all of these M Functions work on all machines.

This Page Written By Mike Mattera

Vous aimerez peut-être aussi