CNC Machine Simulator : V-CNC
 
G-Code for Lathe (Fanuc)
 
Code Group Function Code Group Function
G00 1 Positioning in Rapid G50 0 Coordinate system setting and maximum rpm
G01 Linear Interpolation G70 Finishing Canned Cycle
G02 Circular Interpolation (CW) G71 Rough Turning Canned Cycle
G03 Circular Interpolation(CCW) G72 Face Turning Canned Cycle
G04 0 Dwell G73 Pattern repeating
G20 6 Inch Units G74 Peck Drilling in Z-Axis
G21 Metric Units G75 Grooving in X-Axis
G27 0 Reference point return check G76 Multi-Pass Threading Cycle
G28 Automatic Zero Return G90 1 Outer / Inner Diameter Cutting Cycle
G30 2nd reference point return G92 One-Pass Threading Cycle
G32 1 Thread cutting G94 End Face Cutting Cycle
G40 7 Cutter compensation Cancel G96 2 Constant surface speed control
G41   Cutter compensation Left G97 Constant surface speed control cancel
G42   Cutter compensation Right G98 5 Feed Per Minute
  G99 Feed Per Revolution
 
   
   
  G-Code for Milling (Fanuc)
 
 
Code Group Explanation Code Group Explanation
G00 1 Positioning
(Rapid transfer)
G73 9 High-speed deep hole drilling cycle
G01 Cuts in a straight line G74 Left hand thread cutting cycle
G02 Arc cutting by G76 Precision boring cycle
Clock wise direction
G03 Arc cutting by CCW
-Counterclockwise direction
*G80 Cancels fixed cycle
G04 0 Stops temporarily(Dwell) G81 Spot drilling cycle
G17 2 XY plane designation G82 Counter-boring cycle
G28 0 Machine origin point returns G83 Deep-hole drilling cycle
G30 2nd and 3rd machine origin point return G84 Right hand thread cutting cycle
*G40 7 Cancels tool diameter offset G85 Boring cycle
G41 Tool diameter left offset G86 Boring cycle
G42 Tool diameter right offset G87 Back boring cycle
*G43 8 Tool lengh +offset G88 Boring cycle
G89 Boring cycle
*G44 Tool diameter - offset *G90 3 Uses absolute value command
G91 Uses incremental value command
*G49 Cancels tool length offset G92 0 Coordinate frame set up
*G98 10 Fixed cycle initial point returns *G99 10 Fixed cycle R point return
 
   
   
  M-Code (FANUC)
 
Code Function Code Function
M00 Program Stop M07 Coolant On - Mist
M01 Optional Stop M08 Coolant On - Flood
M02 End of Program, Stop M09 Coolant Off
M03 Spindle Start CW M30 End of Program - Stop and Rewind
M04 Spindle Start CCW M98 Call Subprogram
M05 Spindle Stop M99 End Subprogram
M06 Tool Change  
   
   
  * G-Code for Lathe (SIEMENS)
 
G-code Description
G00 Rapid traverse
G01  Linear movement
G02 Circle/helix in clockwise direction
G03  Circle/helix in the counterclockwise direction
G04  Dwell time in [s] or spindle revolutions
G18  ZX plane
G20 Inch input system
G21 Metric input system
G33 Command for thread cutting with constant lead
T# Call tool
D# Activate tool compensation
G54 Selecting work offset 1
G55 Selecting work offset 2
G56 Selecting work offset 3
G57 Selecting work offset 4
G74 Reference point approach
G90 Absolute dimensions
G91 Absolute dimensions 
G94 Linear feedrate
G95 Revolutional feedrate
   
  * G-Code for Milling (SIEMENS)
G-code Description
G00 Rapid traverse
G01 Linear movement
G02 Circle/helix in clockwise direction
G03 Circle/helix in the counterclockwise direction
G04 Dwell time in [s] or spindle revolutions
G17 XY plane
G20 Inch input system
G21 Metric input system
G40 Deactivate Tool radius compensation
G41 Activate tool radius compensation with machining direction left side
G42 Activate tool radius compensation with machining direction right side
G43 Activate tool length compensation with positive direction
D0 Deactivate Tool compensation
G54 Selecting work offset 1
G55 Selecting work offset 2
G56 Selecting work offset 3
G57 Selecting work offset 4
G90 Absolute dimensions
G91 Absolute dimensions