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

End of print conditional position change?

Scheduled Pinned Locked Moved
Gcode meta commands
3
7
428
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
    Thalios
    last edited by 29 Apr 2021, 21:27

    Hello, I'm trying to make my life a touch easier and prevent errors like clicking the wrong button at the end of a print, so I was wondering if there's a way to do this:

    I want the Z to increase by 100 at the end of a print, but not if it will go past the limit (305).

    Is it possible to add a end gcode in the slicer like:

    if Z is between 0 and 200, add 100 to Z
    If Z is between 201 and 249, Move Z to 300
    If Z is 250 or more, don't move Z

    Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
    Heavily modified Ender 3 Pro (Duet 3 6HC)
    Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
    CR-10S Pro V2 (Duet 3 Mini 5+)
    and a bunch of SLA printers..

    undefined 1 Reply Last reply 29 Apr 2021, 21:31 Reply Quote 0
    • undefined
      engikeneer @Thalios
      last edited by 29 Apr 2021, 21:31

      @thalios if you've set up your machine limits it will respect them anyway

      Try moving to z=300, then jogging it 100mm via DWC. It will still end up at 305mm in your case. Simply add a relative motion to your end gcode.

      Alternatively you could add some conditional gcode to stop.g to do something more clever?

      E3D TC with D3Mini and Toolboards.
      Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
      i3 clone with a bunch of mods

      undefined 1 Reply Last reply 29 Apr 2021, 21:32 Reply Quote 1
      • undefined
        Thalios @engikeneer
        last edited by 29 Apr 2021, 21:32

        @engikeneer That's not really what I want to do. Yes it is set properly in the Duet, but I want it to do different things as per my example depending on where it's at. I don't want a 25mm print to send the bed all the way down to 305 for nothing.

        Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
        Heavily modified Ender 3 Pro (Duet 3 6HC)
        Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
        CR-10S Pro V2 (Duet 3 Mini 5+)
        and a bunch of SLA printers..

        undefined 1 Reply Last reply 29 Apr 2021, 22:06 Reply Quote 0
        • undefined
          OwenD @Thalios
          last edited by 29 Apr 2021, 22:06

          @thalios
          Do as @engikeneer suggested and put your conditional code in stop.g
          use the object model to get the current Z height.

          1 Reply Last reply Reply Quote 0
          • undefined
            Thalios
            last edited by 29 Apr 2021, 22:14

            I was thinking something like this:

            {if Z< 200} G1 Z+100 F10000
            {elsif Z>= 200} G1 Z300 F10000
            {endif}

            I just cannot find infos on wether these commands are valid..

            I guess i'll just try it hehe

            Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
            Heavily modified Ender 3 Pro (Duet 3 6HC)
            Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
            CR-10S Pro V2 (Duet 3 Mini 5+)
            and a bunch of SLA printers..

            undefined 1 Reply Last reply 29 Apr 2021, 22:26 Reply Quote 0
            • undefined
              OwenD @Thalios
              last edited by 29 Apr 2021, 22:26

              @thalios said in End of print conditional position change?:

              I was thinking something like this:

              {if Z< 200} G1 Z+100 F10000
              {elsif Z>= 200} G1 Z300 F10000
              {endif}

              I just cannot find infos on wether these commands are valid..

              I guess i'll just try it hehe

              The wiki section on IF statements is here
              https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Conditional_construct

              There are lots of examples in the meta commands section of the forum that should help you construct what you want.

              1 Reply Last reply Reply Quote 0
              • undefined
                Thalios
                last edited by 29 Apr 2021, 22:41

                Wow I was approaching this totally the wrong way...

                All I have to do, as per your recommandations, is to set in relative mode, and add 100 to Z...

                I was WAYYYYYYY overthinking this...

                Thanks guys

                Railcore II 300ZL with lots of upgrades (Duet 3 6HC)
                Heavily modified Ender 3 Pro (Duet 3 6HC)
                Heavily modified Tronxy X5SA-500 Pro with Chimera+ and dual bondtech (Duet 3 6HC)
                CR-10S Pro V2 (Duet 3 Mini 5+)
                and a bunch of SLA printers..

                1 Reply Last reply Reply Quote 1
                3 out of 7
                • First post
                  3/7
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA