This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:x300:g-code_and_m-code [2022/09/28 12:16] erik.ketele |
en:x300:g-code_and_m-code [2023/05/17 10:05] (current) |
||
|---|---|---|---|
| Line 270: | Line 270: | ||
| The path is made by a traverse move from the current position to the programmed position, followed by a traverse move to the home position.\\ | The path is made by a traverse move from the current position to the programmed position, followed by a traverse move to the home position.\\ | ||
| If no axis words are programmed, the intermediate point is the current point, so only one move is made. The order of Z depends on its position, if the end position is higher as the current Z position Z will move first, otherwise Z will move last, this is to prevent collision.\\ | If no axis words are programmed, the intermediate point is the current point, so only one move is made. The order of Z depends on its position, if the end position is higher as the current Z position Z will move first, otherwise Z will move last, this is to prevent collision.\\ | ||
| + | \\ | ||
| ==== Input M codes ==== | ==== Input M codes ==== | ||
| M codes of the RS274/NGC language are shown in the following table.\\ | M codes of the RS274/NGC language are shown in the following table.\\ | ||
| - | | | | | + | |M code|Meaning| |
| - | | | | | + | |M0|program stop| |
| - | | | | | + | |M1|optional program stop| |
| - | | | | | + | |M2|program end| |
| - | | | | | + | |M3|turn spindle clockwise| |
| - | | | | | + | |M4|turn spindle counterclockwise| |
| - | | | | | + | |M5|stop spindle turning| |
| - | | | | | + | |M6|tool change| |
| - | | | | | + | |M7|mist coolant on| |
| - | | | | | + | |M8|flood coolant on| |
| - | | | | | + | |M9|mist and flood coolant off| |
| - | | | | | + | |M30|progrma end, spindle and coolants off and rewind.| |
| - | | | | | + | |M48|enable speed and feed overrides.| |
| - | | | | | + | |M49|disable speed and feed overrides.| |
| - | | | | | + | |M90|standard head/ |
| + | |||
| + | == Program Stopping and Ending - M0, M1, M2, M30, M60 == | ||
| + | To halt a running program temporarily, | ||
| + | **M30** for next effects:\\ | ||
| + | • Distance mode is set to MODE_ABSOLUTE (like G90).\\ | ||
| + | • Feed rate mode is set to UNITS_PER_MINUTE (like G94).\\ | ||
| + | • Feed and speed overrides are set to ON (like M48).\\ | ||
| + | • The spindle is stopped (like M5).\\ | ||
| + | • Coolants are turned off (like M9).\\ | ||
| + | • Program is re-winded to the first line, ready for next start.\\ | ||
| + | \\ | ||
| + | Program **M60** instead of M30 if the spindle and coolants should remain ON.\\ | ||
| + | \\ | ||
| + | == Spindle/ | ||
| + | To start the spindle turning clockwise at the currently programmed speed, program M3.\\ | ||
| + | To start the spindle turning counterclockwise at the currently programmed speed, program M4.\\ | ||
| + | To stop the spindle from turning, program M5.\\ | ||
| + | It is OK to use M3 or M4 if the spindle speed is set to zero. If this is done (or if the speed override switch is enabled and set to zero), the spindle will not start turning.\\ | ||
| + | If, later, the spindle speed is set above zero (or the override switch is turned up), the spindle will start turning. It is OK to use M3 or M4 when the spindle is already turning or to use M5 when the spindle is already stopped.\\ | ||
| + | \\ | ||
| + | **__Note: | ||
| + | \\ | ||
| + | == Coolant Control - M7, M8, M9 == | ||
| + | To turn mist coolant on, program M7. To turn flood coolant on, program M8. To turn all coolant off, program M9. It is always OK to use any of these commands, regardless of what coolant is on or off.\\ | ||
| + | \\ | ||
| **Continue to [[: | **Continue to [[: | ||