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

Catch movements beyond axis limits

Scheduled Pinned Locked Moved
Firmware wishlist
6
8
321
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
    justus2342
    last edited by 1 Dec 2022, 08:22

    I would like to have some mechanism, that triggers custom gcode when a (print) move is soft-limited because it goes outside the printable area.

    I would like to have this feature, to catch problematic prints before they actually fail.

    Tevo Little Monster (Duet2, Smart Effector, lin Rails, Magb. Arms)
    Anycubic Delta Linear Plus (Duet2, Smart Effector, Magb. Arms)
    Two Trees Sapphire Pro (MKS Robin, Marlin 2.x, D. Extruder)

    undefined 1 Reply Last reply 1 Dec 2022, 09:15 Reply Quote 0
    • undefined
      dc42 administrators @justus2342
      last edited by dc42 12 Jan 2022, 09:56 1 Dec 2022, 09:15

      @justus2342 said in Catch movements beyond axis limits:

      I would like to have this feature, to catch problematic prints before they actually fail.

      Unless the GCode file declares the limits of the print at the start, that would require scanning the whole GCode file to determine the limits, before they can be compared with the bed limits. Here are two ways in which that could be done:

      • If you use Duet with attached SBC, that could be done using a DSF plugin.
      • In standalone mode, it would be possible to run the print in simulation mode and have RRF warn or abort the simulation if it goes outside limits

      In fact I think it may already be possible use simulation mode to achieve this. RRF tracks the limits of each object being printed, and those limits are available from the object model. So I think you could construct a stop.g file that compares the object limits with the bed limits.

      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
        justus2342
        last edited by justus2342 12 Jan 2022, 09:40 1 Dec 2022, 09:37

        For clarification: I wrote

        catch problematic prints before they actually fail.

        Of course it would be nice, to check even before the print starts. But to my understanding it would also be sufficient to have a trigger, when a move outside the print area is about to happen or just happened. That is what I am suggesting here to implement.

        A potentially catastrophic failure would be prevented if the print is paused just after the "bad" print move.


        @dc42 said in Catch movements beyond axis limits:

        If you use Duet with attached SBC, that cold be done using a DSF plugin.

        Are you referencing to a existing plugin or are you just pointing out that such a plugin could be written?

        Tevo Little Monster (Duet2, Smart Effector, lin Rails, Magb. Arms)
        Anycubic Delta Linear Plus (Duet2, Smart Effector, Magb. Arms)
        Two Trees Sapphire Pro (MKS Robin, Marlin 2.x, D. Extruder)

        undefined 1 Reply Last reply 1 Dec 2022, 09:39 Reply Quote 0
        • undefined
          jay_s_uk @justus2342
          last edited by 1 Dec 2022, 09:39

          @justus2342 he's pointing out one could be written

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          1 Reply Last reply Reply Quote 0
          • undefined
            OwenD
            last edited by OwenD 12 Apr 2022, 01:44 4 Dec 2022, 01:15

            @justus2342
            If you are using Prusa Slicer or SuperSlicer then you can get the values and just call a macro to do the checks provided that you use a skirt.
            The slicer only appears to provide access to the first layer, so if you don't use a skirt, it won't work in a print that has a small base.

            Put something like this in your slicer start code

            M98 P"0:/sys/checklimits.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} E{(total_layer_count-1)*layer_height+first_layer_height}
            

            Then in your macro do this

            ;0:/sys/checklimits.;
            ; used to ensure print isn't outside bed limits
            ; requires paramaters A,B,C,D,E be sent from slicer
            if (!exists(param.A)) || (!exists(param.B)) || (!exists(param.C)) || (!exists(param.D)) || (!exists(param.E))
            	abort "Limits check macro called with no parameters"
            
            if (param.A < move.axes[0].min) || (param.B > move.axes[0].max) || (param.C < move.axes[1].min) || (param.D > move.axes[1].max) || (param.E > move.axes[2].max)
            	abort "Print moves outside bed limits - print aborted"
            

            EDIT: Corrected typo and added Z height check

            undefined 1 Reply Last reply 22 Dec 2022, 12:37 Reply Quote 1
            • undefined
              T3P3Tony administrators @OwenD
              last edited by 22 Dec 2022, 12:37

              @OwenD said in Catch movements beyond axis limits:

              The slicer only appears to provide access to the first layer, so if you don't use a skirt, it won't work in a print that has a small base.

              unfortunately AFAIK prusa slicer skirt is only around the base layer so this does not help for prints that have a small base.

              www.duet3d.com

              undefined 1 Reply Last reply 22 Dec 2022, 20:49 Reply Quote 0
              • undefined
                OwenD @T3P3Tony
                last edited by 22 Dec 2022, 20:49

                @T3P3Tony said in Catch movements beyond axis limits:

                @OwenD said in Catch movements beyond axis limits:

                The slicer only appears to provide access to the first layer, so if you don't use a skirt, it won't work in a print that has a small base.

                unfortunately AFAIK prusa slicer skirt is only around the base layer so this does not help for prints that have a small base.

                Indeed that is correct.
                So post processing or simulating is required.

                1 Reply Last reply Reply Quote 0
                • undefined
                  mrehorstdmd
                  last edited by mrehorstdmd 22 Dec 2022, 22:30

                  I know Prusa slicer and Cura both warn when the print is too big for the printer. AFAIK, all slicers will prevent you from generating gcode files that go beyond the print limits of the machine- that's why they want to know how big the bed is and the maximum Z dimension when you configure the printer.

                  If you're trying to run gcode generated for a different machine on your printer all bets are off. For that I'd say either don't do it or write a simple processor that reads the coordinates of all the moves in the gcode file and looks for any that are beyond the limits of your printer. Movement beyond axis limits is only one problem. There could be all sorts of other problems buried in the gcode, such as print speed or acceleration being too high for the printer.

                  If you're trying to detect layer shifting while printing, you'll need some limit switches that detect movement beyond axis limits because in a layer shifted print, the controller thinks everything is fine, even if it sends the extruder and/or bed beyond the limits of an axis. Keep in mind that layers can shift without moving beyond axis limits, so those added switches may not do any good. Some Markforged printers detect layer shifting by rehoming X and Y axes after every layer. If the extruder and/or bed travels the correct distance to reach home, the print isn't shifted and it's OK to print the next layer. I ran an experiment with this idea when I installed optical endstops in my corexy printer. The problem with rehoming every layer is it adds significantly to the total print time even as it minimizes wasted filament. You could rehome every 10th layer- that would reduce time spent rehoming but allow some waste of filament if the print was shifted.

                  My printer doesn't shift, ever, because I use conservative settings and maintain the mechanism. If you're experiencing frequent layer shifts, maybe there's a hardware problem that needs to be addressed, or it's time to adjust your expectations of the printer's performance limits and reconfigure accordingly.

                  https://drmrehorst.blogspot.com/

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