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

    Fast home vs accurate.

    Scheduled Pinned Locked Moved
    IR Height Sensor
    3
    15
    664
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      Can you please post your full config.g and homeall/homez?

      It's impossible to say what's going on without seeing the configuration.

      Z-Bot CoreXY Build | Thingiverse Profile

      Demiundefined 1 Reply Last reply Reply Quote 0
      • Demiundefined
        Demi @Phaedrux
        last edited by

        @Phaedrux

        Whoops, sorry about that!

        ; Configuration file for Duet 3 (firmware version 3)
        ; executed by the firmware on start-up
        ;
        ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Apr 17 2020 12:59:14 GMT-0400 (Eastern Daylight Time)
        
        ; General preferences
        G90                                          ; send absolute coordinates...
        M83                                          ; ...but relative extruder moves
        M550 P"Evo Duet 1"                           ; set printer name
        
        M667 S1                                      ; select CoreXY mode
        
        ; 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 S1                                 ; physical drive 0.0 goes forwards
        M569 P0.1 S0                                 ; physical drive 0.1 goes backwards
        M569 P0.2 S0                                 ; physical drive 0.2 goes backwards
        M569 P0.5 S0                                 ; physical drive 0.5 goes backwards
        M584 X0.0 Y0.1 Z0.2 E0.5                     ; set drive mapping
        M350 X16 Y16 Z16 E16 I1                      ; configure microstepping with interpolation
        M92 X100.00 Y100.00 Z806.45 E837.00          ; STOCK E837 STOCK Z806 set steps per mm
        M566 X800.00 Y800.00 Z15.00 E12.00         ; set maximum instantaneous speed changes (mm/min)
        M203 X7800.00 Y7800.00 Z1500.00 E1200.00     ; set maximum speeds (mm/min)
        M201 X850.00 Y850.00 Z20.00 E250.00          ; set accelerations (mm/s^2) (LAST 3000XY)too much
        M906 X1500 Y1500 Z1500 E1680 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 X290 Y285 Z570 S0                       ; set axis maxima
        
        ; Endstops
        M574 X1 S1 P"io0.in"                         ; configure active-high endstop for low end on X via pin io0.in
        M574 Y1 S1 P"io1.in"                         ; configure active-high endstop for low end on Y via pin io1.in
        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 F350 T10000             ; set Z probe type to bltouch and the dive height + speeds
        G31 P500 X22 Y24 Z2.75                   ; set Z probe trigger value, offset and trigger height
        M557 X15:300 Y15:300 S60                     ; define mesh gridM557 X5:255 Y10:300 S40 
        
        
        ; Heaters
        M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
        M950 H0 C"out0" T0                           ; create bed heater output on out0 and map it to sensor 0
        M143 H0 S120                                 ; set temperature limit for heater 0 to 120C
        M307 H0 B1 S1.00                             ; enable bang-bang mode for the bed heater and set PWM limit
        M140 H0                                      ; map heated bed to heater 0
        M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1
        M950 H1 C"out1" T1                           ; create nozzle heater output on out1 and map it to sensor 1
        M143 H1 S280                                 ; set temperature limit for heater 1 to 280C
        M307 H1 B0 S1.00                             ; disable bang-bang mode for heater  and set PWM limit
        M308 S2 P"temp2" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin temp2
        M950 H2 C"out2" T2                           ; create chamber heater output on out2 and map it to sensor 2
        M143 H2 S280                                 ; set temperature limit for heater 2 to 280C
        M307 H2 B1 S1.00                             ; enable bang-bang mode for the chamber heater and set PWM limit
        M141 H2                                      ; map chamber to heater 2
        
        ; Fans
        M950 F0 C"out7" Q500                         ; create fan 0 on pin out7 and set its frequency
        M106 P0 C"Part Fan" S0 H-1                   ; set fan 0 name and value. Thermostatic control is turned off
        M950 F1 C"out9" Q500                         ; create fan 1 on pin out9 and set its frequency
        M106 P1 C"HotEnd Fan" S1 H1 T45              ; set fan 1 name and value. Thermostatic control is turned on
        M950 F2 C"out3" Q500                         ; create fan 2 on pin out3 and set its frequency
        M106 P2 C"CaseFan1" S0.25 H-1                ; set fan 2 name and value. Thermostatic control is turned off
        
        ; Tools
        M563 P0 D0 H1 F0                             ; 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
        
        ; Custom settings
        M307 H0 A110 C600 D60 S1
        M307 H1 A598.7 C312.1 D3.3 S1
        M307 H2 A70 C600 D60 S1
        						; filament sensor
        ;M950 J12 C"io6.in" ;working
        ;M581 P12 T3 S1 C1	;working
        M591 D0 P2 C"io6.in" S1
        
        
        
        
        ; Miscellaneous
        T0                                           ; select first tool
        
        
        
        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          You can send G31 without parameters to check what the trigger height is set to.

          We also need to see your homez.g and homeall.g files.

          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
          • Demiundefined
            Demi
            last edited by

            Oh thats handy, okay I will check that and see if it changes as soon as I can.

            ; homeall.g
            ; called to home all axes
            ;
            ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Apr 17 2020 12:59:14 GMT-0400 (Eastern Daylight Time)
            
            M564 H0
            G91                     ; relative positioning
            G1 H2 Z5 F7200          ; lift Z relative to current position
            M558 P9 C"io7.in" H5 F600 T10000  
            
            G1 H1 X-345 Y-345 F7200 ; move quickly to X or Y endstop and stop there (first pass)
            G1 H1 X-345             ; home X axis
            G1 H1 Y-345             ; home Y axis
            G1 X5 Y5 F7200          ; go back a few mm
            G1 H1 X-345 F1800       ; move slowly to X axis endstop once more (second pass)
            G1 H1 Y-345             ; then move slowly to Y axis endstop
            G90                     ; absolute positioning
            G1 X-7 Y-9 F7200        ; go to first bed probe point and home Z
            G30                     ; home Z by probing the bed
            M558 P9 C"io7.in" H5 F150 T10000  
            G30
            
            M564 H1
            
             
            ; Uncomment the following lines to lift Z after probing
            ;G91                    ; relative positioning
            ;G1 Z5 F120             ; lift Z relative to current position
            ;G90                    ; absolute positioning
            
            
            
            ; homez.g
            ; called to home the Z axis
            ;
            ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Apr 17 2020 12:59:14 GMT-0400 (Eastern Daylight Time)
            G91              ; relative positioning
            G1 H2 Z5 F7200   ; lift Z relative to current position
            G90              ; absolute positioning
            G1 X-7 Y-9 F7200 ; go to first probe point
            G30              ; home Z by probing the bed
            
            ; Uncomment the following lines to lift Z after probing
            ;G91             ; relative positioning
            ;G1 Z5 F120      ; lift Z relative to current position
            ;G90             ; absolute positioning
            
            1 Reply Last reply Reply Quote 0
            • Demiundefined
              Demi
              last edited by Demi

              Okay, so I went line by line to see when the z-trigger height changed. In my latest config its set to 2.8
              G31 reports the same. When Homeall.g runs:

              M558 P9 C"io7.in" H5 F600 T5000 
              

              G31 reports 0.7.
              Thats when it is changing but I dont understand why. Unless re-declaring the pin without defining the mesh defaults to 0.7? I suppose I could just define the mesh 3 times?

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

                Here are a few things I would change in your config and homing file. Though I don't see anything that would really explain the issue. However, these changes may improve things.

                In config.g modify your M558 and G31 to be:

                M558 P9 C"io7.in" H5 F60 T7800 A10 R0.5 S0.005
                G31 P25 X22 Y24 Z2.75
                

                This will force the BLtouch to be a bit more accurate and repeatable.

                Then in homeall.g I see you're using M564 H0 to allow movement before homing, which isn't necessary because you have an H2 in the Z move already and all the other moves are homing moves. You also don't need to duplicate the entire M558 command from config.g to change the dive speed, we can just use the F and A value to get what we want. You've also got it probing in the corner of the bed. Best to use the center.

                ; homeall.g called to home all axes
                M400 ; wait for movement to stop
                M913 X50 Y50 Z50 ; drop motor currents for safer homing
                G91                     ; relative positioning
                G1 H2 Z5 F7200          ; lift Z relative to current position
                G1 H1 X-345 Y-345 F7200 ; move quickly to X or Y endstop and stop there (first pass)
                G1 H1 X-345             ; home X axis
                G1 H1 Y-345             ; home Y axis
                G1 X5 Y5 F7200          ; go back a few mm
                G1 H1 X-345 F1800       ; move slowly to X axis endstop once more (second pass)
                G1 H1 Y-345             ; then move slowly to Y axis endstop
                G90                     ; absolute positioning
                G1 X134 Y130.5 F7200        ; Move probe to bed center
                M558 F600 A1 ; Set single fast probe 
                G30                     ; home Z by probing the bed quickly
                M558 F60 A10 ; set slower multi probing
                G30                    ; probe again for accuracy
                G1 X10 Y10 Z10 ; return to parking position
                M400 ; wait for movement to stop
                M913 X100 Y100 Z100 ; return motor currents to normal
                

                It's up to you if you want to do the same in homez.

                Please test and let me know how it goes.

                Z-Bot CoreXY Build | Thingiverse Profile

                Demiundefined 1 Reply Last reply Reply Quote 1
                • Demiundefined
                  Demi @Phaedrux
                  last edited by

                  @Phaedrux
                  Woah. This is a treasure trove of information. So many new uses, that solve a number of things I have been working on. The M913 is exactly what I was looking for, thats brilliant. Im starting to understand part of my learning problem, I go to the zuki, look for the command and immediately scroll to the applicable firmware, not realizing that often only changes are listed. M558 for example, I had no idea feedrate was supported. Headslap. I used your changes, and it works perfectly thank you so much!

                  One I dont fully understand is the P flag for G31. If I half understand, it sets the threshold for the signal for , in my case, the BLTOUCH. How is this value determined?

                  Phaedrux, and everyone here, you have all been so helpful, and it really is appreciated. This seems to be a really amazing community, and thank you for taking the time.

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

                    Glad that helped you out. Sometimes all it takes is examples to open the eyes to what's possible.

                    Yes the G31 P value is the threshold for triggering. Setting it low allows it to be picked up on the rising edge (from my limited understanding). The range is from 1 to 1000. For analogue probes I believe you can use it to tune the sensitivity a bit more. 500 is probably fine for most probes/switches. A while ago when the BLtouch got it's own probe type (P9) it was recommended to use P25. Wish I could tell you more than that.

                    If you send G31 now does it always reply with the correct trigger height?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    Demiundefined 1 Reply Last reply Reply Quote 1
                    • Demiundefined
                      Demi @Phaedrux
                      last edited by

                      @Phaedrux
                      It sure does. It works like an absolute champ. Thank you so much.

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

                        It must have been from having the full M558 in the homing file. I think 0.7 is the default in the firmware.

                        It's also RRF3 so things are a bit different now sometimes. Which firmware version exactly are you using? Duet Wifi or Duet 3? Pi connected or standalone?

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • Demiundefined
                          Demi
                          last edited by

                          Using stand alone Duet 3, MB6HC 3.01-RC10, Duet Web Control 2.1.5. I think youre right. Went I went line by line, M558 is where it changed back to 0.7.

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