Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Solved Bed Levelling with independent Z motors error

    General Discussion
    2
    6
    110
    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.
    • akayoshi
      akayoshi last edited by

      Hi All,

      I'm trying to setup z gantry leveling in a cartesian printer with independent z motors.

      I've read through https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors and I can't seem to get it to work. Can you see any errors in my config.g, bed.g homeall.g which may cause this?

      I'm still working on getting my 3hc board working, but all the z drivers are connected to the main duet3 6hc board.

      I get the following error
      "Error: Number of calibration factors (2) not equal to number of leadscrews (4)."

      config.g

      ; Configuration file for Duet 3 (firmware version 3)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 31 2021 21:23:47 GMT+1100 (Australian Eastern Daylight Time)
      
      ; General preferences
      G90                                                ; send absolute coordinates...
      M83                                                ; ...but relative extruder moves
      M550 P"duet"                                     ; set printer name
      
      ; Network
      M552 P0.0.0.0 S1                                   ; enable network and acquire dynamic address via DHCP
      M586 P0 S1                                         ; enable HTTP
      M586 P1 S0                                         ; disable FTP
      M586 P2 S0                                         ; disable Telnet
      
      ; Drives
      M569 P0.0 S0                                       ; x physical drive 0.0 goes forwards: idex 1
      M569 P0.1 S1                                       ; u physical drive 0.1 goes forward: idex 2
      M569 P0.2 S0                                       ; y physical drive 0.2 goes backwards: y axis
      M569 P0.3 S0                                       ; Z axis 1
      M569 P0.4 S0                                       ;z axis 2 
      M569 P0.5 S1                                       ;Extruder 1
      M569 P1.0 S1                                       ; extruder 2
      
      M584 X0.0 Y0.2  U0.1 Z0.3:0.4 E0.5:1.0                ;  set drive mapping: x connected 0.0, u to 0.1, y 0.2, two z motors, one connected 0.3, the other to 1.0, Two extruders, one to 0.4, second to 0.5
      M671 X-120:440 Y185:185 S1 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
      
      ; Axis Limits
                                
      M208 x-100 u0 y0 z0 s1 ; set axis minima
      m208 x420 u524 y380 z400 s0 ; higher u moves extruder 2 to right
      
      
      M350 X16 U16 Y16 Z16 E16 i1                             ; configure microstepping with interpolation
      M92 X80.00 U80 Y80.00 Z400.00 E394.20:394.2                  ; set steps per mm
      M566 X700.00 U700 Y700.00 Z60.00 E120.00                ; set maximum instantaneous speed changes (mm/min)
      M203 X12000.00 U12000 Y12000.00 Z180.00 E1200.00          ; set maximum speeds (mm/min)
      M201 X1500.00 U1500 Y1500.00 Z20.00 E250.00                ; set accelerations (mm/s^2)                 
      M906 X1000 u1000 Y1000 Z700 E800:800 I30       ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                            ; Set idle timeout
      M911 S21.0 R23.0 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; if voltage drops <21v
      
      
      ; Endstops
      M574 X1 S1 P"io2.in"                               ; configure active-high endstop for low end on X via pin io4.in
      M574 Y1 S1 P"io3.in"                               ; configure active-high endstop for high end on Y via pin io3.in
      M574 U2 S1 P"!io5.in"
      M915 U R0 F0
      M574 Z1 S2                                         ; configure Z-probe endstop for low end on Z
      
      ; Z-Probe
      M950 S0 C"io7.out"                                 ; create servo pin 0 for BLTouch
      M558 P9 C"io7.in" H5 F120 T6000                   ; set Z probe type to bltouch and the dive height + speeds;G31 P500 X-41 Y5 Z2.5                              ; set Z probe trigger value, offset and trigger height
      G31 P500 X32.5, Y-42 z.66 
      M557 X60:420 Y0:330 S50                           ; define mesh grid
      M280 P0 S90
      
      ; Heaters
      
      ;Bed
      M308 S0 P"temp0" Y"thermistor" T100000 B4138       ; configure sensor 0 as thermistor on pin temp0 - Heated BED
      M950 H0 C"out1" T0                                 ; create bed heater output on out2 and map it to sensor 0
      M307 H0 B0 S1.00                                   ; disable bang-bang mode for the bed heater and set PWM limit
      M140 H0                                            ; map heated bed to heater 0
      M143 H0 S120; set temperature limit for heater 0 to 120C
      
      ;Extruder 1
      M308 S1 P"temp1" Y"thermistor" T165000 B4725 c7.06e-8 R2200 ; configure sensor 1 as thermistor on pin temp1 - Extruder 1
      M950 H1 C"out2" T1                                 ; create nozzle heater output on out1 and map it to sensor 1
      M307 H1 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
      M143 H1 S280                                       ; set temperature limit for heater 1 to 280C
      
      ;Extruder 2
      M308 S2 P"temp2" Y"thermistor" T100000 B4725 c7.06e-8 ; configure sensor 1 as thermistor on pin temp1 - Extruder 1
      M950 H2 C"out3" T2                                 ; create nozzle heater output on out1 and map it to sensor 1
      M307 H2 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
      M143 H2 S280                                       ; set temperature limit for heater 1 to 280C
      
      ; Fans
      ; Extruder 1 - part fan
      M950 F0 C"out7" Q500                               ; create fan 0 on pin out7 and set its frequency
      m106 p0 s0 ; set fan 0 value. Thermostatic control is turned on
      
      ; Extruder 2 - hot end fan
      M950 F1 c"out8" Q500
      m106 p1 s1 h2										; Extruder 2 - part fan
      
      ;Part fan
      M950 F2 c"out9" q500								; create fan 1 on pin out8 and set its frequency
      M106 P2 S0 
      
      ; Custom settings are not defined
      ;''' Tool configuration section of config.g'''
      
      ;''' Create a tool that uses the low end (X) carriage'''
      M563 P0 S"Extuder A" D0 H1 F0            ; tool 0 uses extruder 0, heater 1 and fan 0
      G10 P0 X0 Y0 Z0 S0 R0       ; set tool 0 offsets and temperatures
      M591 P1 C"io4.in" S1 D0 ; filament monitor connected to E0 endstop
      M591 P2 C"io1.in" S1 D1 
      ;''' Create a tool that uses the high end (U) carriage'''
      M563 P1 S"Extruder B" D1 H2 X3 F3         ; tool 1 uses extruder 1, heater 2, fan 2, and maps X to U
      
      G10 P1 Y2.5 U0 Z7.9 S0 R0 ;adjusts extrude 2 offset.  larger number, the closer to bed, larger y moves to front
      M671 X80:460:460:80 Y300:300:-35:-35 P0.5
      
      ; Miscellaneous
      M501                                               ; load saved parameters from non-volatile memory
      M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z2.7 E-5 F1000" ; set voltage thresholds and actions to run on power loss
      M207 S2.0 F2400 Z.6
      M929 s1
      
      
      

      bed.g

      ; bed.g
      ; called to perform automatic bed compensation via G32
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 31 ;2021 21:23:47 GMT+1100 (Australian Eastern Daylight Time)
      
      G28; home
      ;M401 ; deploy Z probe
      G30 P0 X80 Y150 Z-99999 ; probe near an adjusting screw
      G30 P1 X460 Y150 Z-99999 s2; probe near an adjusting screw
      ;M402 ; retract probe
      
      

      homeall.g

      M400
      ;M913 x70  ; drop motor current to 70%
      
      M400 G91; relative positioning
      
      G1 H2 Z10 F12000 ; lift Z relative to current position
      
      G1 H1 x-520.5 F8000 ; move quickly to X axis endstop and stop there (first pass)
      
      G1 H2 x5 F12000 ; go back a few mm
      
      G1 H1 x-520.5 F7000 ; move slowly to X axis endstop once more (second pass)
      
      G1 H2 Z-10 F6000 ; lower Z again
      
      G90 ; absolute positioning
      
      M400
      
      ;M913 U70  ; drop motor current to 70%
      
      M400 G91; relative positioning
      
      G1 H2 Z10 F6000 ; lift Z relative to current position
      
      G1 H1 U520.5 F8000 ; move quickly to X axis endstop and stop there (first pass)
      
      G1 H2 U-5 F12000 ; go back a few mm
      
      G1 H1 U520.5 F7000 ; move slowly to X axis endstop once more (second pass)
      
      G1 H2 Z-10 F6000 ; lower Z again
      
      G90 ; absolute positioning
      
      M400
      
      ;M913 U100 ; return current to 100%
      
      
      ;G91              ; relative positioning
      ;G1 H2 Z5 F6000   ; lift Z relative to current position
      ;G1 H1 Y-455 F1800 ; move quickly to Y axis endstop and stop there (first pass)
      ;G1 H2 Y5 F6000  ; go back a few mm
      ;G1 H1 Y0 F360  ; move slowly to Y axis endstop once more (second pass)
      ;G1 H2 Z-5 F6000  ; lower Z again
      ;G90              ; absolute positioning
      G91              ; relative positioning
      G1 H2 Z5 F6000   ; lift Z relative to current position
      G1 H1 Y-455 F1800 ; move quickly to Y axis endstop and stop there (first pass)
      G1 H2 Y5 F6000  ; go back a few mm
      G1 H1 Y0 F360  ; move slowly to Y axis endstop once more (second pass)
      G1 H2 Z-5 F6000  ; lower Z again
      
      G90              ; absolute positioning
      G91              ; relative positioning
      G1 H2 Z5 F6000   ; lift Z relative to current position
      G90              ; absolute positioning
      ;G1 X56 Y10 F6000 ; go to first probe point
      ;g28 u
      G1 X225 Y130 F6000
      ;G30 s2   
      g30
      G1 x -98
      ;g10 l2 p1 u0 y2.2 z-.86
      ;g10 l2 p1 u0 y-6 z11.5
      
      
      

      M122

      9/3/2021, 10:34:54 AM	M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (standalone mode)
      Board ID: 08DJM-956L2-G43S8-6J1D6-3S46T-KU2QF
      Used output buffers: 3 of 40 (36 max)
      === RTOS ===
      Static ram: 150904
      Dynamic ram: 93228 of which 336 recycled
      Never used RAM 106868, free system stack 152 words
      Tasks: NETWORK(ready,27.1%,230) ETHERNET(notifyWait,0.2%,117) HEAT(notifyWait,0.0%,325) Move(notifyWait,0.0%,284) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,362) CanClock(delaying,0.0%,333) TMC(notifyWait,8.0%,93) MAIN(running,63.7%,1110) IDLE(ready,1.0%,29), total 100.0%
      Owned mutexes:
      === Platform ===
      Last reset 00:11:17 ago, cause: software
      Last software reset at 2021-09-03 10:23, reason: User, GCodes spinning, available RAM 106868, slot 1
      Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
      Error status: 0x00
      Step timer max interval 154
      MCU temperature: min 46.5, current 46.8, max 47.8
      Supply voltage: min 23.7, current 23.8, max 23.9, under voltage events: 0, over voltage events: 0, power good: yes
      12V rail voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0
      Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/12/12, gc cycles 0
      Driver 0: position 34200, standstill, reads 22842, writes 21 timeouts 0, SG min/max 0/282
      Driver 1: position 15360, standstill, reads 22841, writes 22 timeouts 0, SG min/max 0/328
      Driver 2: position 2264, standstill, reads 22845, writes 19 timeouts 0, SG min/max 0/553
      Driver 3: position 41920, standstill, reads 22845, writes 19 timeouts 0, SG min/max 0/88
      Driver 4: position 0, standstill, reads 22845, writes 19 timeouts 0, SG min/max 0/107
      Driver 5: position 0, standstill, reads 22850, writes 14 timeouts 0, SG min/max 0/0
      Date/time: 2021-09-03 10:34:54
      Slowest loop: 16.20ms; fastest: 0.05ms
      === Storage ===
      Free file entries: 9
      SD card 0 detected, interface speed: 25.0MBytes/sec
      SD card longest read time 7.7ms, write time 2.3ms, max retries 0
      === Move ===
      DMs created 125, maxWait 20881ms, bed compensation in use: none, comp offset 0.000
      === MainDDARing ===
      Scheduled moves 21, completed moves 21, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
      === AuxDDARing ===
      Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
      === Heat ===
      Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
      === GCodes ===
      Segments left: 0
      Movement lock held by null
      HTTP is idle in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon is idle in state(s) 0
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      Code queue is empty.
      === Filament sensors ===
      Extruder 0 sensor: ok
      === CAN ===
      Messages queued 6086, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 49 (min 48), ts 3388/0/0
      Tx timeouts 0,5,3387,5,0,2685 last cancelled message type 4514 dest 127
      
      === Network ===
      Slowest loop: 50.62ms; fastest: 0.02ms
      Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
      HTTP sessions: 1 of 8
      - Ethernet -
      State: active
      Error counts: 0 0 0 0 0
      Socket states: 5 2 2 2 2 0 0 0
      
      fcwilt 1 Reply Last reply Reply Quote 0
      • fcwilt
        fcwilt @akayoshi last edited by

        @akayoshi

        Perhaps the s2 must be S2?

        Frederick

        Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

        akayoshi 1 Reply Last reply Reply Quote 0
        • akayoshi
          akayoshi @fcwilt last edited by

          @fcwilt
          Thanks fcwilt. the error still persists with the capital S.

          fcwilt 2 Replies Last reply Reply Quote 0
          • fcwilt
            fcwilt @akayoshi last edited by

            @akayoshi said in Bed Levelling with independent Z motors error:

            @fcwilt
            Thanks fcwilt. the error still persists with the capital S.

            Well it was a long shot at best since nothing else jumped out.

            Must be missing something. I'll take another look.

            Frederick

            Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

            1 Reply Last reply Reply Quote 0
            • fcwilt
              fcwilt @akayoshi last edited by

              @akayoshi

              Ah... there it is.

              You have a second M671 at line 105 of the config file list which is specifying 4 lead screws.

              Frederick

              Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

              akayoshi 1 Reply Last reply Reply Quote 1
              • akayoshi
                akayoshi @fcwilt last edited by

                @fcwilt You sir are a scholar! Thank you.

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