This page is under construction and may not have complete or up-to-date information.

thinkyhead narno2202 dbuezas

M493 - Fixed-Time Motion

2.1.3 motion Enable/disable and configure Fixed-Time Motion and Input Shaping FT_MOTION

Description

The Fixed-Time Motion planner (FTM) is a successor to the Marlin optimized planner. FTM was originally developed by Ulendo.io as an add-on to support their Filtered B-Spline motion solution.

FTM currently supports Cartesian and Core kinematics. It may be extended for Delta in the future. The FT_MOTION feature can be enabled at the same time as Marlin’s integrated ZV Input Shaper, but these features do not share settings. It has its own implementation of Linear Advance (aka Pressure Advance) with its own gain parameter separate from M900.

FTM can be enabled and disabled while the machine is running — and even within a print job if that helps! So if you prefer the integrated ZV Input Shaper for some prints and 2HEI Input Shaping for others you won’t need to re-flash the firmware.

G-code M493 allows you to enable or disable Fixed-Time Motion, change the current Input Shaper mode, and set parameters for its own Linear Advance and Input Shaping.

Input Shaper Tuning

It’s not easy to attach an accelerometer to most printer boards, so Marlin doesn’t provide accelerometor-based tuning. If you have a device that can record acceleration you can use it. But the easiest way to tune Input Shaping is to print a ringing tower that goes through a range of frequencies, then examine the appearance of the ringing tower to choose the best frequencies for each axis.

1. Get the Test Model

Download the Ringing Tower STL which you will slice and use for the print test. For a CoreXY printer you should rotate the model 45 degrees, which isolates the A and B components of the motion system.

2. Prepare the Slicer

Use a slicer that provides custom G-code macros for layer change. For example you can open Kiri:Moto or download Prusa Slicer. If you use Cura you may need to install the Post Processing Plugin from the Cura Marketplace if it is not already installed.

  • In the the Starting G-code enable Fixed-Time Motion with something like:
    M493 S1 XY C2 D0 ; Enable ZVD Input Shaping
    
  • For Kiri:Moto (testing 15Hz to 60Hz):
    • Enable InfillFill TypeVase.
    • Under SetupMachineGcode MacrosLayer add:
      M493 XY A{(layer < 2 ? 0 : 15 + 45.0 * (layer - 2) / 297)} ; (Hz) XY Input Shaping Test
      
  • For Prusa Slicer (testing 15Hz to 60Hz):
    • Enable Spiral vase.
    • Under Printer SettingsAfter layer change G-code add:
      M493 XY A{(layer_num < 2 ? 0 : 15 + 45.0 * (layer_num - 2) / 297)} ; (Hz) XY Input Shaping Test
      
  • In Cura, you’ll first need to add the InputShaping.py file located here to your Cura “scripts” folder. Reopen Cura, enable Spiralize Outer Contour and set Minimum Layer Time to 0. Then go to ExtensionsPost ProcessingModify G-Code. Click Add a script in the window that opens and use the dropdown menu to find Input Shaping. Make sure the Motion planning type dropdown is set to M493. The default frequency settings will let you test a range of 15Hz to 60Hz.
3. Slice and Print

Slice and print the tower using 0.2mm layer height using the highest reasonable speed. When you examine the results it should be obvious where ringing is reduced the most on each axis. To get the Hz value for a given Z height, use the formula:

15 + 45 * (z / 0.2 - 2) / 297
4. Analyze the Result

Measure the height of the best looking layer, divide by the layer height, subtracting two layers. For example:

  • The least X ringing appears at height 20mm. So we calculate 15 + 45 * (20 / 0.2 - 2) / 297 and get a result of 29.84Hz.
  • Send the command M493 X A29.84 to apply the frequency to X motion. (For Y you would use M493 Y A29.84.)

More Resources

TH3D Studio has created an Input Shaper Calculator that you can use to get the Slicer G-code you need and calculate the Hz value based on the best-looking layers.

Dynamic Shaping

Once you have the basic Input Shaping tuned, you may want to do further testing to see how the resonance changes as the Z height increases. Z height can affect the machine resonance whether the bed or the gantry moves in Z due to changes in the center of mass. Tuning according to the changing Z-height is more complicated than just printing a test model, and is best done with an accelerometer. Machine vendors should consider tuning at the factory and provide tuned profile settings for the popular slicers.

Notes

The K factor for FTM Linear Advance is now set with M900 K.

Usage

M493 [A<Hz>] [C<0|1|2|3|4|5|6|7|8>] [D<0|1|2>] [E] [F<scale>] [I<zeta>] [Q<vtol>] [S<0|1>] [T<0|1>] [X] [Y] [Z]

Parameters

[A<Hz>]

Set the Base Frequency for Input Shaping on the specified axes.

    [C<0|1|2|3|4|5|6|7|8>]

    Set the vibration compensator [input shaper] mode for the specified axes.
    NOTE: Users and slicers must remember to set the mode for both X and Y!

    • C0:

      No Input Shaper

    • C1:

      ZV (Zero Vibration)

    • C2:

      ZVD (Zero Vibration and Derivative)

    • C3:

      ZVDD (Zero Vibration, Derivative, and Double Derivative)

    • C4:

      ZVDDD (Zero Vibration, Derivative, Double Derivative, and Triple Derivative)

    • C5:

      EI (Extra-Intensive)

    • C6:

      2HEI (2-Hump Extra-Intensive)

    • C7:

      3HEI (3-Hump Extra-Intensive)

    • C8:

      MZV (Mass-based Zero Vibration)

    [D<0|1|2>]

    Set the Dynamic Frequency mode. (Available when there is a Z axis and/or Extruder to follow.)

    • D0:

      Disabled

    • D1:

      Z-based

    • D2:

      Mass-based

    [E]

    Flag to apply A,C,F,I,Q to the E axis. (If no axis parameters are given then XY is assumed.)

      [F<scale>]

      Set the Frequency Scaling factor for Input Shaping on the specified axes.
      (Available when there is a Z axis and/or Extruder to follow.)

        [I<zeta>]

        Set the Zeta for Input Shaping on the specified axes.

          [Q<vtol>]

          Set the Vibration Tolerance for Input Shaping on the specified axes.

            [S<0|1>]

            Set Fixed-Time Motion mode enabled / disabled.

            • S0:

              Disabled

            • S1:

              Enabled

            [T<0|1>]

            Set the state for Axis Synchronization.

            • T0:

              Disabled

            • T1:

              Enabled

            [X]

            Flag to apply A,C,F,I,Q to the X axis. (If no axis parameters are given then XY is assumed.)

              [Y]

              Flag to apply A,C,F,I,Q to the Y axis. (If no axis parameters are given then XY is assumed.)

                [Z]

                Flag to apply A,C,F,I,Q to the Z axis. (If no axis parameters are given then XY is assumed.)

                  Examples

                  Enable Fixed-Time Motion with Linear Advance gain 0.22

                  M493 S1
                  M900 K0.22

                  Enable Fixed-Time Motion with ZVD Input Shaping on X and Y

                  M493 S1 XY C2 A37 D0
                  M900 K0.18

                  This also sets the IS Frequency to 37Hz for X and Y, disables Dynamic Frequency mode, and enables Linear Advance with a gain of 0.18.