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

    Two motor leveling with bltouch

    Scheduled Pinned Locked Moved
    General Discussion
    2
    7
    769
    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.
    • bret4undefined
      bret4
      last edited by

      I'm trying to do two motor leveling with bltouch on my hypercube evolution printer. I home the printer. Then when I call g32 to get the two z motor screws in sync it works but I get this message.

      G32
      Leadscrew adjustments made: -0.285 0.264, points used 2, deviation before 0.164 after 0.000
      Error: Bad command: Define XY Coordinates in config.g

      I an get the error down to .000 sometimes most times it is more like .008 or more. But that may take running G32 4 to 7 times before it is under .020. What does the Error message mean? Is it normal to take so many tries to get the motors level?

      dc42undefined 1 Reply Last reply Reply Quote 0
      • bret4undefined
        bret4
        last edited by

        Here is my config.g file

        NoG; General preferences
        G90
        ; Send absolute coordinates...

        M83 ; ...but relative extruder moves

        M667 S1 ; Select CoreXY mode

        ;M669 K1

        M564 H0 ; Make it possible to home

        M550 HyperCube Evolution ; Set machine name

        M552 S1 ; Enable network

        M587 S1 ; Enable

        M586 P0 S1 ; Enable HTTP

        M586 P1 S0 ; Disable FTP

        ; Drives

        M569 P0 S0 ; Drive 0 X goes forwards

        M569 P1 S0 ; Drive 1 Y goes forwards

        M569 P2 S0 ; Drive 2 Z goes forwards

        M569 P3 S0 ; Drive 3 Z

        M569 P4 S1 ; Drive 4 Extruder goes forwards

        M584 X0 Y1 Z2:3 E4 ; Driver 0 For X, 1 for Y, Z=2:3 U=3, Extruder 4, Show all 4 axis on GUI

        ; Define the X and Y coordinates of the leadscrews.
        ; Must come after M584 (Set drive mapping), M667 (Select CoreXY Mode) and M669 (Choosing Kinematics type)
        ; Motor order: Front right (1), front left (2).
        ; Snn Maximum correction in mm to apply to each leadscrew (optional, default 1.0)
        M671 X-40:336.5 Y128.7:128.7 S2 F1 ;Leadscrews at left and right

        M350 X128 Y128 Z128:128 U128 E128 ; Configure microstepping

        M92 X640 Y640 Z3200:3200 U3200 E3348 ; Set steps per mm

        M566 X900 Y900 Z100:100 U100 E120 ; Set maximum instantaneous speed changes (mm/min)

        M203 X6000 Y6000 Z1000:1000 U1000 E1200 ; Set maximum speeds (mm/min)

        M201 X2000 Y2000 Z600:600 U600 E1000 ; Set accelerations (mm/s^2)

        M906 X1000 Y1000 Z400:400 U400 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent

        M84 S30 ; Set idle timeout

        ; Axis Limits
        M208 X0 Y0 Z0:0 U0 S1 ; Set axis minimum

        M208 X295 Y275 Z310:310 U310 S0 ; Set axis max

        ; Endstops

        M574 X1 Y1 S1 ; X home to min. Y home to max. Normally Closed limit switches.
        M574 Z1 S2 ; Define Z to use Probe. Home to Min

        M574 U1 S2

        ; Z-Probe (Bltouch)

        M558 P9 H5 F100 T4000 X0 Y0 Z1 ; Set Z probe type/mode 5. H=Dive Height. F=Speed the bed moves

        G31 P25 X-21.5 Y0 Z2.642 ; Z probe trigger value, offset in relation to nozzle. And trigger height adjustment

        M557 X30:250 Y15:215 S100 ; Define mesh grid S240

        ; Heaters

        ; BLTouch - Heaters
        M307 H7 A-1 C-1 D-1 ; Disable the 7th Heater to free up PWM channel 5 on the Duex board.

        M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0

        M305 P0 T100000 B4725 C7.060000e-8 R4700
        M143 H0 S120 ; Set temperature limit for heater 0 to 120C

        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 F75 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off

        M106 P1 S0 I0 F26000 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

        M106 P2 S1 I0 F26000 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

        ; Tools

        M563 P0 D0 H1 ; Define tool 0

        G10 P0 X0 Y0 Z0 U0 ; Set tool 0 axis offsets

        G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

        ; Automatic power saving

        M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

        ; Pressure Advance

        M572 D0 S0.02

        ; Heater 3 LEDs

        M307 H3 A-1 C-1 D-1

        M42 P3 S0

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

          @bret4 said in Two motor leveling with bltouch:

          I'm trying to do two motor leveling with bltouch on my hypercube evolution printer. I home the printer. Then when I call g32 to get the two z motor screws in sync it works but I get this message.

          G32
          Leadscrew adjustments made: -0.285 0.264, points used 2, deviation before 0.164 after 0.000
          Error: Bad command: Define XY Coordinates in config.g

          I an get the error down to .000 sometimes most times it is more like .008 or more. But that may take running G32 4 to 7 times before it is under .020. What does the Error message mean? Is it normal to take so many tries to get the motors level?

          1. The error message probably means that you have the text "Define XY Coordinates in config.g" somewhere near the end of your bed.g file, intended to be a comment but not preceded by a semicolon.

          2. The leadscrew adjustment algorithm assumes perfectly gimballed joints between the bed and the leadscrews. In practice this is rarely the case, so typically you need more than the amount of correction that it makes. If it consistently under-corrects, you can use the F parameter of the M671 command to force the correction to be increased, e.g. F1.5 will perform 50% more correction than calculated.

          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
          • bret4undefined
            bret4
            last edited by

            Thanks. I'll give that a try.

            1 Reply Last reply Reply Quote 0
            • bret4undefined
              bret4
              last edited by

              @dc42 said in Two motor leveling with bltouch:

              Define XY Coordinates in config.g

              You were exactly correct that the error was a line at the end of my bed.g

              Define XY Coordinates in config.g looked like this so I put the ; to comment it out and no more error message.

              I have a feeling that I am just expecting to much from screw leveling being that I am a toolmaker by trade and am used to getting things perfect. Where the bed may be off by so small an amount that it really doesn't matter.

              I also had a problem with using mirror glass for the bed surface. It was so warped that it was driving me crazy as to why I couldn't get things flat with glass. Put a smaller 10 inch by 10 inch Borosilicate glass on the bed and it is like night and day on how flat it is. I will be ordering a 300mm x 300mm Borosilicate glass to replace the mirror glass.

              The Heightmap is a powerful tool.

              1 Reply Last reply Reply Quote 0
              • bret4undefined
                bret4
                last edited by

                Been trying different F numbers and 1 seems to work as good if not better than any other number. Seems to be a matter of luck as to when I get something under .010 . A nice feature would be if there was a way to use something like an if then statement to level the lead screws to keep running and checking until you get a number say less than or = to something that you want. It would just keep repeating the leveling of the motor screws until it gets flat enough to your liking.

                Having this would make it easy to automate the complete leveling of the printer. You could home the machine then level the screws, then do a g29 to check bed flatness.

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

                  @bret4 said in Two motor leveling with bltouch:

                  A nice feature would be if there was a way to use something like an if then statement to level the lead screws to keep running and checking until you get a number say less than or = to something that you want. It would just keep repeating the leveling of the motor screws until it gets flat enough to your liking.

                  Added to the firmware work list. It may need to wait until we have implemented looping and conditionals in GCode.

                  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
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA