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

    G28 confusion

    Scheduled Pinned Locked Moved Solved
    General Discussion
    3
    5
    229
    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.
    • Chrissundefined
      Chriss
      last edited by

      Hi *,

      I'm a bit confused about the G28 command.

      I have a coreyx. A mini 5+ on 3.4 beta6.

      The problem:
      Everything works fine when I home x, y and z with "G28 Y", "G28 X" "G28 Z".

      So I assume that my home*.g files work fine.
      The homeall.g looks like that:

      G91                     ; relative positioning
      M561               		; Unload the hightmap
      ;G1 H2 Z5 F6000         ; lift Z relative to current position
      
      
      M98 P"0:/sys/homex.g"
      M98 P"0:/sys/homey.g"
      M98 P"0:/sys/homez.g"
      

      The expectation is that the head moves to the center for z-home. That is what it does when I execute it with "G28 Z". But it drives to Y and X max and drives down.

      My understanding is that G28 executes homeall.g only.
      The funny thing is that z drives down in the center (as expected) when I uncomment the "M98 P"0:/sys/homez.g"" from the homeall.g. My expectation is that Z shall not move at all when I do not source the homez.g from the homeall.g.

      What is wrong here in my understanding?

      Cheers, Chriss

      PCRundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • PCRundefined
        PCR @Chriss
        last edited by

        @chriss when there is no home Z move in home all.g rrf will look for homez.g and execute it when you command G28

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

          @chriss please post your homez.g file.

          To expand on the response from @PCR: if you command G28 with no axes or all axes mentioned, then RRF will run homeall.g. If after that some axes are not homed, it will run the individual homing files for those axes.

          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

          Chrissundefined 1 Reply Last reply Reply Quote 0
          • Chrissundefined
            Chriss @dc42
            last edited by

            @dc42 That may explained the behavior that I saw movement of Z when I removed the "M98 P"0:/sys/homez.g"".
            So I understood:
            G28 will execute "homez.g" if the "homeall.g" execution left z unhomed. Is that what you and @PCR said?

            Here are some more files:
            homez.g

            ; homez.g
            ; called to home the Z axis
            ;
            M98 P"/macros/print_scripts/do_z_probe_probe.g"
            

            /macros/print_scripts/do_z_probe_probe.g

            M98 P"/macros/print_scripts/z_current_low.g"
            M98 P"/macros/print_scripts/activate_z_probe.g"
            M98 P"/macros/print_scripts/speed_probing.g"
            M98 P"/macros/print_scripts/goto_center.g"
            G30 Z-99999
            G1 Z10 ; lift Z
            M98 P"/macros/print_scripts/z_current_high.g"
            M98 P"/macros/print_scripts/speed_printing.g"
            M98 P"/macros/print_scripts/activate_z_switch.g"
            

            M98 P"/macros/print_scripts/goto_center.g"

            G1 X111 Y120 F6000
            

            You see that there are a lot of macros involved. I'm not sure that it will be clear what I try to do.

            In short: I do not understand that the behavior of the z movement is different when I execute homez.g manually or when it is done via the G28.
            It looks to me like the z movement from G28 is the movement I do in the bed.g. Does hat file have it's fingers in that G28 cake by any chance?

            Cheers, Chriss

            Chrissundefined 1 Reply Last reply Reply Quote 0
            • Chrissundefined
              Chriss @Chriss
              last edited by

              @dc42

              I found the error in my scripts:
              You see that move to X111 Y120 in the goto_center.g? I included a G90 to make sure that it acts as expected. The behavior is fine now, after some fine tuning. I'm more than sorry.....

              Thanks for the clarification! The execution of homeN.g if the axe N is not homed via the homeall.g. That explains a lot I saw in the past and confused me a couple of times back than.

              Cheers,
              Chriss

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