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

    Bed leveling dual Z motor programming

    Scheduled Pinned Locked Moved
    Duet Web Control
    2
    2
    399
    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.
    • hbrownellundefined
      hbrownell
      last edited by

      I have the same bed size they describe in the "Bed levelling using multiple independent Z motors" article,
      ( https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors)
      ... The code looks like the following for config.g

      M584 X0 Y1 Z2:4 E3; two Z motors connected to driver outputs Z and E1
      M671 X-20:220 Y0:0 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
      M208 X-5:205 Y0:200 ; X carriage moves from -5 to 205, Y bed goes from 0 to 200
      ...
      ... Here is the bed.g code
      G28 ; home
      M401 ; deploy Z probe (omit if using bltouch)
      G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
      G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
      M402 ; retract probe (omit if using bltouch)
      ...
      so I'm thinking I'll just copy/paste into my config.g and bed.g files. My question is, where should they go in the file? Should I put them at the top of the "Drive" section?

      My current config.g looks like this (With questioned areas noted);

      ; Drives
      M569 P0 S0 ; Physical drive 0 goes Backwards
      M569 P1 S0 ; Physical drive 1 goes Backwards
      M569 P2 S1 ; Physical drive 2 goes forwards
      M569 P3 S0 ; Physical drive 3 goes forwards

      SHOULD I PUT THE CODE HERE?!

      M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation

      DO I NEED TO CALIBRATE EACH STEPPER MOTOR INDEPENDENTLY?

      M92 X99.9 Y100.1 Z399.6183 E100 ; Set steps per mm
      M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
      M203 X6000.00 Y6000.00 Z4000.00 E1200.00 ; Set maximum speeds (mm/min)
      M201 X500.00 Y500.00 Z20.00 E250.00 ; Set accelerations (mm/s^2)
      M906 X1100.00 Y1100.00 Z1100.00 E1100.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
      M84 S30 ; Set idle timeout

      ; Axis Limits
      M208 X0 Y0 Z0 S1 ; Set axis minima
      M208 X210 Y210 Z200 S0 ; Set axis maxima

      ; Endstops
      M574 X1 Y1 S1 ; Set active high endstops

      ; Z-Probe
      M574 Z1 S2 ; Set endstops controlled by probe
      M307 H3 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
      M558 P9 H5 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
      G31 P500 X34.82 Y-8 Z0.073 ; Set Z probe trigger value, offset and trigger height
      M557 X0:200 Y15:200 S50 ; Define mesh grid

      ; Heaters
      M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
      M143 H0 S120 ; Set temperature limit for heater 0 to 120C
      M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1
      M143 H1 S280 ; Set temperature limit for heater 1 to 280C

      ; Fans
      M106 P0 S0 I0 F500 H T45 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on
      M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

      ; 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

      ; Automatic saving after power loss is not enabled

      ; Custom settings are not configured

      ; Miscellaneous
      M501 ; Load saved parameters from non-volatile memory

      Set idle timeout Same question for the bed.g file.. Thank you! I'm rather hopeful this will solve the extrusion issue and get to printing.

      1 Reply Last reply Reply Quote 0
      • SIamundefined
        SIam
        last edited by

        @hbrownell said in Bed leveling dual Z motor programming:

        ... Here is the bed.g code
        G28 ; home
        M401 ; deploy Z probe (omit if using bltouch)
        G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
        G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
        M402 ; retract probe (omit if using bltouch)
        ...

        if you dont use a bl touch remove the M402

        ; Drives
        M569 P0 S0 ; Physical drive 0 goes Backwards
        M569 P1 S0 ; Physical drive 1 goes Backwards
        M569 P2 S1 ; Physical drive 2 goes forwards
        M569 P3 S0 ; Physical drive 3 goes forwards

        M584 X0 Y1 Z2:4 E3; two Z motors connected to driver outputs Z and E1
        M671 X-20:220 Y0:0 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X

        M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
        DO I NEED TO CALIBRATE EACH STEPPER MOTOR INDEPENDENTLY?
        M92 X99.9 Y100.1 Z399.6183 E100 ; Set steps per mm
        M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
        M203 X6000.00 Y6000.00 Z4000.00 E1200.00 ; Set maximum speeds (mm/min)
        M201 X500.00 Y500.00 Z20.00 E250.00 ; Set accelerations (mm/s^2)
        M906 X1100.00 Y1100.00 Z1100.00 E1100.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
        M84 S30 ; Set idle timeout
        ; Axis Limits
        M208 X0 Y0 Z0 S1 ; Set axis minima
        M208 X210 Y210 Z200 S0 ; Set axis maxima

        M208 X-5:205 Y0:200 ; X carriage moves from -5 to 205, Y bed goes from 0 to 200

        ; Endstops
        M574 X1 Y1 S1 ; Set active high endstops
        ; Z-Probe
        M574 Z1 S2 ; Set endstops controlled by probe
        M307 H3 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
        M558 P9 H5 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
        G31 P500 X34.82 Y-8 Z0.073 ; Set Z probe trigger value, offset and trigger height
        M557 X0:200 Y15:200 S50 ; Define mesh grid
        ; Heaters
        M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
        M143 H0 S120 ; Set temperature limit for heater 0 to 120C
        M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1
        M143 H1 S280 ; Set temperature limit for heater 1 to 280C
        ; Fans
        M106 P0 S0 I0 F500 H T45 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on
        M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
        ; 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
        ; Automatic saving after power loss is not enabled
        ; Custom settings are not configured
        ; Miscellaneous
        M501 ; Load saved parameters from non-volatile memory

        Hypercube-Evolution-Hybrid, Piezo Orion, Orbiter
        Duet WiFi 1.02 or later + DueX5
        RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.0beta4 (2021-09-27 11:30:36)
        Duet WiFi Server: 1.26
        Duet Web Control 3.4.0beta4 (2021-09-27)

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