Skip to content

Conversation

@DerAndere1
Copy link
Contributor

@DerAndere1 DerAndere1 commented Dec 9, 2025

Description

  • This is similar to the recent feedrate mode PR but works with segmentation (kinematics / bed leveling).
  • Add option FEEDRATE_MODE_SUPPORT. When this option is enabled, the following G-codes are supported:
  • G93 (inverse time mode): Feedrate (Value of the F word) is specified in strokes per minute.
  • G94 (units per minute feedrate mode (default)

Background:

So far, Marlin only supported feedrate specified in units per minute (G94). Marlin uses the LinuxCNC definition of feedrate (

/**
* Calculate distance for feedrate interpretation in accordance with NIST RS274NGC interpreter - version 3) and its default CANON_XYZ feed reference mode.
* Assume:
* - X, Y, Z are the primary linear axes;
* - U, V, W are secondary linear axes;
* - A, B, C are rotational axes.
*
* Then:
* - dX, dY, dZ are the displacements of the primary linear axes;
* - dU, dV, dW are the displacements of linear axes;
* - dA, dB, dC are the displacements of rotational axes.
*
* The time it takes to execute a move command with feedrate F is t = D/F,
* plus any time for acceleration and deceleration.
* Here, D is the total distance, calculated as follows:
*
* D^2 = dX^2 + dY^2 + dZ^2
* if D^2 == 0 (none of XYZ move but any secondary linear axes move, whether other axes are moved or not):
* D^2 = dU^2 + dV^2 + dW^2
* if D^2 == 0 (only rotational axes are moved):
* D^2 = dA^2 + dB^2 + dC^2
*/
). Feedrate in units per minute is not very intuitive if more than 3 axes are involved. Thus, G93 inverse time mode is usually preferred for multi-axis machining.

Example:

G90 ; absolute positioning
G1 X0 Y0 ; move to X0 Y0
G93 ; inverse time mode
G1 X10 F60 ; this move takes 1/60 minutes, i.e. 1 second
G1 X5 F60 ; this move takes in 1/60 minutes, i.e. 1 second
G1 X10 F10 ; this move takes 1/10 minutes, i.e.  6 seconds

Caveats:

  • Currently, fixed time motion (FT_MOTION) will not work correctly when G93 inverse time mode is active.
  • in G93 mode, each move will be completed in ((1/F) minutes + time for acceleration + time for deceleration).

Requirements

#define FEEDRATE_MODE_SUPPORT

Benefits

Support for G93 inverse time feedrate mode. This mode is preferred in multi-axis machining.

Configurations

Enable this new option in the default Configuration.h:
#define FEEDRATE_MODE_SUPPORT

Related Issues

@DerAndere1 DerAndere1 force-pushed the feedrate_mode branch 3 times, most recently from 7437b60 to 65d27fa Compare December 13, 2025 20:11
@DerAndere1 DerAndere1 force-pushed the feedrate_mode branch 7 times, most recently from 1bf0309 to d9a8b68 Compare December 15, 2025 18:49
@DerAndere1 DerAndere1 force-pushed the feedrate_mode branch 3 times, most recently from 8755325 to 5318831 Compare December 18, 2025 00:56
@DerAndere1 DerAndere1 force-pushed the feedrate_mode branch 4 times, most recently from adc710e to 38ac715 Compare December 18, 2025 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant