Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Steps/mm not being automatically adjusted when changing microstepping

    Scheduled Pinned Locked Moved
    General Discussion
    2
    4
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kelchmundefined
      kelchm
      last edited by

      I'm running into an odd issue when changing to anything other the 16x microstepping. It seems like the automatic adjustment of the M92 parameters is not working.

      I've done the following:
      1. Ensured that my M92 command follows the M350 command
      2. Ensured that I'm not just losing steps (the distance traveled is a multiple of the microstepping (1/2 as far for 32x, 1/4 as far for 64x, etc…)

      Here is an excerpt

      [[language]]
      ; Configuration file for Duet WiFi (firmware version 1.17)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool on Sat May 27 2017 15:46:30 GMT-0400 (EDT)
      
      ; General preferences
      M111 S0 ; Debugging off
      G21 ; Work in millimetres
      G90 ; Send absolute coordinates...
      M83 ; ...but relative extruder moves
      M555 P2 ; Set firmware compatibility to look like Marlin
      M208 X0 Y0 Z0 S1 ; Set axis minima
      M208 X250 Y250 Z250 S0 ; Set axis maxima
      
      ; Endstops
      M574 Z0 S0 ; Define active low and unused microswitches
      M574 X1 Y2 S1 ; Define active high microswitches
      M558 P0 X0 Y0 Z1 H5 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the probe + travel speeds
      G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
      M557 X15:235 Y15:235 S20 ; Define mesh grid
      
      ; Drives
      M569 P0 S1 ; Drive 0 (x) goes forwards
      M569 P1 S0 ; Drive 1 (Y) goes backwards
      M569 P2 S0 ; Drive 2 (Z) goes backwards
      M569 P3 S1 ; Drive 3 (E) goes forwards
      M350 X64 Y64 Z16 E16 I1 ; Configure microstepping with interpolation
      M92 X80 Y80 Z2020 E96 ; Set steps per mm
      M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
      M203 X6000 Y6000 Z180 E1200 ; Set maximum speeds (mm/min)
      M201 X500 Y20 Z250 E250 ; Set accelerations (mm/s^2)
      M906 X800 Y1200 Z600 E1000 I30 ; Set motor currents (mA) and motor idle factor in per cent
      M84 S30 ; Set idle timeout
      
      ; Heaters
      M143 S270 ; Set maximum heater temperature to 270C
      M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
      M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
      M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1
      
      ; Tools
      M563 P0 D0 H1 ; Define tool 0
      G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
      G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C
      
      ; Network
      M550 PPrintrbot Metal Plus ; Set machine name
      ...
      M586 P0 S1 ; Enable HTTP
      M586 P1 S0 ; Disable FTP
      M586 P2 S0 ; Disable Telnet
      
      ; Fans
      M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
      M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
      M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on
      
      ; Custom settings are not configured
      
      
      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        The way that the automatic adjustment works is that when you run M350, the current steps/mm is adjusted to take account of the change in microstepping. When you run M92 the values you provide are assumed to be correct for the current microstepping. Therefore, if you use M350 first and then M92, then if you change the microstepping in M350 you need to also change the M92 values. Or you can use M92 first, using values appropriate for the default x16 microstepping, then when you subsequently use M350 the steps/mm will be adjusted automatically.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • kelchmundefined
          kelchm
          last edited by

          dc42, this is the section of the documentation that threw me for a loop:

          The M92 commands to set steps/mm must come after any M350 command to set microstepping. This is because when you change microstepping, the steps/mm are automatically adjusted to take account of the change in microstepping.

          https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_Cartesian_printer

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            Thanks for pointing that out. I have updated the text, and I hope it is clearer now.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA