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

    Slow down before endstop?

    Scheduled Pinned Locked Moved
    CNC
    11
    101
    6.7k
    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.
    • chimaeraghundefined
      chimaeragh @fcwilt
      last edited by

      @fcwilt With CNC machining, being the messy process it is, isn't there a possibility of this sensor being triggered by waste material falling on it and breaking the beam?

      Duet 2 Wifi, Ooznest Workbee CNC 1510

      theKMundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
      • theKMundefined
        theKM @theKM
        last edited by

        In thinking about this from a gcode point of view, is there a way to describe a an ideal deceleration?

        In pseudo-code...

        • travel fast until switch A
        • change from fast to slow over 100mm
        • travel slow until switch B

        ...the first line is already what happens, just that the next line is "abort" or "set machine position as___"

        Reading the gcode docco, that sounds it might just be the existing feedrate codes as long as there's a following traversal command for it to continue with... but would the board think that the machine is still at speed or assume it's starting the next command from 0?

        1 Reply Last reply Reply Quote 0
        • theKMundefined
          theKM @fcwilt
          last edited by

          @fcwilt nice sensor!... electronically it seems pretty straight forward, even using a microswitch that can slide would work fine... I'm as much needing the knowledge that there's inputs on the board to take the switch, and the g-code resembles to get it to work

          1 Reply Last reply Reply Quote 1
          • theKMundefined
            theKM @jens55
            last edited by

            @jens55 ...the crunch is getting the machine to stop on a dime, it needs the interpolation of acceleration to do anything elegantly. When I was first setting it up, the default acceleration for printers is super fast, it was rather horrible watching it move 🙂

            1 Reply Last reply Reply Quote 0
            • jens55undefined
              jens55
              last edited by

              Another method that is often used with CNC mills is to allow the switch to be bypassed. Instead of the carriage directly activating the end switch, the switch is mounted to the side and a lever is used to activate it. The carriage approaches the lever and depresses it which activates the end stop switch but there is no hard stop so if it takes a mm for the carriage to stop, nothing is harmed.
              You could use a micro switch with a lever with a roller on the end and have a protrusion on the carriage that activates the lever without running into a stop.
              Hard to explain but very simple and effective.

              theKMundefined 1 Reply Last reply Reply Quote 3
              • theKMundefined
                theKM @chimaeragh
                last edited by

                @chimaeragh ...the "you're close" switch I imagine would be ignored unless explicitly told to watch for it when homing, otherwise the machine would just calculate if it's in bounds and do its thing, and stop with the e-stops if something went horribly wrong (jammed, lost steps, blah blah).

                I'm also thinking that a swiping/roller style micro switch would work fine and wouldn't be triggered by waste material.

                1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @chimaeragh
                  last edited by fcwilt

                  @chimaeragh said in Slow down before endstop?:

                  @fcwilt With CNC machining, being the messy process it is, isn't there a possibility of this sensor being triggered by waste material falling on it and breaking the beam?

                  Sorry, I missed the fact that this was posted in the CNC section.

                  You could likely arrange the sensor so swarf wouldn't block it but during homing operations you wouldn't be creating any would you?

                  And the activation of the sensor is only meaningfull during a homing operation, any other activations are simply ignored.

                  Frederick

                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • theKMundefined
                    theKM @fcwilt
                    last edited by

                    @fcwilt ...sounds perfect, what's the g-code and inputs look like for that?... is it just like the usual "travel until switch" gcode, and then the next line is a new feedrate?

                    1 Reply Last reply Reply Quote 0
                    • theKMundefined
                      theKM @jens55
                      last edited by theKM

                      @jens55 ...the arm sliding/roller was what I was thinking, but just curious about the hookups and g-code, is it just having the new feedrate on the next line with some distance to travel after that?

                      (I guess line after is the new feedrate, then after that the usual "travel until endstop")

                      jens55undefined chimaeraghundefined fcwiltundefined 3 Replies Last reply Reply Quote 0
                      • jens55undefined
                        jens55 @theKM
                        last edited by jens55

                        @thekm, this is one of my homex.g codes:

                        G91               ; relative positioning
                        G1 Z5 F6000 H2    ; lift Z relative to current position
                        G1 H1 X-550 F6000 ; move quickly to X axis endstop and stop there (first pass)
                        G1 X5 F6000       ; go back a few mm
                        G1 H1 X-550 F360  ; move slowly to X axis endstop once more (second pass)
                        G1 Z-5 F6000 H2   ; lower Z again
                        G90               ; absolute positioning
                        

                        This is on a 500 mm x axis hence the '550'

                        1 Reply Last reply Reply Quote 1
                        • chimaeraghundefined
                          chimaeragh @theKM
                          last edited by

                          @thekm May need to use conditional gcode in this one

                          Duet 2 Wifi, Ooznest Workbee CNC 1510

                          1 Reply Last reply Reply Quote 0
                          • fcwiltundefined
                            fcwilt @theKM
                            last edited by

                            @thekm said in Slow down before endstop?:

                            @...the arm sliding/roller was what I was thinking, but just curious about the hookups and g-code, is it just having the new feedrate on the next line with some distance to travel after that?

                            (I guess line after is the new feedrate, then after that the usual "travel until endstop")

                            If you can arrange things so that the sensor is triggered a suitable distance before the end of travel and remain triggered until the end of travel I believe you would be fine with one sensor, be it a micro-switch equipped with a roller, an IR sensor, an inductive sensor, etc.

                            The important thing being is that the sensor cannot be struck by the moving part.

                            For example on one of my printers that uses the IR sensors the axis is 300mm long and the sensor triggers at 280 and remains so until 300.

                            So even at a high speed there is plenty of time for it to stop. Then I back off a bit and do it again at a slow speed to improve accuracy.

                            Frederick

                            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                            theKMundefined 1 Reply Last reply Reply Quote 0
                            • theKMundefined
                              theKM @fcwilt
                              last edited by

                              @fcwilt the backup-and-go-again is an accuracy thing. In my case, it's the stopping at speed that is the problem. it really needs to decelerate to go slow before being told to stop.

                              fcwiltundefined 1 Reply Last reply Reply Quote 0
                              • fcwiltundefined
                                fcwilt @theKM
                                last edited by

                                @thekm said in Slow down before endstop?:

                                @fcwilt the backup-and-go-again is an accuracy thing. In my case, it's the stopping at speed that is the problem. it really needs to decelerate to go slow before being told to stop.

                                Well if you can say with certainty how long it takes to stop then you can position the one sensor at an appropriate location.

                                The important thing is that the sensor remain triggered from that position until the end of travel.

                                Normal moves have controlled acceleration/deceleration. I don't know what controls deceleration when an endstop is triggered - I would need to do some research.

                                Frederick

                                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                theKMundefined 1 Reply Last reply Reply Quote 0
                                • theKMundefined
                                  theKM @fcwilt
                                  last edited by theKM

                                  @fcwilt ...I get what you're saying, it stops wherever it stops, then re-measure it. But again, it is the stopping that is the problem. When it stops, it a hard stop. It's asking a very heavy machine to stop instantly, and the inertia is putting a lot of unnecessary strain on the ballscrews, the crunch is terrible. Nobody mechanically minded would think that the crunch is the sound of a properly operating machine during regular operation 🙂

                                  ...so I'm after a way for the controller to apply the max deceleration value and slow it down nicely ahead of the stop.

                                  fcwiltundefined 1 Reply Last reply Reply Quote 0
                                  • fcwiltundefined
                                    fcwilt @theKM
                                    last edited by

                                    @thekm said in Slow down before endstop?:

                                    ...so I'm after a way for the controller to apply the max deceleration value and slow it down nicely ahead of the stop.

                                    The greater the deceleration the more abrupt the stop - I think you need less deceleration.

                                    Let me do a test to see what settings control deceleration at an endstop. Won't take but an hour or two.

                                    Frederick

                                    Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                    theKMundefined 1 Reply Last reply Reply Quote 0
                                    • theKMundefined
                                      theKM @fcwilt
                                      last edited by theKM

                                      @fcwilt ...correct, this is the setting used to describe the fastest rate the machine can accelerate or decelerate, so when it's processing tool paths it slows down and speeds up appropriately for corners.

                                      But the controller doesn't use these settings for the homing/move-until-switch operations, which is a hard, abrupt stop. If i could just tell it to apply the max deceleration and stop gracefully, that's what I'm after... as I could then tell it to slow down and measure the hard stop point in the usual way.

                                      I super appreciate the help!!!

                                      ...until I found the max accel/decel settings, watching it take hard corners like a 3d printer was really horrible 🙂

                                      fcwiltundefined 1 Reply Last reply Reply Quote 0
                                      • jens55undefined
                                        jens55
                                        last edited by

                                        I don't get why you wouldn't use one of the two options given. What is wrong with using an end stop switch mounted off to the side with a lever and roller and activated by the carriage?
                                        Also, we are talking a single move in the x an y axis that is executed when the machine is initially turned on. 'Crawling' to the end stop would be painful but there is also no reason for the machine to go at maximum speed. You may loose 5 seconds per axis first thing in the morning but does that really matter?
                                        Pick a speed that works for you, change the end stop switch to one that you don't 'run into' and you are set. I don't see the issue .....

                                        theKMundefined 1 Reply Last reply Reply Quote 0
                                        • theKMundefined
                                          theKM @jens55
                                          last edited by theKM

                                          @jens55 ...what I have seen are suggestions for switches. And that's cool. It was my plan to use exactly the switch ideas mentioned (micro switches with long arms and rollers).

                                          Except for my car and tractor, this CNC machine is the heaviest thing that I own, it is a brick. It is also just shy of being the size of a queen sized bed. Telling the gantry to stop instantly without decelerating is prohibitive unless it is crawling. If this was about "5 seconds per axis" I would not have posted, I promise.

                                          I want to look after the machine and I would like to be more productive when using it, and so I need a way to tell it to slow down when it passes a switch so it can be moving slow enough to stop dead when it actually gets to the e-stop.

                                          At the moment I'm just using the e-stops for emergencies only to stop the machine dead, and just hope I don't put in any action in that hits them while trying to manage the job space... because whenever I trigger the e-stops I have to go over all the job setup again because the controller has reset, like it should when it hits emergency stops as it thinks it's an emergency. So, it would be much more productive if I could let the machine discover its work area before running jobs.

                                          As indicated by other responses though, I'm not the only one who would like to take advantage of this efficiency.

                                          jens55undefined 1 Reply Last reply Reply Quote 0
                                          • jens55undefined
                                            jens55 @theKM
                                            last edited by

                                            @thekm said in Slow down before endstop?:

                                            It is also just shy of being the size of a queen sized bed.

                                            Ahhh .... a 'serious' sized machine ....

                                            At the moment I'm just using the e-stops for emergencies

                                            I am now confused as to how we got to e-stops (as in emergency stop) as compared to an end stop. Probably just a slip of the tongue/keyboard but those are not the same thing.

                                            So if I understand you correctly now, you are concerned not about the carriage hitting the end stop (or at least that's not the only issue) but rather you want the carriage to slow down also because you think that the sudden stop might be too hard on the machine.
                                            If that is the case then yes, mounting another sensor close to the actual end stop would be the way to go. Yes, it will involve some tricky gcode programming because you will need to sense the carriage passing that switch and then reducing the speed. Unfortunately I can't help with the programing of that. Most Duet setups have enough sensor lines that it shouldn't be an issue to connect a suitable sensor.

                                            Good luck and please share your final setup.

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