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

    Crazy Height Map

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    3
    17
    716
    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.
    • mikeatfhcundefined
      mikeatfhc
      last edited by

      ; homeall.g - 2/19/22
      ; called to home all axes
      ;

      ; BLTouch prep so we don't catch the probe pin on the edge of the bed
      ;
      M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
      M402 ; Retract probe just in case it's down

      ; Home XY for Z homing
      ;
      G91 ; relative positioning
      G1 Z3 F200 S2 ; Lower bed 5mm to ensure it is below the switch trigger height
      M913 X50 Y50 ; set X Y motors to 50% of their normal current for homing
      G1 S1 X-375 Y305 F4000 ; course home X or Y
      G1 S1 X-375 F4000 ; course home X
      G1 S1 Y305 F4000 ; course home Y
      G1 X2 Y-2 F1000 ; move away from the endstops
      G1 S1 X-10 F200 ; fine home X
      G1 S1 Y10 F200 ; fine home Y
      M913 X100 Y100 ; set X Y motors to 100% of their normal current

      ; Z homing section follows
      ;
      G90 ; absolute positioning
      G1 X186 Y97 F4000 ; Move x and Y axis over to bed center so probe is on top of bed - old G1 X150 Y100 F4000

      ; Set lower speeds for homing
      M566 Z5 ; Set maximum instantaneous speed changes (mm/min) (Jerk)
      M203 Z400 ; Set maximum speeds (mm/min)
      M201 Z100 ; Set maximum accelerations (mm/s^2)

      ; Probe the bed
      ;
      M558 A1 F350 ; Set single probing at faster feed rate
      G30 ; Do a single probe to home our Z axis
      M558 A10 F100 ; Set tripple probing at slower feed rate
      G30 ; Probe again to get a more accurate position

      ; Set normal speeds again
      M566 Z70 ; Set maximum instantaneous speed changes (mm/min) (Jerk)
      M203 Z600 ; Set maximum speeds (mm/min)
      M201 Z300 ; Set maximum accelerations (mm/s^2)

      ; Move X and Y back Home
      ;
      G1 X0 Y200

      1 Reply Last reply Reply Quote 0
      • mikeatfhcundefined
        mikeatfhc @Phaedrux
        last edited by

        ; homez.g - 2/19/22
        ; called to home the Z axis
        ;

        ; BLTouch prep so we don't catch the probe pin on the edge of the bed
        ;
        M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
        M402 ; Retract probe just in case it's down

        ; Drop the bed for travel
        ;
        G91 ; Relative positioning
        G1 Z5 F200 S2 ; Lower bed 5mm to ensure it is below the trigger height

        ; Move probe into position
        ;
        G90 ; absolute positioning
        G1 X186 Y97 F4000 ; Move x and Y axis over to bed center so probe is on top of bed

        ; Set lower speeds for homing
        ;
        M566 Z5 ; Set maximum instantaneous speed changes (mm/min) (Jerk)
        M203 Z400 ; Set maximum speeds (mm/min)
        M201 Z100 ; Set maximum accelerations (mm/s^2)

        ; Probe the bed
        ;
        M558 A1 F350 ; Set single probing at faster feed rate
        G30 ; Do a single probe to home our Z axis
        M558 A10 F100 ; Set tripple probing at slower feed rate
        G30 ; Probe again to get a more accurate position

        ; Set normal speeds again
        ;
        M566 Z70 ; Set maximum instantaneous speed changes (mm/min) (Jerk)
        M203 Z600 ; Set maximum speeds (mm/min)
        M201 Z300 ; Set maximum accelerations (mm/s^2)

        ; Uncomment the following lines to lift Z after probing
        G91 ; relative positioning
        G1 S2 Z5 F100 ; lift Z relative to current position
        G90 ; absolute positioning

        1 Reply Last reply Reply Quote 0
        • mikeatfhcundefined
          mikeatfhc @Phaedrux
          last edited by

          ; bed.g 2/19/22
          ; called to perform automatic bed compensation via G32
          ;
          M561 ; clear any bed transform
          G28 ; home all axes
          ; Probe the bed at 3 points
          ;
          G30 P0 X10 Y20 Z-99999 ;Probe near a leadscrew - 3 steppers for z - 2/16/22
          G30 P1 X150 Y190 Z-99999 ;Probe near a leadscrew
          G30 P2 X270 Y20 Z-99999 S3 ;Probe near a leadscrew, calibrate 3 motors
          G1 X150 Y100 Z5

          1 Reply Last reply Reply Quote 0
          • mikeatfhcundefined
            mikeatfhc @Phaedrux
            last edited by

            @phaedrux M122.docx

            Word file of my M122 results attached.

            mikeatfhcundefined 1 Reply Last reply Reply Quote 0
            • mikeatfhcundefined
              mikeatfhc @mikeatfhc
              last edited by Phaedrux

              Not sure if that made it - here is a PDF of my M122 results.
              M122.pdf

              2/20/2022, 2:07:29 PM M122
              === Diagnostics ===
              RepRapFirmware for Duet 2 WiFi/Ethernet version 2.05.1 running on Duet WiFi 1.02 or later + DueX5
              Board ID: 08DGM-917DA-G4MSD-6J1FA-3SN6N-TSTM9
              Used output buffers: 3 of 24 (20 max)
              === RTOS ===
              Static ram: 25712
              Dynamic ram: 93736 of which 328 recycled
              Exception stack ram used: 544
              Never used ram: 10752
              Tasks: NETWORK(ready,628) HEAT(blocked,1232) DUEX(suspended,160) MAIN(running,1664)
              IDLE(ready,160)
              Owned mutexes:
              === Platform ===
              Last reset 00:08:24 ago, cause: power up
              Last software reset at 2022-02-20 13:33, reason: User, spinning module GCodes, available RAM 10832
              bytes (slot 1)
              Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP
              0xffffffff Task 0x4e49414d
              Error status: 0
              Free file entries: 10
              SD card 0 detected, interface speed: 20.0MBytes/sec
              SD card longest block write time: 5.9ms, max retries 0
              MCU temperature: min -2.2, current 5.7, max 5.9
              Supply voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0, over voltage events: 0, power
              good: yes
              Driver 0: standstill, SG min/max 0/514
              Driver 1: standstill, SG min/max 0/531
              Driver 2: standstill, SG min/max 0/315
              Driver 3: standstill, SG min/max not available
              Driver 4: standstill, SG min/max not available
              Driver 5: standstill, SG min/max 0/328
              Driver 6: standstill, SG min/max 0/368
              Driver 7: standstill, SG min/max not available
              Driver 8: standstill, SG min/max not available
              Driver 9: standstill, SG min/max not available
              Date/time: 2022-02-20 14:07:26
              Cache data hit count 1530116153
              Slowest loop: 137.92ms; fastest: 0.06ms
              I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
              === Move ===
              Hiccups: 0, FreeDm: 160, MinFreeDm: 155, MaxWait: 55658ms
              Bed compensation in use: mesh, comp offset 0.000
              === DDARing ===
              Scheduled moves: 152, completed moves: 152, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
              === Heat ===
              Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
              Heater 1 is on, I-accum = 0.0
              === GCodes ===
              Segments left: 0
              Stack records: 3 allocated, 0 in use
              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
              serial is idle in state(s) 0
              aux is idle in state(s) 0
              daemon is idle in state(s) 0
              queue is idle in state(s) 0
              autopause is idle in state(s) 0
              Code queue is empty.
              === Network ===
              Slowest loop: 23.40ms; fastest: 0.00ms
              Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
              HTTP sessions: 1 of 8
              - WiFi -
              Network state is running
              WiFi module is connected to access point
              Failed messages: pending 0, notready 0, noresp 0
              WiFi firmware version 1.21
              WiFi MAC address cc:50:e3:0d:1b:de
              WiFi Vcc 3.38, reset reason Turned on by main processor
              WiFi flash size 4194304, free heap 16440
              WiFi IP address 192.168.0.108
              WiFi signal strength -60dBm, reconnections 0, sleep mode modem
              Socket states: 0 0 0 0 0 0 0 0
              
              1 Reply Last reply Reply Quote 0
              • mikeatfhcundefined
                mikeatfhc @Phaedrux
                last edited by

                @phaedrux said in Crazy Height Map:

                Can you post the results of M122 and M98 P"config.g"
                Also your entire config.g and homing files. Your bed.g and mesh.g. And any other macros that get called.

                I don't have a 'mesh.g' file

                1 Reply Last reply Reply Quote 0
                • mikeatfhcundefined
                  mikeatfhc @Phaedrux
                  last edited by

                  @phaedrux - For the heck of it...

                  ; homex.g - 2/19/22
                  ; called to home the X axis
                  ;

                  ; BLTouch prep so we don't catch the probe pin on the edge of the bed
                  ;
                  M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
                  M402 ; Retract probe just in case it's down

                  G91 ; relative positioning
                  G1 Z5 F6000 S2 ; lift Z relative to current position
                  M913 X50 ; set X motors to 50% of their normal current for homing
                  G1 S1 X-375 F4000 ; move quickly to X axis endstop and stop there (first pass)
                  G1 X2 F1000 ; go back a few mm
                  G1 S1 X-10 F200 ; move slowly to X axis endstop once more (second pass)
                  M913 X100 ; set X motors to 100% of their normal current; homex.g
                  G1 Z-5 F6000 S2 ; lower Z again
                  G90 ; absolute positioning

                  1 Reply Last reply Reply Quote 0
                  • mikeatfhcundefined
                    mikeatfhc @Phaedrux
                    last edited by

                    @phaedrux - And finally...

                    ; homey.g - 2/19/22
                    ; called to home the Y axis
                    ;
                    ; BLTouch prep so we don't catch the probe pin on the edge of the bed
                    ;
                    M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
                    M402 ; Retract probe just in case it's down
                    G91 ; relative positioning
                    G1 Z5 F6000 S2 ; lift Z relative to current position
                    M913 Y50 ; set Y motors to 50% of their normal current for homing
                    G1 S1 Y305 F4000 ; move quickly to Y axis endstop and stop there (first pass)
                    G1 Y-2 F1000 ; go back a few mm
                    G1 S1 Y10 F200 ; move slowly to Y axis endstop once more (second pass)
                    M913 Y100 ; set Y motors to 100% of their normal current
                    G1 Z-5 F6000 S2 ; lower Z again
                    G90 ; absolute positioning

                    1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator
                      last edited by

                      Often times the reason for auto leveling to produce bazarre results is that the order of the points for the steppers defined in M671 doesn't match the order of the drivers defined for Z in M584. this causes the firmware to move the wrong steppers than expected.

                      https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_auto_levelling

                      You must use the M671 command to define the X and Y coordinates of the leadscrews. The M671 command must come after the M584 command and must specify the same number of X and Y coordinates as the number of motors assigned to the Z axis in the M584 command; and these coordinates must be in the same order as the driver numbers of the associated motors in the M584 command. The M671 command must also come after any M667 or M669 command.

                      So take a look at that and confirm.

                      M584 X0 Y1 Z2:5:6 E4

                      M671 X-45:170:342 Y35:250:35 S10

                      Another way to test is to manually level the bed so that it's starting with a very flat plane. Then run your bed.g and see if it makes any adjustments. Run bed.g a few more times and see if the adjustments are getting worse with each run. That indicates it's not adjusting the right motor.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      mikeatfhcundefined 1 Reply Last reply Reply Quote 0
                      • mikeatfhcundefined
                        mikeatfhc @Phaedrux
                        last edited by

                        It took a couple of reads for me to grasp what you were saying here, but after the lightbulb went off - it was obvious that the firmware didn't know which lead screw to adjust if they were not in the expected order in M584.

                        Checked my wiring... sure enough the wires to the stepper drivers were out of order - I needed 2:5:6. Swapped the wires, problem solved immediately.

                        I ran the G32 routine a few times and the differences in height became smaller indicating its working perfectly now. I re-ran my Mesh and got this height map and these results from G32 in my console.TBL Fixed Console Capture 2-21-22.JPG Hieght Map 2  2-21-22.JPG

                        Now I am off to the races. I am so glad I bought a Duet.

                        Thanks for the help Phaedrux.

                        1 Reply Last reply Reply Quote 1
                        • Phaedruxundefined Phaedrux marked this topic as a question
                        • Phaedruxundefined Phaedrux has marked this topic as solved
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA