en:software:mdurosettacncsoftwaregcode:supported_g_m-codes:g_code_order_of_execution

The order of execution of items on a line is defined not by the position of each item on the line, but by the following list:

  • the entire line is skipped if it starts with a forward slash / and the block delete toggle is active
  • comments started with ( or ;
  • if N is the first letter of a line the following number is interpreted as line number
  • when a subroutine declaration is found (example O1001) the remaining part of the line is allowed only to be a comment.
  • control flow statements like WHILE,IF
  • set feed rate mode G93, G94
  • set feed rate F
  • set spindle speed S
  • I/O handling: M62, M63, M66
  • change tool: M6 if user tool change macro is disabled, M61, M106
  • spindle on or off: M3, M4, M5
  • coolant on or off: M7, M8, M9, M17, M18
  • M48, M49
  • M109, M120
  • dwell G4
  • set active plane: G17, G18, G19
  • set length units: G20, G21
  • cutter radius compensation on or off: G40, G41, G42
  • cutter length compensation on or off: G43, G49
  • coordinate system selection: G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3
  • set path control mode: G61, G61.1, G64
  • set distance mode: G90, G91
  • set arc mode: G90.1, G91.1
  • set retract mode: G98, G99
  • non modal G-codes: G10, G28, G28.1, G30, G30.1, G52, G92, G92.1, G92.2, G92.3
  • scaling: G50, G51
  • rotation: G68, G69
  • motion: G0, G1, G2, G3, G9, G76, G80
  • stop: M0, M1, M2, M30, M47
  • control flow statements like GOTO
  • subroutines and macros: M98, M6 only if user tool change macro is enabled

Some codes require to be the only G/M codes in the line, they are: G65, G100, user defined m codes and user defined g codes

  • Last modified: 2023/03/22 09:07
  • by 127.0.0.1