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

    Another BL touch config question: Y-offset this time

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    35
    2.6k
    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.
    • jallen810undefined
      jallen810
      last edited by

      Hello,

      I'm coming from MKS Gen L running Marlin 2.0. I have successfully got my Duet2WiFi running on my Artillery Sidewinder X1. I can run G29's and managed a print but i noticed it didn't center the part on the build plate. I was wondering how to make this happen?

      The first issue i ran into was that with my mount for my Bltouch. It is X=58 and Y=-36,
      So I modified config.g --> G31 P500 X58 Y-36 Z0.5 (See attached files) versus X0 & Y0
      Then i ran into trouble when i tried to home Z probe. It was too far forward of build plate.
      So i modified:
      homeall.g & homez.g: modified G1 X15 Y15 F6000 to G1 X15 Y50 so probe would touch from of build plate
      AND
      config.g: Added M206 Y50 at bottom of file to allow build plate to move for z-probe

      Here is the starting G-code on my slicer (S3D or Prusa Slicer):
      G28 ; home
      M561 ; clear bed transform
      G1 X92 Y186 ; move to middle of bed for probe
      G29 ; Do a mesh bed probe
      G1 Z20 F6000 ; move z up to 20mm
      G1 X20 Y25 F3000 ; avoids any binder clips
      G1 Z0.4 F3000 ; get ready to prime
      G1 Y120 E15 F800 ; prime nozzle
      G1 Y200 F800 ; quick wipe

      All i really need is for the machine to move the forward 30-50mm when homing with z-probe, the nozzle can still reach everywhere it did before conversion but my firmware & or slicer have gone askew on me.

      I will put copies of all my modified files with this post for you to dissect if needed.
      config.g
      homeall.g
      homez.g

      One Last question, regarding fans, i can't seem to override them to confirm i wired them to match firmware? Is there a good guide to verify / command these fans? I have 1 thermo controlled (hotend cool) and 1 always on for CPU cool, and the part cooling fan that i want Gcode to control

      droftartsundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @jallen810
        last edited by

        @jallen810 Just to make sure your probe offset is correct, your BLTouch is 58mm to the right, and 36mm in front of your nozzle? Looks about that from the render of your mount.

        Usually, the way to set up the bed is with M208. Currently you have yours set to:

        M208 X0 Y0 Z0 S1                                   ; set axis minima
        M208 X300 Y300 Z400 S0                             ; set axis maxima
        

        What you want is to home the X and Y axis, setting X0 and Y0 at the point it triggers each endstop. Then jog the nozzle to where you want the origin, which may be X20 Y30 for example. You can then set the axis minima to M208 X-20 Y-30 Z0 S1. This tells the firmware where the bed is from the endstops, and also how far off the bed the nozzle can move. This is important when you use an offset probe; when you run G30 P[n] X[n] Y[n] Z-9999 S[n] commands, it uses the probe offset to put the probe, not the hot end, at the XY coordinates.

        Setting the axis maxima is less important, as the probe is to the right of the nozzle, so it can reach anywhere on the high side of X. But if the nozzle can go off the back of the bed, so the probe can cover the back edge of the bed, it would be worth adding a bit to the Y maxima.

        Doing the above defines the full range of axis movement for the firmware, and where the bed is within that range. You don't need to use M206, which, though not deprecated, will add confusion if you add more tools, and has been superseded by using the above method.

        When homing Z, just move the nozzle to where you want it to probe, and send G30. Ideally the centre of the bed.

        For more details, see https://duet3d.dozuki.com/Wiki/Centering_the_bed_or_setting_the_bed_origin

        Regarding your probe:
        M558 P5 H5 F250 T16000
        Use P9, which is specifically for BLTouch. F250 is too fast to reliably probe; start at F50, check accuracy/repeatability, and increase speed if possible.

        Regarding fans:

        M106 P0 C"MAINBOARD_ALWAYONFAN0" S1 I0 F500 H-1    ; set fan 0 name, value, PWM signal inversion and frequency. Thermostatic control is turned off
        M106 P1 C"HE0_FAN0" S1 I0 F500 H1 T45              ; set fan 1 name, value, PWM signal inversion and frequency. Thermostatic control is turned on
        M106 P2 C"PARTCOOL_FAN1" S0 I0 F500 H-1            ; set fan 2 name, value, PWM signal inversion and frequency. Thermostatic control is turned off
        

        Swap the part cooling fan from P2 to P0; most slicers send plain M106 S[nn] commands, which usually go straight to the P0 fan. Part cooling fan should be visible then. The tool fan will not be visible as it's thermostatic. The MCU fan should be able to be made visible, but you don't really need to see it.

        Hope that helps.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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

          @jallen810 said in Another BL touch config question: Y-offset this time:

          config.g: Added M206 Y50 at bottom of file to allow build plate to move for z-probe

          Don't do that. https://duet3d.dozuki.com/Wiki/Gcode#Section_M206_Offset_axes

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • jallen810undefined
            jallen810 @droftarts
            last edited by jallen810

            @droftarts

            Okay so yes, if you're sitting in front of m/c, my probe is 58mm right and 36mm forward of the nozzle.
            To make sure I understand, you're saying the M206 command will muddle the waters and that I should modify my config.g to read:
            M208 X0 Y45 Z0 S1 (for axis minima)? Won't that make me lose 45mm of print bed?

            Next, finding the center of the bed. I feel a fool for this bc my machine is 300x x 300y x 400z and that means nozzle center is 150x150. If we take into account a +58x and a -36y that means my new center should be
            X=92 and y=186 but when I put probe there it doesn't look centered. It looks more centered around y=250... am I crazy or am I just too focused on this and my math is bad?

            EDIT: Would it just be easier to set my origin to make the nozzle go to the middle of bed (x=150, y=150?) but then how do I make the offset happen for the probe? This part still confuses me.... or should that just be part of my starting script?
            EDIT2 What about the offset's I setup in my Homall.g and Homez.g, are those legit? Or a hokey workaround?

            Why P9 mode? I changed it to that originally but the probe doesn't like it and won't home correctly.
            Probe Speed: I check a F-rate of 50, 100, 120, and 250 and I saw very little in the difference but I am still tweaking that. Thank you for a reference point though

            **EDIT3- I got the fan's working, thank you for the advice. Now I can put my enclosure on 🙂 **
            Lastly, When you say I should "swap" the part cooling fan from P2 to P0, you mean I should change the code right? Not the physical wiring? (P.S. this box of code you put in:

            M106 P0 C"MAINBOARD_ALWAYONFAN0" S1 I0 F500 H-1    ; set fan 0 name, value, PWM signal inversion and frequency. Thermostatic control is turned off
            M106 P1 C"HE0_FAN0" S1 I0 F500 H1 T45              ; set fan 1 name, value, PWM signal inversion and frequency. Thermostatic control is turned on
            M106 P2 C"PARTCOOL_FAN1" S0 I0 F500 H-1            ; set fan 2 name, value, PWM signal inversion and frequency. Thermostatic control is turned off
            
            

            Is that your modified code that I should just copy and paste in? How did you do that? lol Sorry newbie here. Still learning all of the syntax

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

              The part cooling fan is typically on the Fan0 header and the hotend fan is on Fan1. This is because slicers typically don't send commands that target a specific fan, they just send M106 S1 to turn the first fan on or off. You can get around that by using the tool definition to to assign a different fan as the tool fan, so it's not critical.

              The hotend fan is Fan1 because the firmware will start that fan spinning briefly at power on just incase the printer lost power or was reset when the hotend was hot to help prevent jams from heat creep.

              The BLTouch should be using P9. That's the probe mode specifically made for the BLTouch. It helps the firmware control the deploy and retract of the pin and a few other tweaks. Is the BLTouch a clone or a really old version or something? What exactly didn't work with P9? How do you have it wired up? Is it wired to the Z probe in pin or an endstop?

              The BLtouch works best with a slow probe speed. You can use a double probing technique in your homeall to use a fast probe first to get it to the bed, and then a slower one second for better accuracy. Like this:

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

              The G31 probe offsets should be measured like this: https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Section_Measuring_Probe_X_Y_Offset

              Don't use M206. Not appropriate for this situation.

              M208 defines the size of the reachable area of the nozzle. Sometimes the nozzle can go outside of the bed area. If this is the case in the negative sides of the bed, you set 0,0 to be the front left corner of the bed, and if the nozzle leaves the edge of the bed when the print head is moving to the endstop, you can use that negative value in the M208 minima. That will keep the slicer center matched to the bed center. Make sense?

              When homing the Z axis, you must move the nozzle to the point where the probe is at the center. In other words, you must take the G31 offset into account yourself when positioning the nozzle. This may be a bit different from how repetier and marlin do it.

              Does that make sense?

              Z-Bot CoreXY Build | Thingiverse Profile

              jallen810undefined 1 Reply Last reply Reply Quote 0
              • jallen810undefined
                jallen810
                last edited by

                I followed the link you suggested but then found BeTru3D’s guide more intuitive. My plan was to the Z-probe bird inputs to power my BLtouch 3.1 and wire it accordingly. But I couldn’t get the probe to do it’s startup self-test when I had the yellow wire plugged into the z_probe_mod pin and P9 selected. I tried both 3.3v and 5v. So I ended up following BeTrue’s wiring for the yellow wire and P5. And it’s working.. if you can shed some light as to why I’d love to do it correctly.

                As for offsets, I think what ur saying is G31 is for nozzle reach capability and I need to use some other command, ex. What I did with homeall.g and homez.g to tackle homing z-probe on bed. Is that correct?
                So if my nozzle reach capability hasn’t changed then:
                G31 X0 Y0 Z0 S1 should be correct vs G31 X58 Y-36 Z0 S1
                That will solve the slicers being offset?

                Phaedruxundefined dc42undefined 2 Replies Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator @jallen810
                  last edited by

                  @jallen810 said in Another BL touch config question: Y-offset this time:

                  I had the yellow wire plugged into the z_probe_mod pin and P9 selected.

                  Follow this wiring setup for the Duet Wifi

                  https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe#Section_Duet_2_WiFi_Ethernet_without_a_Duex_2_or_Duex_5_expansion_board

                  alt text

                  G31 X58 Y-36 sounds correct for your offset (58mm to the right, and 36mm in front of the nozzle). There is no S1 for G31. The Z offset must be measured as described in the previous link.

                  @jallen810 said in Another BL touch config question: Y-offset this time:

                  What I did with homeall.g and homez.g to tackle homing z-probe on bed. Is that correct?

                  G90                     ; absolute positioning
                  G1 X15 Y50 F6000        ; go to first bed probe point and home Z (modified Y=15 to Y=50 so Z-axis will home on build plate)
                  G30                     ; home Z by probing the bed
                  

                  I would change the G1 X15 Y50 to whatever coordinates are needed to move the nozzle such that the probe is in the center of the bed. For example, if the bed is 300x300 then 150,150 would be the center, and if the probe offset is x58 Y-36, then you'd have to take that into account. so if you moved the nozzle to G1 X92 Y186 that should move the probe to the center point.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • jallen810undefined
                    jallen810
                    last edited by

                    Okay that clears that up, i will try running the wiring that way and modifying my G31.
                    Will i need to tell my slicer's that "Home" is now in the center of the bed?
                    For example, S3D Homing Direction & Origin Offset.JPG S3D, see screen shot, is that done by changing Homing Direction from X=Max and Y=Min to X=Center Y=Center, and using the same S3D Origin Offsets in S3D as i use in G31 X=92, Y=186?

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

                      No no, 0,0 isn't the center of the bed. That's not what I was getting at. 0,0 is still the front left corner. What the homeall is doing is just moving the probe to the center of the bed, since that's the best place to measure the Z height.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      jallen810undefined 1 Reply Last reply Reply Quote 0
                      • jallen810undefined
                        jallen810 @Phaedrux
                        last edited by

                        @Phaedrux I see so G31 sets bed capability, and Homeall.g just tells m/c to go "here" and say i'm there and ready to do stuff.
                        I am assuming the same would be true for the HomeZ.g file as well?
                        Sorry for the laymans terms but that sounds like what i am after.

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

                          Yes, homeall and homez are generally quite similar when using a probe because the probe must be placed in X and Y for probing, unlike a Z endstop which is in a fixed location, so even in homez you usually will be homing X and Y. If you don't do that, and you try and homez without the X and Y axis being homed first, the homez will fail.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • jallen810undefined
                            jallen810 @Phaedrux
                            last edited by

                            @Phaedrux said in Another BL touch config question: Y-offset this time:

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

                            Phaedruex,
                            Where do I call these 4 lines of code you mentioned? in my config.g or in the start of my Starting Code for slicer?
                            Also, you and @droftarts both refer to G30 alot rather than G29 or G32, which BeTrue3D did in his setup guide for BLtouch, am I missing something? I thought G30 is just to calibrate BLtouch, not for using to do a mesh bed level.
                            G29's take a long time at F50-150 for a 300x300 bed. Can I get solid, consistent results with a G30 pair with a "historical" G29 mapping or a simple G32?

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

                              Those lines go in your homeall to replace the single G30 that's already in there.

                              G30 is used to call the probe and use it to find Z0.

                              https://duet3d.dozuki.com/Wiki/Gcode#Section_G30_Single_Z_Probe

                              Mesh bed leveling is done by calling G29.

                              https://duet3d.dozuki.com/Wiki/Gcode#Section_G29_Mesh_bed_probe

                              G32 just calls the macro bed.g in the /sys/ folder. It doesn't do anything on it's own anymore. Inside bed.g you can script up some more advanced things like independent motor tramming of the bed.

                              https://duet3d.dozuki.com/Wiki/Gcode#Section_G32_Probe_Z_and_calculate_Z_plane

                              If G29 takes a long time to run, you can either reduce the spacing of the points probed to reduce the detail in case your bed is very flat. Or you can simply load the saved heightmap at print time rather than probing the whole thing over again. G29 S1 loads the saved map. G29 will save the heightmap automatically.

                              It's all laid out in the Mesh compensation link: https://duet3d.dozuki.com/Wiki/Using_mesh_bed_compensation

                              Z-Bot CoreXY Build | Thingiverse Profile

                              jallen810undefined 2 Replies Last reply Reply Quote 0
                              • jallen810undefined
                                jallen810 @Phaedrux
                                last edited by

                                @Phaedrux Okay I've update my config.g and the G31 X0 Y0 Z(offset value)
                                I think has worked.

                                I am pulling ground (both black and brown) from the z-probe ground like you see [here] (https://d17kynu4zpq5hy.cloudfront.net/igi/duet3d/BJKPq1sdZcJNUmP4.full)
                                and I have wired the yellow wire like you suggested to the #8 pin labeled "Heater3" on Duet Pinout sheet like you see here
                                I made these changes to my config.g so they now read:
                                M307 H3 A-1 C-1 D-1
                                M558 P9 H5 F120 T16000

                                I also adjust Homeall and HomeZ to X=92 and Y=186, that worked now like it should

                                Lastly, adjusted my Deploy/Retract probes to:
                                M280 P3 S10
                                and I also tried M280 P64 S10 I1

                                Here is where I run into the same problem I had originally, when I home my Z the probe doesn't deploy and it gives me an error about the servo not being called or correct... something to that effect.
                                I have also tried hooking up the yellow cable to the Z_probe_mod pin on Duet Board and change M280 to P64/65 and neither of those work either...
                                Any suggestions?

                                Phaedruxundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                • jallen810undefined
                                  jallen810 @Phaedrux
                                  last edited by

                                  @Phaedrux said in Another BL touch config question: Y-offset this time:

                                  Those lines go in your homeall to replace the single G30 that's already in there.

                                  G30 is used to call the probe and use it to find Z0.

                                  https://duet3d.dozuki.com/Wiki/Gcode#Section_G30_Single_Z_Probe

                                  Mesh bed leveling is done by calling G29.

                                  https://duet3d.dozuki.com/Wiki/Gcode#Section_G29_Mesh_bed_probe

                                  G32 just calls the macro bed.g in the /sys/ folder. It doesn't do anything on it's own anymore. Inside bed.g you can script up some more advanced things like independent motor tramming of the bed.

                                  https://duet3d.dozuki.com/Wiki/Gcode#Section_G32_Probe_Z_and_calculate_Z_plane

                                  If G29 takes a long time to run, you can either reduce the spacing of the points probed to reduce the detail in case your bed is very flat. Or you can simply load the saved heightmap at print time rather than probing the whole thing over again. G29 S1 loads the saved map. G29 will save the heightmap automatically.

                                  It's all laid out in the Mesh compensation link: https://duet3d.dozuki.com/Wiki/Using_mesh_bed_compensation

                                  THIS^ YOU NEED TO PUBLISH THIS on these two pages, so poor saps like me don't run around in circles like chickens minus heads!!!
                                  Page 1
                                  Page 2

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

                                    @jallen810 said in Another BL touch config question: Y-offset this time:

                                    I am pulling ground (both black and brown) from the z-probe ground like you see [here] (https://d17kynu4zpq5hy.cloudfront.net/igi/duet3d/BJKPq1sdZcJNUmP4.full)

                                    This is the diagram for the Maestro board. Don't use this one.

                                    @jallen810 said in Another BL touch config question: Y-offset this time:

                                    and I have wired the yellow wire like you suggested to the #8 pin labeled "Heater3" on Duet Pinout sheet like you see here

                                    This is the Duet Wifi diagram, which you said you had, so use this one as shown.

                                    @jallen810 said in Another BL touch config question: Y-offset this time:

                                    and I also tried M280 P64 S10 I1

                                    That's for the maestro, don't use that one.

                                    If you are using reprapfirmware 2 and the wifi, you should use M280 P3 S10 I1. P3 for the heater pin 3, and I1 to invert it.

                                    Z-Bot CoreXY Build | Thingiverse Profile

                                    jallen810undefined 1 Reply Last reply Reply Quote 0
                                    • jallen810undefined
                                      jallen810 @Phaedrux
                                      last edited by jallen810

                                      @Phaedrux Yes I have a Duet2 WiFi model, but power is power and ground is ground as long as all the grounds lead to a main ground somewhere on the board. So where I get power and ground from should not matter?

                                      I just tried M280 P3 S10 I1 and that doesn't work still. I will swap the wiring and try again..

                                      EDIT I just wired like this as you said, and now my BLtouch powers on but doesn't do it's startup sequence of 2 self-test cycles. This is what was happening when I originally tried to wire it this way

                                      jallen810undefined 1 Reply Last reply Reply Quote 0
                                      • jallen810undefined
                                        jallen810 @jallen810
                                        last edited by

                                        @Phaedrux any ideas why the Duet3D method Of wiring would not work?
                                        And what other options do I have for setting a probe offset?

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

                                          @jallen810 said in Another BL touch config question: Y-offset this time:

                                          I followed the link you suggested but then found BeTru3D’s guide more intuitive.

                                          Unfortunately, that guide is out of date.

                                          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
                                          • dc42undefined
                                            dc42 administrators @jallen810
                                            last edited by dc42

                                            @jallen810 said in Another BL touch config question: Y-offset this time:

                                            Lastly, adjusted my Deploy/Retract probes to:
                                            M280 P3 S10
                                            and I also tried M280 P64 S10 I1

                                            The correct command for a Duet WiFi or Duet Ethernet running RRF2 without an attached DueX board is: M280 P3 S10 I1

                                            (that's uppercase-letter-i followed by digit-1 at the end). M280 P64 S10 I1 is for the Duet Maestro.

                                            Can you provide a photo showing how you have connected the BLTouch to the Duet?

                                            If you have a config-override.g file in your /sys folder, check that there is no M307 H3 command in it.

                                            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

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