G90 G-code
G90 means “all moves starting now are in absolute coordinates”.
This means positions are given relative to the 0,0,0 point of the current workspace coordinate system, and not relative to the current position (which is what G91 does).
When Smoothie starts, G90 is the default mode.
However, it is common to still add the command at the beginning of G-code files.
G90’s evil twin is G91.
The command is used as such:
G90
Which means: starting now all positions are absolute.
G90 ; Standard G90 (subcode 0, default)
G90.0 ; Explicit subcode notation (equivalent to G90)
Which means: starting now all positions are absolute. V2 supports explicit subcode notation (G90.0) but only subcode 0 is valid.
Parameters
No parameters.
Subcode
V1 does not support subcodes. G90 is always interpreted as absolute mode.
V2 Subcode Support:
- 0: Standard absolute positioning mode (default if no subcode specified)
- Other values: Not supported; returns an error if specified
This design allows for future extensions (e.g., G90.1, G90.2) while maintaining compatibility with existing code.
Implementation Details
V1 Implementation:
- Sets both
absolute_mode and e_absolute_mode to true
- Affects X, Y, Z axes AND extruder (E axis)
- Coordinates are interpreted as absolute positions in the current workspace coordinate system
- Workspace offsets (G54-G59, G92, tool offset) are still applied
- Modal command (remains active until changed by G91 or M83)
V2 Implementation:
- Sets both
absolute_mode and e_absolute_mode to true (same as V1)
- Includes subcode validation: only subcode 0 is accepted
- Returns an error for invalid subcodes instead of silently accepting them
- Affects X, Y, Z axes AND extruder (E axis)
- Coordinates are interpreted as absolute positions in the current workspace coordinate system
- Workspace offsets (G54-G59, G92, tool offset) are still applied
- Modal command (remains active until changed by G91 or M83)
Further reading
These resources are used as references for Gcode:
See also: G91 (Relative positioning mode)