Slow down before endstop?
-
@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.
-
@thekm said in Slow down before endstop?:
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
So you have verified that M204 does not effect homing moves - those like G1 H1?
And I take it simply using a nice, slow speed would simply take too much time?
Frederick
-
@jens55 ...it's fun time to hang out in CNC forums, machines hitting endstops are equivalent to the world ending and should be nuked from orbit (actual quote from someone else on the topic). If it's not expected to hit endstops, then it's the only indicator there is of the machine knowing that things are not good, and it should die as quickly as possible. Powerful machines with powerful tools, plasma cutters, etc etc... it's a reasonable attitude to take, and the endstops are often wired into the same loop as the emergency stop button, and wired to be closed, so if anything breaks the circuit it all stops.
CNC forums are fun, but none will have specifics on the Duet gcode things.
-
@thekm, I agree that a machine should not collide with the end stop. That is why I suggested the sideways switch which does not allow a collision to happen.
-
@fcwilt said in Slow down before endstop?:
M204
I set it with 201, which the docco says 204 will reference as to not exceed.
am curious if 205 will do anything though...
-
@thekm said in Slow down before endstop?:
@fcwilt said in Slow down before endstop?:
M204
I set it with 201, which the docco says 204 will reference as to not exceed.
am curious if 205 will do anything though...
Notice that M201 set acceleration for any kind of move. M204 allows you to put an upper limit on each kind of move - printing and travel.
I need to go test M204.
Frederick
-
On some of the CNC plasma systems we sell, they have two inductive sensors as the end stops.
On reaching the first, the machine slows and on reaching the second it stops and gives a limit error.
I think that on reaching the first, the max speed is reduced. On leaving the zone it's restored.
I think you could use a similar approach provided that you can create triggers that activate on both rising and falling
M581 sort of says that you can if you call it twice for the same input with different values, but you'd have to try.
When M581 is executed, if the T parameter is present but the other parameters are omitted, the trigger inputs and edge polarities for that trigger number are reported. Otherwise, the specified inputs and their polarities are added to the conditions that cause that trigger.EDIT
Thinking on this, I don't think changing the max speed would interrupt a move in progress.
You'd have to segment it -
@owend, that is a good point .... you would have to do the first move to the earlier stop as if it was the real end stop. Then go to the second end stop at a much slower speed.
-
OK.
I verified the M204 T does affect the acceleration of a G1 H1 move but when the endstop is triggered it stops immediately.
Different value for M205 do not seem to change the stopping.
The firmware supports "triggers" which are external events which can run code - but unless something has changed since I last tested that code cannot interrupt a move in progress.
You could possibly "home" using a series of short moves (10mm ?) - the trigger code may get a chance to run at the end of each move and it could do one last move with low deceleration.
I would have to test that.
-
@fcwilt ...the more I play with it the more I think it would need a firmware tweak to get something that decelerates to a value or even decelerate to a stop rather than the hard termination.
-
...or I guess I just need to make sure I home it before I turn the machine off, so that when it turns on it can assume it's not far to travel to home it, and once homed it can assume dimensions for limits. And if I forget to home it, then I suffer the wait of the slow job setup when I turn it back on
-
@thekm said in Slow down before endstop?:
@fcwilt ...the more I play with it the more I think it would need a firmware tweak to get something that decelerates to a value or even decelerate to a stop rather than the hard termination.
I agree. Other than using a series of short moves and a trigger I don't see anyway to have a "soft" endstop.
There is a firmware suggestion category.
Frederick
-
Dumb question: why can't you have and endswitch at, say, 50mm from the hard stop. When it passes that point, you know where it is, and can slow and continue on for N additional counts to get to where you want to end up?
-
@kb58 said in Slow down before endstop?:
Dumb question: why can't you have and endswitch at, say, 50mm from the hard stop. When it passes that point, you know where it is, and can slow and continue on for N additional counts to get to where you want to end up?
If you a doing a "homing" move (G1 H1) when it triggers the endstop it does an abrupt halt and no settings seem to change that.
His machine is massive enough that he wants to be able to have a nice, gentle, controlled stop.
Frederick
-
I wonder if you could play games with the code, like, temporarily setting motor current limits low before homing. It seems like it would slow down both acceleration and deceleration, maybe.
-
@kb58 said in Slow down before endstop?:
I wonder if you could play games with the code, like, temporarily setting motor current limits low before homing. It seems like it would slow down both acceleration and deceleration, maybe.
The only thing I was able to come up with, short of a firmware update, was to try and use the ability to create a piece of code called a "trigger" which can be triggered by something like an endstop switch.
With that it might be possible to do a regular move (G1 w/o H1) and when switch was activated the code in the trigger could slow and stop the motion.
But the last time I tested this (firmware 2.x I think) it did not work - things may have changed in firmware 3.x.
That is for tomorrow's testing.
Frederick
-
@kb58 ...simply to be able to home it from anywhere after turning it on, it wont know how near or far it the stop is.
But I think I'll just have to start a procedure of parking it somewhere known, by running a script, before turning it off... that way when it wakes up the homing distances will be generally known and it can rapid until it's close, then go slow to the endstop.
-
@theKM Can't you just jog it close to home before starting a slowed down homing procedure ?
-
I just realized the flaw in my suggestion: If it's got enough momentum and bulk, it'll still coast to a stop even when the steppers are trying to stop it after hitting the switch, losing its known position.
This seems to make a case for stepper "servos" with positional feedback, or go for the full Monty and move to true servos.
-
@yveske ...ultimately, yes, but this is all about automation and having things sort themselves out automatically
I'm going to create a script I can run to park it in a known place before turning it off, so that when it's turned back on it can go from there.