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/12/03 17:50]
wolfmanjm [G codes]
supported-g-codes [2019/05/21 13:09] (current)
wolfmanjm [G codes]
Line 38: Line 38:
 | G32 | Uses Z probe to calibrate delta endstops and arm radius, use R parameter to select only arm radius calibration and E to select only endstop calibration. I to set target precision, J to set probe_radius,​ K to keep current endstop trim settings. ​ In Zgrid module, it starts the grid probing | <​kbd>​G32 - G32 R - G32 E - G32 EK - G32 I0.02</​kbd>​ | | G32 | Uses Z probe to calibrate delta endstops and arm radius, use R parameter to select only arm radius calibration and E to select only endstop calibration. I to set target precision, J to set probe_radius,​ K to keep current endstop trim settings. ​ In Zgrid module, it starts the grid probing | <​kbd>​G32 - G32 R - G32 E - G32 EK - G32 I0.02</​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>​| | 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 | Must be on a line by itself OR the first G code on a linethe directly following G0/G1 will be executed in MCS coordinates | <​kbd>​G53 G0 X0 Y0</​kbd>​ | 
-| [[G90]] | Absolute mode ( //​default// ​) : passed coordinates will be considered absolute ( relative to 0.0.0 ) (command is modal)| <​kbd>​G90</​kbd>​ | +[[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>​ | 
-| [[G91]] | Relative mode : passed coordinates will be considered relative to the current point (command is modal)| <​kbd>​G91</​kbd>​ |+| [[G90]] | Absolute mode ( //default// ) (command is modal)| <​kbd>​G90</​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>​ |
 | [[M5]] | Stops the spindle Only if spindle module is enabled.| <​kbd>​M5</​kbd>​ | | [[M5]] | Stops the spindle Only if spindle module is enabled.| <​kbd>​M5</​kbd>​ |
 +| M7 | Starts the mist switch for CNC (Need to create a switch called : switch.mist.enable).| <​kbd>​M7</​kbd>​ |
 +| M8 | Starts the flood switch for CNC (Need to create a switch called : switch.flood.enable).| <​kbd>​M8</​kbd>​ |
 +| M9 | Stops the mist and flood at same time (like LinuxCNC and GRBL).| <​kbd>​M9</​kbd>​ |
 | M17 | Enable stepper motors | <​kbd>​M17</​kbd>​ | | M17 | Enable stepper motors | <​kbd>​M17</​kbd>​ |
 | M18 | Disable stepper motors. With a parameter it will disable that stepper motor A will disable extruder 1 B will disable extruder 2. E0 will disable the currently selected extruder | <​kbd>​M18</​kbd>​ <​kbd>​M18 X0</​kbd>​ <​kbd>​M18 E0</​kbd>​ | | M18 | Disable stepper motors. With a parameter it will disable that stepper motor A will disable extruder 1 B will disable extruder 2. E0 will disable the currently selected extruder | <​kbd>​M18</​kbd>​ <​kbd>​M18 X0</​kbd>​ <​kbd>​M18 E0</​kbd>​ |
Line 102: Line 107:
 | 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>​ | +
-| 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.1 | display the current grid   | <​kbd>​M375.1</​kbd>​ | | M375.1 | display the current grid   | <​kbd>​M375.1</​kbd>​ |
-| M400 | Wait for the queue to be empty before ​answering "​OK" ​| <​kbd>​M400</​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 139: Line 141:
 </​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