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

    Placement of Gcodes

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    12
    446
    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.
    • Stevoundefined
      Stevo
      last edited by Stevo

      Afternoon all have been looking for info on whether I have entered my G codes for the BLtouch in the correct place in the config file wondered if I could get some clarification please.

      This is part of my config file,

      ; Endstops
      M574 X1 Y1 S0 ; Set active low and disabled endstops
      M574 Z1 S2 ; Define Z to use Probe. Home to Min.
      M558 P5 H5 F500 T4000 X0 Y0 Z1 ; Set Z probe type/mode 5. Not using on XY, but using it on Z.
      G31 P25 X2 Y32 Z0.80 ; Z probe trigger value, offset in relation to nozzle. And trigger height adjustment

      ; Z-Probe
      M574 Z1 S2 ; Set endstops controlled by probe
      M307 H7 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
      M558 P9 H15 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
      G31 P500 X32 Y2 Z0.80 ; Set Z probe trigger value, offset and trigger height
      M557 X220:220 Y-220:220 S20 ; Define mesh grid

      ; Heaters
      M140 H-1 ; Disable heated bed
      M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1
      M143 H1 S280 ; Set temperature limit for heater 1 to 280C

      ; Fans
      M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on
      M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

      ; Tools
      M563 P0 D0 H1 ; 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

      ; BLTOUCH PREP
      ;
      G4 S1
      M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
      G4 S1
      M402 ; Retract probe just in case it's down

      Then I found this info on dozuki do I need to swap out my entries anyway to suit what is said within it as I am having temperamental behaviour from the BLTouch.

      "Modify your M558 and G31. The BLTouch behaviour is controlled by the M558 and G31 commands in config.g. Here is what an ideal set of commands should look like. M558 P9 F100 H5 R0.2 T6000 A5 B1 This sets probe type 9 for BLTouch, 100mm/min probe speed, 5mm dive height, 0.2 second pause time before probe move, 100mm/s travel moves between probe points, probe up to 5 times , or until 2 consecutive probe results match, and disable heaters during a probe move to limit interference. G31 P25 X10 Y10 Z2 Sets the trigger sensitivity to 25, the X Y and Z values should be measured to match your setup."

      regards

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

        @stevo said in Placement of Gcodes:

        ; Endstops
        M574 X1 Y1 S0 ; Set active low and disabled endstops
        M574 Z1 S2 ; Define Z to use Probe. Home to Min.
        M558 P5 H5 F500 T4000 X0 Y0 Z1 ; Set Z probe type/mode 5. Not using on XY, but using it on Z.
        G31 P25 X2 Y32 Z0.80 ; Z probe trigger value, offset in relation to nozzle. And trigger height adjustment
        ; Z-Probe
        M574 Z1 S2 ; Set endstops controlled by probe
        M307 H7 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
        M558 P9 H15 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
        G31 P500 X32 Y2 Z0.80 ; Set Z probe trigger value, offset and trigger height
        M557 X220:220 Y-220:220 S20 ; Define mesh grid

        You've got some duplicate entries here. And you have two conflicting G31 commands. Is the probe X32 Y2 away from the nozzle, or Y32 X2 away from the nozzle?

        Try replacing those sections with this:

        ; Endstops and Z probe
        M574 X1 Y1 S0 ; Set active low endstops
        M574 Z1 S2 ; Define Z to use Probe. Home to Min.
        M557 X220:220 Y-220:220 S20 ; Define mesh grid
        M307 H7 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
        M558 P9 H5 F100 T6000 R0.5 A5 B1 ; Set Z probe type to bltouch and the dive height + speeds
        G31 P25 X2 Y32 Z0.80 ; Z probe trigger value, offset in relation to nozzle. And trigger height adjustment
        

        Just make sure that your G31 X and Y offset is correct and that the trigger height has been calibrated.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • Stevoundefined
          Stevo
          last edited by

          Thank you will try that much appreciated

          1 Reply Last reply Reply Quote 0
          • Stevoundefined
            Stevo
            last edited by

            Is the BLTOUCH PREP code worth having in place ?

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

              It's not a bad idea to leave it in place just to ensure the pin is retracted and any errors cleared at startup.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • Stevoundefined
                Stevo
                last edited by

                Ok thank you again

                1 Reply Last reply Reply Quote 0
                • Stevoundefined
                  Stevo
                  last edited by Stevo

                  Have swapped out the sections with the code you kindly added other than changing the H5 to H15 I am still getting erratic behaviour from the sensor.

                  I bought an original smart V3 off Antclabs on Amazon so I don't question its integrity.

                  I have checked the wiring and this is without fault.

                  After the print bed lowers the hot end homes to y then homes to x the hot end moves to the centre of the print bed and just as the bed starts to rise something changes it to lower the bed 15mm again and the BLTouch goes into flashing red.

                  If I turn the machine off and manually deploy the pin and then start the machine and home it I stand a better chance of it working but not consistent!

                  Just a note on powering up the printer it does. not do a self test and codes from the console have no effect either.

                  Should I replace or is it human error again on my part lol

                  Thanks

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

                    Can you post your homing files?

                    Z-Bot CoreXY Build | Thingiverse Profile

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

                      What happens when you try the static test described here?

                      https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Section_Static_test_of_the_Z_probe

                      Z-Bot CoreXY Build | Thingiverse Profile

                      Stevoundefined 1 Reply Last reply Reply Quote 0
                      • Stevoundefined
                        Stevo
                        last edited by

                        Hi

                        Homing sequence is y first then x then z is homed at the centre of print bed,

                        Thank you

                        ; homeall.g
                        ; called to home all axes
                        ;
                        ; generated by RepRapFirmware Configuration Tool v2 on Tue Jul 23 2019 21:10:42 GMT+0100 (BST)
                        G91 ; relative positioning
                        G1 Z15 F6000 S2 ; lift Z relative to current position
                        G1 S1 Y-445 F1800 ; move quickly to Y axis endstop and stop there (first pass)
                        G1 Y5 F6000 ; go back a few mm
                        G1 S1 Y-445 F360 ; move slowly to Y axis endstop once more (second pass)
                        G1 S1 X-445 F1800 ; move quickly to X axis endstop and stop there (first pass)
                        G1 X5 F6000 ; go back a few mm
                        G1 S1 X-445 F360 ; move slowly to X axis endstop once more (second pass)
                        G90 ; absolute positioning
                        G1 X0 Y0 F6000 ; go to first bed probe point and home Z
                        G30 ; home Z by probing the bed

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

                        ; homex.g
                        ; called to home the X axis
                        ;
                        ; generated by RepRapFirmware Configuration Tool v2 on Tue Jul 23 2019 21:10:42 GMT+0100 (BST)
                        G91 ; relative positioning
                        G1 Z15 F6000 S2 ; lift Z relative to current position
                        G1 S1 X-445 F1800 ; move quickly to X axis endstop and stop there (first pass)
                        G1 X5 F6000 ; go back a few mm
                        G1 S1 X-445 F360 ; move slowly to X axis endstop once more (second pass)
                        G1 Z-15 F6000 S2 ; lower Z again
                        G90 ; absolute positioning

                        ; homey.g
                        ; called to home the Y axis
                        ;
                        ; generated by RepRapFirmware Configuration Tool v2 on Tue Jul 23 2019 21:10:42 GMT+0100 (BST)
                        G91 ; relative positioning
                        G1 Z15 F6000 S2 ; lift Z relative to current position
                        G1 S1 Y-445 F1800 ; move quickly to Y axis endstop and stop there (first pass)
                        G1 Y5 F6000 ; go back a few mm
                        G1 S1 Y-445 F360 ; move slowly to Y axis endstop once more (second pass)
                        G1 Z-15 F6000 S2 ; lower Z again
                        G90 ; absolute positioning

                        ; homez.g
                        ; called to home the Z axis
                        ;
                        ; generated by RepRapFirmware Configuration Tool v2 on Tue Jul 23 2019 21:10:42 GMT+0100 (BST)
                        G91 ; relative positioning
                        G1 Z15 F6000 S2 ; lift Z relative to current position
                        G90 ; absolute positioning
                        G1 X0 Y0 F6000 ; 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 S2 Z15 F100 ; lift Z relative to current position
                        ;G90 ; absolute positioning

                        1 Reply Last reply Reply Quote 0
                        • Stevoundefined
                          Stevo @Phaedrux
                          last edited by

                          @phaedrux

                          Hi,

                          Have tried the M401 command from the touchscreen with the probe illuminated in red the sending of the M401 command then makes the sensor flash red with no deployment of the sensors pin.

                          1 Reply Last reply Reply Quote 0
                          • Stevoundefined
                            Stevo
                            last edited by

                            So last ditch attempt have taken the pin out cleaned it put it back and it did its self test several times hooray oh hang on that was short lived.

                            I am now looking for an alternative to the bl touch thank you for all your help getting me to this point but I must just have the crap one! lol

                            I don't want to be ploughing the printhead into the bed so its time to move onto something more reliable IR ?

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