Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
supported-g-codes [2018/10/18 22:19]
88.186.78.124 [G codes] Typos
supported-g-codes [2019/03/06 22:25] (current)
wolfmanjm
Line 39: Line 39:
 | G38.2 G38.3 | Standard probe commands implemented as documented [[http://​linuxcnc.org/​docs/​2.6/​html/​gcode/​gcode.html#​sec:​G38-probe|here]] | <​kbd>​G38.2 Z-10</​kbd>​| | G38.2 G38.3 | Standard probe commands implemented as documented [[http://​linuxcnc.org/​docs/​2.6/​html/​gcode/​gcode.html#​sec:​G38-probe|here]] | <​kbd>​G38.2 Z-10</​kbd>​|
 | G53,​[[G54]]-G59.3 | use workspace coordinates http://​linuxcnc.org/​docs/​html/​gcode/​coordinates.html and http://​linuxcnc.org/​docs/​html/​gcode/​g-code.html#​gcode:​g54-g59.3 | <​kbd>​G54</​kbd>​ | | G53,​[[G54]]-G59.3 | use workspace coordinates http://​linuxcnc.org/​docs/​html/​gcode/​coordinates.html and http://​linuxcnc.org/​docs/​html/​gcode/​g-code.html#​gcode:​g54-g59.3 | <​kbd>​G54</​kbd>​ |
-| [[G90]] | Absolute mode ( //​default// ​) : passed coordinates will be considered absolute ( relative to 0.0.0 ) (command is modal)| <​kbd>​G90</​kbd>​ | +| [[G90]] | Absolute mode ( //default// ) (command is modal)| <​kbd>​G90</​kbd>​ | 
-| [[G91]] | Relative mode : passed coordinates will be considered relative to the current point (command is modal)| <​kbd>​G91</​kbd>​ |+| [[G91]] | Relative mode (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>​|
 +| G92.4 | manually set homing (MCS) for XYZ  | <​kbd>​G92.4 X0 Y0 Z0</​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 102: Line 103:
 | M361 | Scara Morgan: Move to Theta 90 degree position. Adding P0 will save the current arm position as the Theta 90 degree position | <​kbd>​M361 or M360 P0</​kbd>​ |  | M361 | Scara Morgan: Move to Theta 90 degree position. Adding P0 will save the current arm position as the Theta 90 degree position | <​kbd>​M361 or M360 P0</​kbd>​ | 
 | M364 | Scara Morgan: M364: Move to Psi + Theta 90 degree position. Adding P0 will save the current arm position as the Psi + Theta 90 degree position | <​kbd>​M364 or M344 P0</​kbd>​ |  | M364 | Scara Morgan: M364: Move to Psi + Theta 90 degree position. Adding P0 will save the current arm position as the Psi + Theta 90 degree position | <​kbd>​M364 or M344 P0</​kbd>​ | 
-| M370 | Z grid strategy: clears the ZGrid and the bed levelling is disabled until G32 is run again. ​ ​Specify X and Y values to change grid size | <​kbd>​M370 ​ M370 X9 Y11</​kbd>​ | +| M370 | Z grid strategy: clears the ZGrid and the bed levelling is disabled until G32 is run again. | <​kbd>​M370 ​ M370</​kbd>​ | 
-M371 | Z grid strategy: ​moves the head to the next calibration ​position without saving for manual calibration | <​kbd>​M371</​kbd>​ | +M374 | Z grid strategy: ​save calibration grid| <kbd>M374</​kbd>​ | 
-| M372 | Z grid strategy: move the head to the next calibration position after saving the current probe point to memory - manual calbration ​| <kbd>M372</​kbd>​ | +M375 | Z grid strategy: ​load calibration grid. | <kbd>M375</​kbd>​ | 
-M373 | Z grid strategy: ​completes calibration and enables the Z compensation grid | <​kbd>​M373</​kbd>​ | +| M375.1 display the current ​grid   ​| <​kbd>​M375.1</​kbd>​ | 
-| M374 | Z grid strategy: save calibration grid.  ​optional S parameter saves a custom file with numerical extention ​| <kbd>M374 S123</​kbd>​ | +| M400 | Wait for the queue to be empty and the motors to stop before ​the M400 answers ok | <​kbd>​M400</​kbd>​ |
-| M375 | 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>​ |+
 | 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 124: Line 123:
 | 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>​ |
Line 138: Line 137:
 </​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