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

    Auto Bed Compensation - Too Slow?

    Scheduled Pinned Locked Moved
    General Discussion
    4
    21
    1.8k
    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 @ajcraig99
      last edited by Phaedrux

      @ajcraig99 when you did the g30 s-1 test did you first change your trigger height in the G31 command to 0 in the config.g?

      Also try changing the trigger sensitivity to a lower value. That's the P value of the G31 command in config.g. try 100 instead of 600.

      Z-Bot CoreXY Build | Thingiverse Profile

      ajcraig99undefined 1 Reply Last reply Reply Quote 0
      • ajcraig99undefined
        ajcraig99 @Phaedrux
        last edited by

        @phaedrux

        Ensure that the Z offset in G1 in config.g is set to 0, these steps will be used to measure this actual offset. (send G31 >Z0 to set it to 0).

        I though I did but misread that as G31, I have a G31 line where Z=0 (was Z-0.1) but no G1 line in my Config.g

        Isn't G1 just 'move'? Do I need to add another line in config.g with just

        G1 Z0
        

        ?

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

          Yes I think that's a typo.

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • ajcraig99undefined
            ajcraig99
            last edited by

            Ok, 1 step forward, 1 step backwards.

            G31 changed to G1 with Z0 but now when I issue G30 S-1 it starts the manual bed probing wizard.

            M558 is still set to P8 rather than the P0 I would expect to cause this...

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

              Nope that should be G31. The g1 is a typo.

              Z-Bot CoreXY Build | Thingiverse Profile

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

                I think I would go back through the piezo documentation from the start and follow it to the letter.

                Once you get through that if it still doesn't work we can review your config.g and homing files.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • ajcraig99undefined
                  ajcraig99
                  last edited by

                  Typo fixed. Still crashes into the bed.

                  Have been through the peizo documentation pretty thoroughly over the last week or so. It's not very detailed but I have checked the polarity and got the sensitivity tuned.

                  It just takes a light tap when running homez.g

                  https://youtu.be/OKaQNF0DIy0

                   G1 S1 Z-295 F1800 ; move Z down until the switch triggers
                  

                  Snnn Flag to check if an endstop was hit (S1 to check, S0 to ignore, S2+S3 see note, default is S0) 1

                  Am I right in thinking that the above waits for an endstop to be triggered (which does get triggered in this case) whereas G31 waits for a probe to be triggered ie a different tool or input compared to above?

                  When I run G31 with the bed 100mm or so away from the nozzle, i can manually trigger the peizo, causing the red light to flash but it ignores it.

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

                    So you should not be using G1 S1 Z-295 F1800 in your homez.g. That is only if you are using a mechanical end stop switch. You should be using G30, which tells the system to probe the bed to find z=0.

                    So lets clear up some terminology because I think it's a little confused right now.

                    G1 commands are movements. In the command above, the S1 switch tells it to move until an endstop is hit.

                    G30 tells the system to do a probe. It uses the settings specified in the config.g (G31 and M558) to tell it what kind of probe it is and how it's configured. It then moves the head down until the probe triggers. It takes the trigger height offset and says if I triggered here, the bed is here, and so it knows where z=0 is and can move accurately going forward. G30 is used by your homing files and the various bed leveling options.

                    G31 belongs in the config.g and defines the physical location of the probe in relation to the nozzle. In your case the nozzle is the probe, so the X and Y values are 0. The Z value tells it what height the nozzle is when it triggers. According to the piezo documentation it should be -0.1 because it actually presses into the bed a little bit.

                    M558 also in config.g defines the probe type and how it should behave during a G30 command.

                    So your config.g should have the following lines in it.

                    M574 Z1 S2						; Use zprobe and home to Z Min.
                    M558 P8 I1 H5 F300 T6000                 ; Use piezo digital probe type, invert the signal, probe from 5mm height, probe at 300mm/min, travel between probe points at 6000mm/min.
                    G31 X0 Y0 Z-0.1 P100
                    M557 X10:280 Y35:270 S15				; Define mesh grid
                    

                    Then your homeall.g should look something like this.

                    ; Drop the bed for travel
                    ;
                    G91                     	; relative positioning
                    G1 Z5 F200 S2        		; Lower bed 5mm to ensure it is below the switch trigger height
                    
                    ; Home XY
                    ;
                    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 X5 Y-5 F1000             	; move away from the endstops
                    G1 S1 X-10 F600           	; fine home X
                    G1 S1 Y10 F600               	; fine home Y
                    
                    ; Home Z
                    G90				; absolute positioning
                    G1 X190 Y90 F6000		; Move x and Y axis over to bed center so probe is on top of bed
                    G30 				; Do a single probe to home our Z axis
                    
                    ; Move X and Y back Home
                    ;
                    G1 X1 Y270 Z5
                    

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • ajcraig99undefined
                      ajcraig99
                      last edited by

                      Thankyou, I've updated the code and will revisit the peizo setup again.

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

                        No problem. You're quite close.

                        The configurator gives a starting point but there are a lot of pitfalls with the option choices. It can take a bit of manual tuning to get it right.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • ajcraig99undefined
                          ajcraig99
                          last edited by

                          Just reporting back to say I got everything working now. Thankyou very much for the help. The code snippets you posted above are working perfectly.

                          The issue was entirely user error on my part. I had the probe wired up to the 'Z Stop' on the board instead of 'Z Probe'. A tonne of hassle over a simple mistake but atleast it's sorted now.

                          Cheers

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

                            Glad to hear it's all working now.

                            Z-Bot CoreXY Build | Thingiverse Profile

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