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

Home All, XY in the same command?

Scheduled Pinned Locked Moved
Firmware installation
3
7
262
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.
  • undefined
    Reine
    last edited by Reine 13 Mar 2023, 12:54

    I'm looking through examples and see people are issuing three G1 commands for a single move, can't this be done in a single command?

    This is my config, will it work or do I need to adjust to the code below?

    M98 P"0:/sys/motors_low_speed.g"              ; decrease motor speed and current
    G91                                           ; relative positioning
    G1 H2 Z5 F6000                                ; lift Z relative to current position
    
    G1 H1 X-625 Y605 F1800                        ; move quickly to X and Y axis endstops and stop there (first pass)
    if result != 0
      abort "Error during fast XY axis homing - process cancelled"
    
    G1 X5 Y-5 F600                                ; go back a few mm
    G1 H1 X-625 Y605 F360                         ; move slowly to X and Y axis endstops once more (second pass)
    if result != 0
      abort "Error during slow XY axis homing - process cancelled"
    
    G90                                           ; absolute positioning
    
    G1 X{global.Bed_Center_X - sensors.probes[0].offsets[0]} Y{global.Bed_Center_Y - sensors.probes[0].offsets[1]} F1800
    G30                                           ; home Z by probing the bed
    
    M98 P"0:/sys/motors_default_speed.g"          ; reset motor speed and current
    

    Some examples do this, but the two last commands seam redundant too me?

    G1 H1 X-625 Y605 F1800                  ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H1 X-625 F1800                       ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H1 Y605 F1800                        ; move quickly to X and Y axis endstops and stop there (first pass)
    
    undefined 1 Reply Last reply 13 Mar 2023, 13:02 Reply Quote 0
    • undefined
      dc42 administrators @Reine
      last edited by 13 Mar 2023, 13:02

      @Reine said in Home All, XY in the same command?:

      Some examples do this, but the two last commands seam redundant too me?
      G1 H1 X-625 Y605 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
      G1 H1 X-625 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
      G1 H1 Y605 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)

      This pattern is specific to CoreXY machines. On those machines, when either the X or the Y endstop is hit, the move is terminated because both motors need to be stopped. So either X or Y will have been homed; hence the other two lines.

      On a Cartesian machine only the first line is needed.

      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

      undefined 2 Replies Last reply 13 Mar 2023, 13:10 Reply Quote 0
      • undefined
        Reine @dc42
        last edited by 13 Mar 2023, 13:10

        @dc42 ahh makes sense, this CoreXY stuff is new too me, also RRF. Thank you for explaining.

        1 Reply Last reply Reply Quote 0
        • undefined
          Reine @dc42
          last edited by 13 Mar 2023, 13:16

          @dc42 hang on, so why is the first command needed or isn't it?

          Would it be enough doing:

          G1 H1 X-625 F1800 
          G1 H1 Y605 F1800
          

          Or do I have to run all three?

          G1 H1 X-625 Y605 F1800
          G1 H1 X-625 F1800
          G1 H1 Y605 F1800
          
          undefined undefined 2 Replies Last reply 13 Mar 2023, 14:36 Reply Quote 0
          • undefined
            dc42 administrators @Reine
            last edited by dc42 13 Mar 2023, 14:36

            @Reine you could omit the first command. Including it makes homing faster, because both axes will move towards the endstop at the same time until one of them has reached its endstop.

            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
            • undefined
              Reine @Reine
              last edited by 13 Mar 2023, 14:43

              @Reine ahh that makes sense, good to know thank!

              With three commands like that, does my if result != 0 work as "expected" or will it only look at the outcome of the last command?

              undefined 1 Reply Last reply 21 Mar 2023, 11:15 Reply Quote 0
              • undefined
                T3P3Tony administrators @Reine
                last edited by 21 Mar 2023, 11:15

                @Reine the result is the outcome of the last command.

                www.duet3d.com

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