Macro programming
Macro programming
Order of execution
1min
The order of execution of items on a line is critical to safe and effective machine operation. Items are executed in the order shown in the table below if they occur on the same line.
- Comment (includes message).
- Set feed rate mode (G93, G94 -inverse time or per minute).
- Set feed rate (F).
- Set spindle speed (S).
- Select tool (T)
- Change tool (M6)
- Spindle on or off (M3, M4, M5)
- Coolant on or off (M7, M8, M9)
- Enable or disable overrides (M48, M49)
- 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 retract mode (G98, G99)
- Home (G28, G30) or change coordinate system data (G10) or set axis offsets (G92, G92.1, G92.2, G94).
- Perform motion (G0 to G3, G80 to G89), as modified (possibly) by G53.
- Stop (M0,M1, M2,M30,M60)