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

    Bed tramming "issues"

    Scheduled Pinned Locked Moved Unsolved
    Firmware installation
    3
    7
    329
    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.
    • Exerqtorundefined
      Exerqtor
      last edited by Exerqtor

      So I've been using a loop within bed.g to check if the performed tram is within my wanted "margin" in terms of deviation and it's been working flawlessly up until about half year or so ago.

      The loop checks for if the deviation is within "spec" and if not it tries to tram again another 4 times, and if it's still not good it aborts. And it allways just ran one pass and that was well within my set spec of 0.030mm.

      However about 6months ago (I THINK it started in conjunction with me doing some structural changes to the bed/bed kinematics) it started to give varying results. Some times it clears within margin the first pass, but others it simply won't. I've even upped the allowed deviation to 0.050mm to see if that mitigated the issue, but it still persists. And the weird thing is, that the higher i upped the allowed deviation, so resulting deviation followed accordingly?

      Example 1:

      Let's say when i have 0.030mm in allowed deviation, the coarse tramming pass would yeld a result of say 0.028mm deviaton (it's set up to do a coarse pass first with a much higher dive height to get the bed roughly trammed incase I've messed with the stepper etc). Then the fine pass will (allmost) allways yeld a slightly higher value of lets say 0.032-0.036. And it will maybe be able to adjust that in to within 0.031mm for one pass. But since that's still above the threshold it will try again and next result will allways be above 0.031mm. It ends with the tram aborting due to max number off iterations.

      And then if i power toggle the printer, and try again some times it goes by with flying colors with a deviation of maybe 0.015-0.025. Other times i will have to try power toggeling 4-5 times before it manages to pass it..

      So naturally i tried upping the allowed deviation, first too 0.040mm hoping that it would be high enough, but then it starts getting deviations just like in "Example1" jusst with 0.04"someting"mm in results. And if i then try to up it to 0.050mm it's just the same, it yelds 0.05"someting"mm in results.

      I'm starting to think i might have my leadscrew locations/M671 mapped out wrong or something so the "math" don't add up and RRF don't quite know what to doo about it.

      Could the behaviour i'm experiencing be a result of wrong leadscrew locations?

      And on the topic of leadscrew coordinates, which points is the correct ones to use in a Voron Trident (or similar stup)? With three Z axis and a pivot point ofset from the leadscrews?

      Should we use the leadscrew locations as input, or the pivot point input? Or should we calculate ion of the midpoint between them to make RRF's calculations correct?


      EDIT:

      It might seem strange/unlikely that I've been having this issue for half a year and not bothering to try fixing it before now. So just to touch on that right quick, it's because once my bed have been trammed it simply don't need re-tramming unless i have to restart the printer or anything like that. But now i figgured it was finally time to sort it out.

      Duet 3 Mini running RRF 3.5b4 standalone

      Exerqtorundefined 1 Reply Last reply Reply Quote 0
      • Exerqtorundefined
        Exerqtor @Exerqtor
        last edited by

        Here is a a example of how it behaves, tried running a tram earlier today (bed at 110C % hotend at 150C)

        10.6.2023, 10:23:32	Leadscrew adjustments made: -0.004 -0.002 -0.003, points used 4, (mean, deviation) before (-0.003, 0.056) after (0.000, 0.056)
        10.6.2023, 10:23:20	Leadscrew adjustments made: -0.005 -0.006 0.001, points used 4, (mean, deviation) before (-0.004, 0.058) after (0.000, 0.058)
        10.6.2023, 10:23:06	Leadscrew adjustments made: 0.006 0.000 -0.002, points used 4, (mean, deviation) before (0.002, 0.057) after (0.000, 0.057)
        10.6.2023, 10:22:53	M292 R{0} S4
        Leadscrew adjustments made: -0.098 -0.094 -0.091, points used 4, (mean, deviation) before (-0.095, 0.057) after (0.000, 0.057)
        10.6.2023, 10:22:53	G32
        Leadscrew adjustments made: -0.098 -0.094 -0.091, points used 4, (mean, deviation) before (-0.095, 0.057) after (0.000, 0.057)
        10.6.2023, 10:22:18	Leadscrew adjustments made: 0.001 -0.012 -0.003, points used 4, (mean, deviation) before (-0.004, 0.059) after (0.000, 0.058)
        Bed tramming aborted! - Pass Limit Reached!
        10.6.2023, 10:22:05	Leadscrew adjustments made: -0.004 -0.000 -0.001, points used 4, (mean, deviation) before (-0.002, 0.062) after (0.000, 0.062)
        10.6.2023, 10:21:50	Leadscrew adjustments made: -0.002 -0.003 -0.005, points used 4, (mean, deviation) before (-0.003, 0.062) after (-0.000, 0.062)
        10.6.2023, 10:21:37	Leadscrew adjustments made: -0.003 -0.002 -0.002, points used 4, (mean, deviation) before (-0.002, 0.061) after (0.000, 0.061)
        10.6.2023, 10:21:24	Leadscrew adjustments made: -0.004 0.001 -0.005, points used 4, (mean, deviation) before (-0.003, 0.062) after (0.000, 0.062)
        10.6.2023, 10:21:12	Leadscrew adjustments made: 0.001 -0.005 -0.011, points used 4, (mean, deviation) before (-0.004, 0.062) after (-0.000, 0.062)
        10.6.2023, 10:20:57	M292 R{0} S1
        Leadscrew adjustments made: -0.102 -0.115 -0.098, points used 4, (mean, deviation) before (-0.104, 0.056) after (0.000, 0.056)
        10.6.2023, 10:20:57	G32
        Leadscrew adjustments made: -0.102 -0.115 -0.098, points used 4, (mean, deviation) before (-0.104, 0.056) after (0.000, 0.056)
        

        I power toggeled before that second pass could finish since i knew how it would pan out anyways, and this is how it responded after the "reboot":

        10.6.2023, 10:25:29	Leadscrew adjustments made: 0.004 0.000 -0.004, points used 4, (mean, deviation) before (0.001, 0.049) after (0.000, 0.049)
        10.6.2023, 10:25:15	M292 R{0} S1
        Leadscrew adjustments made: -0.106 -0.052 -0.129, points used 4, (mean, deviation) before (-0.097, 0.056) after (-0.000, 0.046)
        10.6.2023, 10:25:15	G32
        Leadscrew adjustments made: -0.106 -0.052 -0.129, points used 4, (mean, deviation) before (-0.097, 0.056) after (-0.000, 0.046)
        

        Some times when i run a tram it ends up with a deviation of 0.015-0,020mm as well, si the nubmers aren't static.

        Exerqtorundefined 1 Reply Last reply Reply Quote 0
        • Exerqtorundefined
          Exerqtor @Exerqtor
          last edited by Exerqtor

          @Exerqtor
          I thought I had found the issue, but with the new pivot point coordinates it's pumping out worse deviation results than ever before 🤦‍♂️
          Until i change to probing 3 points, rather than 4.

          I don't know if i was drunk or what, when i wrote down my original leadscrew/pivot point locations, but anywho this is what it WAS:

          M671 X175:388:-38 Y411.6:-2.5:-2.5 S10                                         ; Pivot point locations (Rear, Right, Left) 
          

          And what they should be (measured with digital calipers on the printer so they should be within reasonable margin of error):

          M671 X175:362:-49 Y390:12:12 S10                                               ; Pivot point locations (Rear, Right, Left) 
          

          Anywhoooo, when i deploy those coordinates and run a G32 this is what it spews out (110C/150C bed/hotend):
          (This is with a 0.050mm allowed deviation)

          11.6.2023, 11:52:20	Leadscrew adjustments made: -0.002 0.000 -0.003, points used 4, (mean, deviation) before (-0.002, 0.061) after (0.000, 0.061)
          Bed tramming aborted! - Pass Limit Reached!
          11.6.2023, 11:52:07	Leadscrew adjustments made: -0.002 0.000 -0.001, points used 4, (mean, deviation) before (-0.001, 0.061) after (0.000, 0.061)
          11.6.2023, 11:51:54	Leadscrew adjustments made: -0.005 0.002 0.003, points used 4, (mean, deviation) before (-0.001, 0.062) after (-0.000, 0.062)
          11.6.2023, 11:51:41	Leadscrew adjustments made: -0.009 0.001 -0.011, points used 4, (mean, deviation) before (-0.007, 0.061) after (0.000, 0.061)
          11.6.2023, 11:51:27	Leadscrew adjustments made: -0.007 -0.009 -0.008, points used 4, (mean, deviation) before (-0.008, 0.064) after (0.000, 0.064)
          11.6.2023, 11:51:14	Leadscrew adjustments made: -0.005 -0.006 -0.003, points used 4, (mean, deviation) before (-0.005, 0.061) after (-0.000, 0.061)
          11.6.2023, 11:51:00	M292 R{0} S2
          Leadscrew adjustments made: -0.111 -0.108 -0.066, points used 4, (mean, deviation) before (-0.099, 0.063) after (0.000, 0.060)
          11.6.2023, 11:51:00	G32
          Leadscrew adjustments made: -0.111 -0.108 -0.066, points used 4, (mean, deviation) before (-0.099, 0.063) after (0.000, 0.060)
          

          So i thought i might give it a go with moving over to probing 3 points rather than 4, since it's a 3 point pivot and hey, that made RRF happier!
          (This is with a 0.005mm allowed deviation)

          11.6.2023, 12:12:21	Leadscrew adjustments made: -0.005 0.000 -0.006, points used 3, (mean, deviation) before (-0.003, 0.002) after (-0.000, 0.000)
          11.6.2023, 12:12:10	Leadscrew adjustments made: 0.003 -0.011 -0.005, points used 3, (mean, deviation) before (-0.005, 0.005) after (0.000, 0.000)
          11.6.2023, 12:11:59	Leadscrew adjustments made: 0.009 -0.113 0.013, points used 3, (mean, deviation) before (-0.037, 0.050) after (-0.000, 0.000)
          11.6.2023, 12:11:48	M292 R{0} S1
          Leadscrew adjustments made: -3.247 1.784 3.041, points used 3, (mean, deviation) before (0.780, 2.414) after (-0.000, 0.000)
          11.6.2023, 12:11:48	G32
          Leadscrew adjustments made: -3.247 1.784 3.041, points used 3, (mean, deviation) before (0.780, 2.414) after (-0.000, 0.000)
          

          Probing with 3 points however results in less straight printsurface, if we look at these two mesh maps.
          4 probing points during tramming:
          alt text
          3 probing points during tramming:
          alt text
          This is on a Fermio bed btw. (so it should be straight).

          I might be wrong, but shouldn't RRF be able to use 4 probe points on a 3-point pivot?

          oliofundefined dc42undefined 2 Replies Last reply Reply Quote 0
          • oliofundefined
            oliof @Exerqtor
            last edited by

            @Exerqtor the idea with 3 point on a 3 point bed is to adjust the leadscrews according to the measurement close to them. I don't see what it would do with the fourth point ...

            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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

              @Exerqtor said in Bed tramming "issues":

              I might be wrong, but shouldn't RRF be able to use 4 probe points on a 3-point pivot?

              Yes, you can use as many probe points as you wish up the the supported limit (32 on most Duets AFAIR). RRF will adjust the leadscrews so that the predicted effect of the adjustments minimises the sum of the least squares of the errors.

              Relative to the height maps you posted, where are the three leadscrews located?

              Please post your 4-point bed.g file.

              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

              Exerqtorundefined 2 Replies Last reply Reply Quote 0
              • Exerqtorundefined
                Exerqtor @dc42
                last edited by

                @dc42
                Thats what i thought!

                The screws are located center rear, left front and rear front (X/Y 0 being refered to as front left). With the pivot points being offset the leadscrews by a couple mm.

                I'm at work atm, but i'll post them as soon as i get home!

                1 Reply Last reply Reply Quote 0
                • Exerqtorundefined
                  Exerqtor @dc42
                  last edited by

                  @dc42
                  Ok here we go

                  ; bed.g  v3.1
                  ; Called as response to G32, as part of a full mesh probing (M98 P"bed.g" B) or at the start of a print (M98 P"bed.g" A)
                  ; Used to tram the bed
                  
                  ;---/
                  ; -/--/--/--/--/--/--/--/--/--/--/--/--/-a-/--/--/--
                  ; THIS MACRO ONLY WORKS WITH RRF 3.5.0b1 AND LATER!!
                  ;--/--/--/--/--/--/--/--/--/--/--/--/--/--/--/--/--
                  ;-/
                  
                  ; ====================---------------------------------------------------------
                  ; Question code
                  ; ====================
                  
                  if !exists(global.bed_trammed)
                    set global bed_trammed = false
                  
                  var tram = "PLACEHOLDER"
                  
                  if exists(param.A)||exists(param.B)
                    if global.bed_trammed = false
                      set var.tram = true
                    else
                      set var.tram = false
                      
                  ; Ask to make sure you want to tram the bed or not    
                  if !exists(param.A)||exists(param.B)
                    if global.bed_trammed
                      M291 S4 R"Bed tramming" P"The bed is allready trammed, want to tram it again?" K{"YES","CANCEL",}
                    else
                      M291 S4 R"Bed tramming" P"Are you sure you want to tram the bed?" K{"YES","CANCEL",}
                      
                    if input = 0
                      set var.tram = true
                    elif input = 1 
                      set var.tram = false
                      
                  if var.tram = true
                    ; ====================---------------------------------------------------------
                    ; Prep phase
                    ; ====================
                  
                    ; Report whats going on
                    M291 R"Bed tramming" P"Please wait..." T10                                   ; Tramming bed message
                  
                    ; ====================---------------------------------------------------------
                    ; Lower Z axis
                    ; ====================
                  
                    ; Lower Z relative to current position if needed
                    if !move.axes[2].homed                                                       ; If Z ain't homed
                      G91                                                                        ; Relative positioning
                      G1 Z{global.Nozzle_CL} F9000 H1                                            ; Lower Z(bed) relative to current position	
                      G90                                                                        ; Absolute positioning
                  
                    elif move.axes[2].userPosition < {global.Nozzle_CL}                          ; If Z is homed and less than global.Nozzle_CL
                      G1 Z{global.Nozzle_CL} F9000                                               ; Move to Z global.Nozzle_CL
                  
                    ; ====================---------------------------------------------------------
                    ; Homing check
                    ; ====================
                  
                    ; Make sure all axes are homed, and home Z again anyways
                    if !move.axes[0].homed || !move.axes[1].homed                                ; If X & Y axes aren't homed
                      ; Home X & Y axis
                      M98 P"/sys/homex.g" Z A                                                    ; Home X axis, pass param.Z since we allready lowered Z & A to indicate this is part of a homing sequence
                      M98 P"/sys/homey.g" Z C                                                    ; Home Y axis, pass param.Z since we allready lowered Z & C since XY currents/speeds are also ok
                  
                    ; ====================
                    ; Home Z axis
                    ; ====================
                    if !exists(param.A)
                      M98 P"/sys/homez.g" Z A                                                    ; Home Z axis, pass param.Z since we allready lowered Z & A to indicate this is part of a homing sequence
                  
                    ; ====================---------------------------------------------------------
                    ; Tramming code
                    ; ====================
                  
                    M561                                                                         ; Clear any bed transform
                    M290 R0 S0                                                                   ; Reset baby stepping
                    M84 E0                                                                       ; Disable extruder stepper
                  
                    ; Lower XY currents
                    if fileexists("/sys/lib/current/xy_current_low.g")
                      M98 P"/sys/lib/current/xy_current_low.g" C60                               ; Set low XY currents
                    else
                      M913 X40 Y40                                                               ; Set X Y motors to 40% of their max current
                    ; Lower Z currents
                    if fileexists("/sys/lib/current/z_current_low.g")
                      M98 P"/sys/lib/current/z_current_low.g"                                    ; Set low Z currents
                    else
                      M913 Z60                                                                   ; Set Z motors to 50% of their max current
                      
                    ; LED status
                    if exists(global.sb_leds)
                      set global.sb_leds = "tramming"
                  
                    ; Save the default probe settings
                    var dH = sensors.probes[0].diveHeight
                    var spd0 = sensors.probes[0].speeds[0]
                    var spd1 = sensors.probes[0].speeds[1]
                    var maxP = sensors.probes[0].maxProbeCount
                  
                    ; Coarse tramming pass
                    M558 K0 H10 F800 A1                                                          ; Increase the depth range & speed, gets the bed mostly trammed immediately
                    M98 P"/sys/bed_probe_points.g"                                               ; Probe the bed
                  
                    ; Fine tramming pass
                    while true
                      ; Probe near lead screws -
                      M558 K0 H{var.dH} F{var.spd0, var.spd1} A{var.maxP}                        ; Reset default probe settings
                      M98 P"/sys/bed_probe_points.g"                                             ; Probe the bed
                  
                      ; Check results - exit loop if results are good
                      if move.calibration.initial.deviation < 0.005                              ; If probing result is less than 0.005mm
                        set global.bed_trammed = true                                            ; Set global state
                        break                                                                    ; Stop probing
                  
                      ; Check pass limit - abort if pass limit reached
                      if iterations = 5                                                          ; If probed more than 5 times
                        M291 P"Bed tramming aborted!" R"Pass Limit Reached!"                     ; Abort probing, something wrong
                        set global.bed_trammed = false                                           ; Set global state
                        abort "Bed tramming aborted! - Pass Limit Reached!"                      ; Abort probing, something wrong
                  
                    ; ====================---------------------------------------------------------
                    ; Finish up
                    ; ====================
                  
                    ; Uncomment the following lines to lower Z(bed) after probing
                    G90                                                                          ; Absolute positioning
                    G1 Z{global.Nozzle_CL} F2400                                                 ; Move to Z global.Nozzle_CL
                  
                  
                    ; Home Z one last time now that the bed is trammed
                    ; LED status
                    if exists(global.sb_leds)
                    set global.sb_leds = "homing"
                    
                    M98 P"/sys/lib/goto/bed_center.g"                                            ; Move to bed center
                    G30 K0 Z-99999                                                               ; Probe the center of the bed
                    M400                                                                         ; Wait for moves to finish
                  
                  
                    ; Full currents
                    if fileexists("/sys/lib/current/xy_current_high.g")
                      M98 P"/sys/lib/current/xy_current_high.g"                                  ; Set high XY currents
                    else
                      M913 X100 Y100                                                             ; Set X Y motors to var.100% of their max current
                    if fileexists("/sys/lib/current/z_current_high.g")
                      M98 P"/sys/lib/current/z_current_high.g"                                   ; Set high Z currents
                    else
                      M913 Z100                                                                  ; Set Z motors to var.100% of their max current
                  
                    ; Uncomment the following lines to lower Z(bed) after probing
                    G90                                                                          ; Absolute positioning
                    G1 Z5 F2400                                                                  ; Move to Z 10
                  
                    M291 R"Bed tramming" P"Done" T5                                              ; Bed tramming done message
                  
                    ; If using Voron TAP, report that probing is completed
                    if exists(global.TAPPING)
                      set global.TAPPING = false
                      M402 P0                                                                    ; Return the hotend to the temperature it had before probing
                  
                    ; LED status
                    if exists(global.sb_leds)
                      set global.sb_leds = "ready"
                  

                  And the two variants of bed_probe_points.g

                  ; bed_probe_points.g
                  ; called to define probing points when traming the bed
                  
                  if !exists(param.A)
                    M98 P"/sys/lib/goto/bed_center.g"                                            ; Move to bed center
                  
                  G30 K0 P0 X5 Y345 Z-99999                                                      ; Probe left rear bed corner
                  G30 K0 P1 X345 Y345 Z-99999                                                    ; Probe right rear bed corner
                  G30 K0 P2 X345 Y5 Z-99999                                                      ; Probe right front bed corner
                  G30 K0 P3 X5 Y5 Z-99999 S3                                                     ; Probe left front bed corner and calibrate 3 motors
                  
                  ; bed_probe_points.g
                  ; called to define probing points when traming the bed
                  
                  if !exists(param.A)
                    M98 P"/sys/lib/goto/bed_center.g"                                            ; Move to bed center
                  
                  G30 K0 P0 X175 Y345 Z-99999                                                      ; Probe bed rear center
                  G30 K0 P1 X345 Y5 Z-99999                                                    ; Probe right front bed corner
                  G30 K0 P2 X5 Y5 Z-99999 S3                                                      ; Probe left front bed corner and calibrate 3 motors
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA