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

    How can I prevent machine limit to be overriden by slicer code?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    8
    190
    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.
    • kuonundefined
      kuon
      last edited by

      In my config.g, I have machine limit like M203, M201...

      I want to be sure that the slicer cannot override those.

      Is it possible to "lock" those values once config has been read?

      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @kuon
        last edited by

        @kuon no. You'll need to stop the slicer from outputting those values. Most slicers can turn it off

        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

        kuonundefined 1 Reply Last reply Reply Quote 0
        • kuonundefined
          kuon @jay_s_uk
          last edited by

          @jay_s_uk said in How can I prevent machine limit to be overriden by slicer code?:

          @kuon no. You'll need to stop the slicer from outputting those values. Most slicers can turn it off

          Yes I know that, but sometimes people create a new config and output high values which can damage the machine.

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

            @kuon one of the things on my list is to limit the commands that can be run from a job file, in particular banning commands that change machine configuration or machine 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

            dwuk3dundefined 1 Reply Last reply Reply Quote 0
            • dwuk3dundefined
              dwuk3d @dc42
              last edited by

              @dc42 have you ever considered allowing all commands to be overridable with macros like I think you can do with Klipper?

              As this would allow this type of requirement to be met fairly easily I think.

              T3P3Tonyundefined kuonundefined 2 Replies Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators @dwuk3d
                last edited by

                @dwuk For a lot of configuration commands it would require the user to "rewrite" those commands as macros that did the same function, so we would need to implement an alternative way to achieve that command.

                For example M203. if that was replaced with M203.g, the contents would have to be another command that carried out the functionality of M203 + any user logic they wanted to add (like checking if it was being run in config.g or not).

                I can see some sense in being able to override more built in commands with macros (possibly some of the probing commands for example), however configuration commands don't fall into that category for me. For those being able to enable/disable their ability to be run makes more sense.

                www.duet3d.com

                1 Reply Last reply Reply Quote 0
                • kuonundefined
                  kuon @dwuk3d
                  last edited by

                  @dwuk You mean that in config, doing something like (pseudo code): M203 = M291 P"Not allowed" then, using M203 later would run the M291 instead?

                  The danger with that is that I think we should make a distinction between machine files (config, daemon, tfree...) and jobs.

                  dwuk3dundefined 1 Reply Last reply Reply Quote 0
                  • dwuk3dundefined
                    dwuk3d @kuon
                    last edited by

                    @kuon @T3P3Tony Yes something like that - I think in Klipper - you can specify in a Macro - Rename_existing: - That renames the original command, and then you can then put some logic before or after it - and if required still call the original command using its new name.

                    For example in the SV09 Klipper config the M106 fan control command has been overridden to cause both print head cooling fans to turn off and on at the same time.

                    In the standard SOVOL SV08 configuration the following commands have all be overriden.
                    M109, M190,M106, M107, M600.

                    So in the example of M203 you could either completely disable it, or have some logic that set some limits or circumstances when it could be called.

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