from http://carlsonmfg.com/industrial-resources-articles/18-cnc-code-programming G00 Rapid Transverse Motion G01 Motion by a feed rate G02 Motion in an arc clockwise G03 Motion in an arc counter clockwise G04 Dwell G17 XY Plane selection G18 XZ Plane selection G19 YZ Plane selection G28 Return to Machine zero for axis selected G40 Cutter compensation Cancel G41 2D Cutter compensation Left G42 2D Cutter compensation Right G43 Tool length compensation + (add to tool length offset) G44 Tool length compensation – (subtract tool length offset) G49 Cancels G43 G44 G50 Sets a speed limit for Constant surface speed (lathe) G52 Set Work Coordinate system G54 Work coordinate system #1 G55 Work coordinate system #2 G56 Work coordinate system #3 G57 Work coordinate system #4 G58 Work coordinate system #5 G59 Work coordinate system #6 G65 Macro Subroutine call G70 Bolt Hole Circle G71 Holt Hole Arc G72 Bolt holes along an Angle G73 High Speed Peck Drilling G74 Reverse Tapping G80 Turns off all canned cycles G81 Drilling G82 Spot Drilling G83 Peck drilling G84 Tapping cycle G90 Calls up an absolute Co-ordinate grid system Positioning G91 Calls up an incremental Co-ordinate grid system Positioning G92 Set Work Coordinate system shift value -(grid shift) G94 Feed per minute mode G95 Feed per spindle revolution mode G96 turns on Constant Surface Speed (lathe) G97 Turns off Constant Surface Speed (lathe) G98 Canned cycle initial point return G99 Canned cycle R Plande return M00 Program stop - Tells the CNC machine to stop in the middle of a program. M01 Optional Program Stop - Tells the CNC machine to stop ONLY if the optional stop switch is active M02 Program end M03 Turns the Spindle on in a Clockwise direction M04 Turns the Spindle on in a Counter-Clockwise direction M05 Turns the Spindle off M06 Tool change M07 Optional coolant is not available on all machine configurations M08 Turns flood coolant on M09 Turns flood coolant off M10 Normally used to turn 4th Axis brake on (mill) M11 Normally used to turn 4th Axis brake off (mill) M19 Spindle Orientation M30 Program end and reset M31 Chip conveyor on (forward) M33 Chip conveyor off M88 Turns through the spindle coolant on M89 Turns through the spindle coolant off M97 Calls up sub program for local program M98 Sub Program Call M99 Loop or return to rerun a sub program // canonical functions // p44/52 of http://www.nist.gov/customcf/get_pdf.cfm?pub_id=823374 SET_ORIGIN_OFFSETS(double x, double y, double z, double a, double b, double c) USE_LENGTH_UNITS(CANON_UNITS units) STRAIGHT_TRAVERSE(double x, double y, double z, double a, double b, double c) SELECT_PLANE(CANON_PLANE plane) SET_FEED_RATE(double rate) SET_FEED_REFERENCE(CANON_FEED_REFERENCE reference) SET_MOTION_CONTROL_MODE(CANON_MOTION_MODE mode) START_SPEED_FEED_SYNCH() STOP_SPEED_FEED_SYNCH() ARC_FEED(double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point, double a, double b, double c) DWELL(double seconds) STRAIGHT_FEED(double x, double y, double z, double a, double b, double c) STRAIGHT_PROBE(double x, double y, double z, double a, double b, double c) ORIENT_SPINDLE(double orientation, CANON_DIRECTION direction) SET_SPINDLE_SPEED(double r) START_SPINDLE_CLOCKWISE() START_SPINDLE_COUNTERCLOCKWISE() STOP_SPINDLE_TURNING() CHANGE_TOOL(int slot) SELECT_TOOL(int i) USE_TOOL_LENGTH_OFFSET(double offset) COMMENT(char * s) DISABLE_FEED_OVERRIDE() DISABLE_SPEED_OVERRIDE() ENABLE_FEED_OVERRIDE() ENABLE_SPEED_OVERRIDE() FLOOD_OFF() FLOOD_ON() INIT_CANON() MESSAGE(char * s) MIST_OFF() MIST_ON() PALLET_SHUTTLE() OPTIONAL_PROGRAM_STOP() PROGRAM_END() PROGRAM_STOP()