Gcode used for either: * Tool Temperature Setting * Set workplace coordinate offset or tool offset * Retract
Back to the Gcode Dictionary
G10: Tool Temperature Setting
Note that this use of G10 may be deprecated in a future version of RRF, although it will remain available for a substantial time. It will be replaced with M568 which can already be used for temperature setting in firmware 3.3beta2 and later.
This form of the G10 command is recognised by having a P combined with at least an R or S parameter.
- G10 Pnnn Rnnn Snnn
- Pnnn Tool number
- Rnnn Standby temperature(s)
- Snnn Active temperature(s)
The tool must be created with M563 before it is referenced with this command.
G10 P1 R140 S205 ;set standby and active temperatures for tool 1
Remember that any parameter that you don't specify will automatically be set to the last value for that parameter.
The R value is the standby temperature in oC that will be used for the tool, and the S value is its operating temperature. If you don't want the tool to be at a different temperature when not in use, set both values the same.
Temperatures set with G10 do not wait for the heaters to reach temp before proceeding. In order to wait for the temp use a M116 command after the G10 to wait for temps to be reached.
See the T code (select tool) below. In tools with multiple heaters the temperatures for them all are specified thus: R100.0:90.0:20.0 S185.0:200.0:150.0 .
G10: Set workplace coordinate offset or tool offset
This form of the G10 command is recognised by having either or both of the L and P parameters. Supported on the Duet 2 series and later Duets.
- Ln (Default L1) Mode (see below)
- Pnnn Tool number (default: current tool) if L=1, coordinate system number (default: current coordinate system) if L=2 or L=20.
- Xnnn X offset
- Ynnn Y offset
- U,V,Wnnn U, V and W axis offsets1
- Znnn Z offset2
- L=1: this sets the tool offset, as if the L parameter was not present
- L=2: this sets the origin of the coordinate system number specified by the P parameter (1 to 9) to the specified X, Y, X... values
- L=20: this is similar to L=2 except that the origin is specified relative to the current position of the tool.
1Tool offsets are applied after any X axis mapping has been performed. Therefore if for example you map X to U in your M563 command to create the tool, you should specify a U offset not an X offset. If you map X to both X and U, you can specify both offsets.
2It's usually a bad idea to put a non-zero Z value in as well unless the tools are loaded and unloaded by some sort of tool changer or are on independent carriages. When all the tools are in the machine at once they should all be positioned at the same Z height to avoid a lower tool colliding with the object while a higher tool is printing.
Tool offsets are given as the offset of the nozzle relative to the print head reference point, so the signs are opposite to what you might expect because tool offsets are subtracted from the required printing locations during printing.
Any parameter that you don't specify will automatically be set to the last value for that parameter. That usually means that you want explicitly to set Z0.0. RepRapFirmware will report the tool parameters if only the tool number is specified.
See also M585.
Tool Offset Examples
G10 P2 X17.8 Y-19.3 Z0.0 ;sets the offset for tool 2 to the X, Y, and Z values specified G10 L1 P2 X17.8 Y-19.3 Z0.0 ;sets the offset for tool 2 to the X, Y, and Z values specified
Coordinate Offset Example
Suppose the current machine coordinates are
and you want to make this the origin (i.e. X=0, Y=0, Z=0) of the second coordinate system (accessible via G55) then there are two options:
- G10 L2 P2 X110 Y110 Z20
- G10 L20 P2 X0 Y0 Z0
The first example will set offsets to be subtracted from the current machine coordinates.
The second example will set the coordinates of the current position in the specified coordinate system directly.
If this command refers to any axes other than X, Y and Z then it must appear later in config.g than the M584 command that creates those additional axes.
This form of the G10 command is recognised by having no parameters.
- (no parameters in the RepRapFirmware implementation)
Retracts filament then performs any zlift/hop according to settings of M207.
RepRapFirmware recognizes G10 as a command to set tool offsets and/or temperatures if the P parameter is present, and as a retraction command if it is absent.