FluidNC Motor Setup - Longus/FluidNC GitHub Wiki

FluidNC Motor Setup


stepping:

This is an important section for the motors.

  • engine:

    • Type: Enumeration (RMT| TIMED| I2SO_STATIC | I2SO_STREAM)
    • Default: RMT
    • Details: This is the determines the method the steps are generated in firmware. All of your step pins must be compatible with the stepping/engine type you use. The supported types are .
      • RMT This only works with native ESP32 gpio pins.
      • I2SO Types. These must be used with external I2SO hardware. If you use I2SO hardware you must have a valid I2SO definition in your config file.
        • I2SO_STATIC This type is more tightly integrated with the timing of the motion engine
        • I2SO_STREAM is faster. I2SO_STREAM automatically switches to I2SO_STATIC when needed to react precisely to external inputs for things like probing and homing. I2SO_STREAM is generally best for most users.
      • TIMED is not efficient and generally should not be used.
  • idle_ms:

    • Type: Integer
    • Range: 0-255
    • Default: 250
    • Details: After all motion has stopped the motors will be disabled after this many milliseconds. If this value is 0-254, the disable pin signals will activated that many milliseconds after the the last step is completed. 255 means the motors will stay enabled. Most people would typically use 255. Note: You can manually disable the motors at any time with the $MD command ✪ (Ref).
  • pulse_us:

    • Type: Integer
    • Range: 0-10
    • Default: 4
    • Details: This is the duration of the step pulse. Keep in mind that making a long pulse duration will limit the max speed ✪ (Ref).
  • dir_delay_us:

    • Type: Integer
    • Range: 0 -10
    • Default: 0
    • Details: This is the delay needed between a direction change and a step pulse. Many drivers do not need a delay here.
  • disable_delay_us:

    • Type: Integer
    • Range: 0-10
    • Default: 0
    • Details: Some motors need a delay from when they are enabled to when they can take the first step.
  • segments:

    • Type: Integer
    • Range: 6-20
    • Default: 6
    • Details: This sets the number of segment buffers. You should leave this at the default of 6, unless you are trying to fine tune a special application.

Example

stepping:
  engine: I2S_static
  idle_ms: 250
  pulse_us: 2
  dir_delay_us: 1
  disable_delay_us: 0
  segments: 6

Speed Limitations

Step signals are sent as pulses. Each pulse has a duration as described above. The pulse_us is the "on" duration of the pulse. It typically needs an equal "off" duration. Other parameters like dir_delay_us also can contribute to the total duration of each pulse. The absolute maximum number of pulses you can send per second (Hz) is 1/(total pulse time). This has nothing to due with the speed of the processor, it is just math. Realistically the fastest you can go is in the 100kHz-125kHz range. This will be slower if you are using long pulse durations.

The config items that set this rate are steps_per_mm and maximum pulse rate. Here is the equation to find this rate.

(steps_per_mm * (maximum pulse rate) / 60)

Therefore, you can see that **steps_per_mm ** has a big impact. Do not use a larger number than you need, or max speed will suffer. Consider lowering your microstepping to get a lower steps_per_mm.

Some of this math is checked when the config file is loaded. You may get errors if rates are exceeded, you may also get crashes.

The speed of the processor can also come into play if a lot of processor time is required per step. High density laser engraving is one example.

Axes

  • shared_stepper_disable_pin

    • Type: Pin
    • Range: gpio or I2SO
    • Default: NO_PIN
    • Details: This is a pin that is wired to multiple motor drivers (typically all). This toggles with the motor enable/disable feature. You can also assign pins at the individual motor level ✪ (Ref).
  • shared_stepper_reset_pin:

    • Type: Pin
    • Range: gpio or I2SO
    • Default: NO_PIN
    • Details: This is a pin that is wired to multiple motor drivers. This is a feature commonly found on stepstick driver sockets. Currently this only sets the voltage at turn on and it stays that way. You can also assign pins at the individual motor level.

    Example

...