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

    Coordinate System Correction Help

    Scheduled Pinned Locked Moved Solved
    Using Duet Controllers
    2
    6
    198
    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.
    • JRCLundefined
      JRCL
      last edited by

      I've been trying to setup my coordinate system correctly for a bit and I'm just turning myself around at this point. When I first home my X (bed) and Y (hot end) they both go the correct direction and home at the location I want them to.

      However, when I got to home z and it's in the absolute mode, it goes the wrong way to get back to (0,0) where I have it probing in homez.g. What do I need to change to get correctly oriented in absolute mode? Is it my homing files that are wrong? is it my axis limits? end stop config? probe offsets? Any help is appreciated as I seem to be directionally challenged at the moment

      My Config.g File

      ; CONFIG.G
      ; Drives
      M569 P0 S1                                      ; physical drive 0 goes forwards (eventually X)
      M569 P1 S1                                      ; physical drive 1 goes forwards (eventually Y)
      M569 P2 S1                                      ; physical drive 2 goes forwards (eventually Z)
      
      ; Axis Limits
      M208 X-5 Y-5 Z0  S1                                ; set axis minima
      M208 X150 Y150 Z200 S0                          ; set axis maxim
      
      ; Endstops
      M574 X1 S3                                      ; configure sensorless endstop for high end on X
      M574 Y1 S3                                      ; configure sensorless endstop for high end on Y
      M915 X Y R0 F0 S5  							; configure stall detection for X and Y
      
      ; Z-Probe
      M950 S0 C"duex.pwm1" 							; Duet 2 WiFi/Ethernet + DueX2/5
      M558 P9 C"^zprobe.in" H5 F120 T6000 			; Duet 2 WiFi/Ethernet, DueX2/5
      G31 P500 X20.888 Y33.5 Z4.3           				; set Z probe trigger value, offset and trigger height
      M557 X0:150 Y0:150 P3							; define probing grid
      
      

      Home X/Y

      G91					     ;relative positioning
      G1 H1 X320.5 F10000      ; move quickly to X axis endstop and stop there (first pass)
      G1 H2 X-5 F12000            ; go back a few mm
      G1 H1 X320.5 F7000        ; move slowly to X axis endstop once more (second pass)
      G90                                    ; absolute positioning
      
      
      G91					       ; relative positioning
      G1 H1 Y320.5 F10000         ; move quickly to X axis endstop and stop there (first pass)
      G1 H2 Y-5 F12000               ; go back a few mm
      G1 H1 Y320.5 F7000           ; move slowly to X axis endstop once more (second pass)
      G90                                        ; absolute positioning
      

      Home Z

      G91                ; relative mode
      G1 H2 Z10 F200      ; raise head 4mm to ensure it is above the Z probe trigger height
      G90                ; back to absolute mode
      G1 X0 Y0 F2000 ; put head over the centre of the bed, or wherever you want to probe
      G30                ; lower head, stop when probe triggered and set Z to trigger height
      
      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • JRCLundefined JRCL marked this topic as a question
      • fcwiltundefined
        fcwilt @JRCL
        last edited by

        @jrcl

        In your M574 commands you have specified that X and Y have "endstops" at the low end but your homing code is moving toward the high end.

        Since you are using stall detection the homing code is going to finish but the X and Y positions should end up set to -5.

        I don't think you want that.

        In the code for homing Z you have a move to X = 0 and Y= 0 - this is going to end up moving away from where X and Y stopped after homing.

        Where do you want 0, 0 to be? At the left front corner of the bed or the center of the bed?

        Frederick

        Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

        JRCLundefined 1 Reply Last reply Reply Quote 0
        • JRCLundefined
          JRCL @fcwilt
          last edited by

          @fcwilt the left front corner

          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @JRCL
            last edited by

            @jrcl said in Coordinate System Correction Help:

            @fcwilt the left front corner

            OK - since you have the "endstop" sensing specified at the low end of the X/Y axes you need to re-do you homing code so X/Y move toward the low end, not the high end as you have now.

            Remember when a low end endstop is triggered the axis position is set to the axis min value from M208 and when a high end endstop is triggered the axis position is set to the axis max value from M208.

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

            JRCLundefined 1 Reply Last reply Reply Quote 2
            • JRCLundefined
              JRCL @fcwilt
              last edited by JRCL

              @fcwilt said in Coordinate System Correction Help:

              Remember when a low end endstop is triggered the axis position is set to the axis min value from M208 and when a high end endstop is triggered the axis position is set to the axis max value from M208.

              Got it, that helps 👍. Now I've got everything setup (mostly) correctly, where X and Y are homing in the right place, DWC buttons move the axis the correct direction, but when I home Z my tool goes back to true (0,0) and not (35, 45) where I specified after X and Y hit the end stop in the homing files. What H value should I have for my last G1 command in homex.g and homey.g so that the adjustments to get it over the bed stay as 0,0 in absolute positioning.

              ;HOME X
              G91					;relative positioning
              G1 H1 X320.5 F10000 ; move quickly to X axis endstop and stop there (first pass)
              G1 H2 X-5 F12000 ; go back a few mm
              G1 H1 X320.5 F7000 ; move slowly to X axis endstop once more (second pass)
              G1 H1 X-35 F7000 ; move so Z probe is over bed in X direction
              G90 ; absolute positioning
              
              ;HOME Y
              G91					; relative positioning
              G1 H1 Y-320.5 F10000 ; move quickly to X axis endstop and stop there (first pass)
              G1 H2 Y5 F12000 ; go back a few mm
              G1 H1 Y-320.5 F7000 ; move slowly to X axis endstop once more (second pass)
              G1 H1 Y45 F7000 ; move so Z probe is over bed in Y direction
              G90 ; absolute positioning
              
              ; HOME Z
              G91                ; relative mode
              G1 H2 Z10 F200      ; raise head 4mm to ensure it is above the Z probe trigger height
              G90                ; back to absolute mode
              G1 X0 Y0 F2000 ; put head over the centre of the bed, or wherever you want to probe
              G30                ; lower head, stop when probe triggered and set Z to trigger height
              
              fcwiltundefined 1 Reply Last reply Reply Quote 0
              • fcwiltundefined
                fcwilt @JRCL
                last edited by

                @jrcl

                Unless you changed the M208 min settings both X and Y have a min value of -5.

                You are still homing X toward the high end instead of the low end where you specified the "endstop" is - see the M574 command for X.

                Once both the X and Y homing files are correctly homing towards the low end then the logical position of both X and Y will be set to -5 because that is the value set in M208.

                Are those values actually correct in that you want X=0 and Y=0 to be 5mm from the low end of each axis?

                When homing X you have a final move G1 H1 X-35 F7000. When homing Y you have a final move G1 H1 Y45 F7000.

                G1 H1 moves are only used when seeking an endstop, either a physical switch or via stall detection.

                So those final moves serve no purpose or not the purpose you intend. What do you believe those moves are doing?

                Usually the goal of homing X and Y is to establish the desired position for X=0 Y=0. Is that what you are trying to do?

                Also what is the intent of including a .5 after some of the values in the X and Y homing files? You only need a value large enough to insure enough movement to reach the limit of travel so that stall detection works. Since X and Y max are specified as 150 in the M208 I assume they are the limit of travel in the direction of the high end? If so homing moves of 160 will be all that is needed to insure homing works.

                Frederick

                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                1 Reply Last reply Reply Quote 2
                • JRCLundefined JRCL has marked this topic as solved
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA