Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
supported-g-codes [2018/07/08 22:32] 76.28.254.55 Fixed typo in example for M143 |
supported-g-codes [2019/01/29 22:51] (current) arthur [Additional Codes] |
||
---|---|---|---|
Line 20: | Line 20: | ||
| [[G10]] | Do firmware extruder retract | <kbd>G10</kbd> | | | [[G10]] | Do firmware extruder retract | <kbd>G10</kbd> | | ||
| [[G11]] | Do firmware extruder un-retract | <kbd>G11</kbd> | | | [[G11]] | Do firmware extruder un-retract | <kbd>G11</kbd> | | ||
- | | G10 L2 G10 L20 | set workspace coordinates http://linuxcnc.org/docs/html/gcode/coordinates.html and http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g10-l2| <kbd>G10 L2 P1 X0</kbd> | | + | | G10 L2 G10 L20 | Set workspace coordinates http://linuxcnc.org/docs/html/gcode/coordinates.html and http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g10-l2| <kbd>G10 L2 P1 X0</kbd> | |
| [[G17]] | Select XYZ plane (command is modal)| <kbd>G17</kbd> | | | [[G17]] | Select XYZ plane (command is modal)| <kbd>G17</kbd> | | ||
| [[G18]] | Select XZY plane (command is modal)| <kbd>G18</kbd> | | | [[G18]] | Select XZY plane (command is modal)| <kbd>G18</kbd> | | ||
Line 31: | Line 31: | ||
| G28.3 | Manual Homing - This allows you to set a home position manually without moving to limit switches | <kbd>G28.3</kbd> | | | G28.3 | Manual Homing - This allows you to set a home position manually without moving to limit switches | <kbd>G28.3</kbd> | | ||
| G28.4 | Manual Homing based on actuator position- This allows you to set a home position manually based on actuator position (used for rotary delta) | <kbd>G28.4</kbd> | | | G28.4 | Manual Homing based on actuator position- This allows you to set a home position manually based on actuator position (used for rotary delta) | <kbd>G28.4</kbd> | | ||
- | | G28.5 | clears the homed flag for the specified axis, or all if not specifed | <kbd>G28.5</kbd> <kbd>G28.5 Z0</kbd> | | + | | G28.5 | Clears the homed flag for the specified axis, or all if not specifed | <kbd>G28.5</kbd> <kbd>G28.5 Z0</kbd> | |
- | | G28.6 | shows the homing status of each axis | <kbd>G28.6</kbd> | | + | | G28.6 | Shows the homing status of each axis | <kbd>G28.6</kbd> | |
+ | | G29 | Probes the bed and outputs the bed heights depending on levelling strategy selected, see [[ZProbe]] | <kbd>G29</kbd> | | ||
| [[G30]] | Simple Z probe at current XY, reports distance moved down until probe triggers. optional F parameter defines the speed of probing, zprobe.slow_feedrate is used when not supplied | <kbd>G30 - G30 F100</kbd> | | | [[G30]] | Simple Z probe at current XY, reports distance moved down until probe triggers. optional F parameter defines the speed of probing, zprobe.slow_feedrate is used when not supplied | <kbd>G30 - G30 F100</kbd> | | ||
| G31 | Depends on levelling strategy selected, see [[ZProbe]] | <kbd>G31</kbd> | | | G31 | Depends on levelling strategy selected, see [[ZProbe]] | <kbd>G31</kbd> | | ||
Line 41: | Line 42: | ||
| [[G91]] | Relative mode : passed coordinates will be considered relative to the current point (command is modal)| <kbd>G91</kbd> | | | [[G91]] | Relative mode : passed coordinates will be considered relative to the current point (command is modal)| <kbd>G91</kbd> | | ||
| [[G92]] | Set global workspace coordinate system to specified coordinates http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g92 | <kbd>G92 X0 Y0 Z0</kbd> | | | [[G92]] | Set global workspace coordinate system to specified coordinates http://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g92 | <kbd>G92 X0 Y0 Z0</kbd> | | ||
- | | G92.1 | clear the G92 and G30 Znnn offsets | <kbd>G92.1</kbd>| | + | | G92.1 | Clear the G92 and G30 Znnn offsets | <kbd>G92.1</kbd>| |
|= M-Code |= Description |= | | |= M-Code |= Description |= | | ||
| [[M3]] | Starts the spindle. Only if spindle module is enabled. The S parameter sets the speed in rotations per minute | <kbd>M3 S5000</kbd> | | | [[M3]] | Starts the spindle. Only if spindle module is enabled. The S parameter sets the speed in rotations per minute | <kbd>M3 S5000</kbd> | | ||
Line 67: | Line 68: | ||
| M107 | Turn fan OFF | <kbd>M107</kbd> | | | M107 | Turn fan OFF | <kbd>M107</kbd> | | ||
| M109 | Set Extruder Temperature and Wait - S<temperature> | <kbd>M109 S190</kbd> | | | M109 | Set Extruder Temperature and Wait - S<temperature> | <kbd>M109 S190</kbd> | | ||
- | | M110 | Set current line number -N<line number> | <kbd>M110 N123</kbd> | | + | | M110 | Set current line number -N<line number> | <kbd>N123 M110</kbd> | |
| M112 | Halt all operations, turn off heaters, go into Halt state | | | | M112 | Halt all operations, turn off heaters, go into Halt state | | | ||
| M114 | Show current position of all axes, XYZ will be the last requested position | <kbd>M114</kbd> | | | M114 | Show current position of all axes, XYZ will be the last requested position | <kbd>M114</kbd> | | ||
Line 89: | Line 90: | ||
| M205 | X<junction deviation> Z<z junction deviation> S<minimum planner speed>, Z junction deviation only applies to z only moves, 0 disables junction deviation for Z, -1 uses global junction deviation | <kbd>M205 X0.05 S30.0</kbd> | | | M205 | X<junction deviation> Z<z junction deviation> S<minimum planner speed>, Z junction deviation only applies to z only moves, 0 disables junction deviation for Z, -1 uses global junction deviation | <kbd>M205 X0.05 S30.0</kbd> | | ||
| M206 | Set homing offsets | <kbd>M206 X10 Y3 Z0.5</kbd> | | | M206 | Set homing offsets | <kbd>M206 X10 Y3 Z0.5</kbd> | | ||
- | | M207 | set retract length S[[positive|mm]] F[[feedrate|mm/min]] Z[[additional|zlift/hop]] Q[[zlift|feedrate mm/min]] | <kbd>M207 S4 F30 Z1</kbd> | | + | | M207 | Set retract length S[[positive|mm]] F[[feedrate|mm/min]] Z[[additional|zlift/hop]] Q[[zlift|feedrate mm/min]] | <kbd>M207 S4 F30 Z1</kbd> | |
- | | M208 | set retract recover length S[[positive|mm surplus to the M207 S*]] F[[feedrate|mm/min]] | <kbd>M208 S0 F8</kbd> | | + | | M208 | Set retract recover length S[[positive|mm surplus to the M207 S*]] F[[feedrate|mm/min]] | <kbd>M208 S0 F8</kbd> | |
| M220 | S<factor in percent>- set speed factor override percentage | <kbd>M220 S50</kbd> | | | M220 | S<factor in percent>- set speed factor override percentage | <kbd>M220 S50</kbd> | | ||
| M221 | S<flow rate factor in percent>- set flow rate factor override percentage for current extruder| <kbd>M221 S50</kbd> | | | M221 | S<flow rate factor in percent>- set flow rate factor override percentage for current extruder| <kbd>M221 S50</kbd> | | ||
Line 107: | Line 108: | ||
| M374 | Z grid strategy: save calibration grid. optional S parameter saves a custom file with numerical extention | <kbd>M374 S123</kbd> | | | M374 | Z grid strategy: save calibration grid. optional S parameter saves a custom file with numerical extention | <kbd>M374 S123</kbd> | | ||
| M375 | Z grid strategy: load calibration grid. optional S Parameter loads a pre saved custom grid | <kbd>M375 S123</kbd> | | | M375 | Z grid strategy: load calibration grid. optional S Parameter loads a pre saved custom grid | <kbd>M375 S123</kbd> | | ||
- | | M400 | Wait for the queue to be empty before answering "OK" | <kbd>M400</kbd> | | + | | M375.1 | display the current grid | <kbd>M375.1</kbd> | |
+ | | M400 | Wait for the queue to be empty and the motors to stop before the M400 answers ok | <kbd>M400</kbd> | | ||
| M407 | Get filament detector information | <kbd>M407</kbd> | | | M407 | Get filament detector information | <kbd>M407</kbd> | | ||
| M500 | Save some volatile settings to an override file | <kbd>M500</kbd> | | | M500 | Save some volatile settings to an override file | <kbd>M500</kbd> | | ||
Line 115: | Line 117: | ||
| M504 | Save the settings to an override file with specified extension| <kbd>M504 test1</kbd> - saves to config-override.test1 | | | M504 | Save the settings to an override file with specified extension| <kbd>M504 test1</kbd> - saves to config-override.test1 | | ||
| M557 | Defines probe points | <kbd>M557 P1 X30 Y40.5</kbd> | | | M557 | Defines probe points | <kbd>M557 P1 X30 Y40.5</kbd> | | ||
- | | M561 | clears the plane and the bed leveling is disabled until G32 is run again | <kbd>M561</kbd> | | + | | M561 | Clears the plane and the bed leveling is disabled until G32 is run again | <kbd>M561</kbd> | |
- | | M565 | defines the probe offsets from the nozzle or tool head | <kbd>M565 X3 Y4.5 Z-2.37</kbd> | | + | | M565 | Defines the probe offsets from the nozzle or tool head | <kbd>M565 X3 Y4.5 Z-2.37</kbd> | |
| M600 | Suspend print in progress (use M601 to continue) | | | | M600 | Suspend print in progress (use M601 to continue) | | | ||
| M601 | Resume suspended print | | | | M601 | Resume suspended print | | | ||
Line 123: | Line 125: | ||
| M670 | ZProbe feedrates Slow/fast(K)/Return (mm/sec) max_z (mm) height (mm) | <kbd>M670 S5.00 K100.00 R0.00 Z357.55 H5.00</kbd> | | | M670 | ZProbe feedrates Slow/fast(K)/Return (mm/sec) max_z (mm) height (mm) | <kbd>M670 S5.00 K100.00 R0.00 Z357.55 H5.00</kbd> | | ||
| M906 | Set Current in milliamp for SPI drivers, only if the driver is handled by the motorcontrol module | <kbd>M906 A1000 B1100</kbd> | | | M906 | Set Current in milliamp for SPI drivers, only if the driver is handled by the motorcontrol module | <kbd>M906 A1000 B1100</kbd> | | ||
- | | M907 | Set Current control via digipot for each axis (current in amps) | <kbd>M907 X1.0 Y1.0 Z1.0 E1.5</kbd> | | + | | M907 | Set Current control via digipot for each axis (current in amps) | <kbd>M907 X1.0 Y1.0 Z1.0 A1.5</kbd> | |
| M909 | Set microsteps (1/n), ONLY for advanced drivers handled by motordriver module, M909.1 will also set the steps/mm accordingly | <kbd>M909 A16 B64</kbd> | | | M909 | Set microsteps (1/n), ONLY for advanced drivers handled by motordriver module, M909.1 will also set the steps/mm accordingly | <kbd>M909 A16 B64</kbd> | | ||
- | | M910.x | setup advanced driver chips that support SPI setup, parameters are specific to each chip see chip docs | <kbd>M910</kbd> | | + | | M910.x | Setup advanced driver chips that support SPI setup, parameters are specific to each chip see chip docs | <kbd>M910</kbd> | |
| M957 | (with Spindle module enabled) Report the current spindle speed and PWM value | <kbd>M957</kbd> | | | M957 | (with Spindle module enabled) Report the current spindle speed and PWM value | <kbd>M957</kbd> | | ||
| M958 | (with Spindle module enabled) Report the current spindle PID parameters. <kbd>M958 Px.xx Ix.xx Dx.xx</kbd> will set them (to save the new values, you need to edit config file manually). | <kbd>M958 P0.1</kbd> | | | M958 | (with Spindle module enabled) Report the current spindle PID parameters. <kbd>M958 Px.xx Ix.xx Dx.xx</kbd> will set them (to save the new values, you need to edit config file manually). | <kbd>M958 P0.1</kbd> | | ||
Line 137: | Line 139: | ||
</code> | </code> | ||
</callout> | </callout> | ||
+ | == Additional Codes | ||
+ | The Smoothieware configuration file permits the association of additional codes with some tool functions. For example, for a [[switch|Switch module]], you can specify an arbitrary command in the 'input_on_command' and 'input_off_command'. This means that some additional codes may be available, depending on your specific configuration file. | ||
+ | |||
+ | For example, if you are using servos, then you will likely have configured the following commands: | ||
+ | |= G-Code |= Description |= Example | | ||
+ | | M280 | Move servo to S<position> where position is 0-100| M280 S20 ; move servo to position 20 = 20% duty cycle | | ||
+ | | M281 | Turn off servo | M281 ; Same as M280 S0 0% duty cycle, effectively off | | | ||
+ | |||
+ | Additionally, in your configuration, you can assign sub-commands to deal with multiple tools of the same type, for example: | ||
+ | |||
+ | |= G-Code |= Description | | ||
+ | | M280.1 | Move your first servo | | ||
+ | | M280.2 | Move your second servo | | | ||
== Tool change | == Tool change |