-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only move toward endstop if position is unknown. #461
Comments
I'm not even sure how this makes things safer... if limit switches are disabled then moving towards home won't stop anything bumping into the end as endstops are only used for homing. |
If position is unknown (axis has not been homed since the last time it was powered up), the endstops have to be enabled and the machine has to be restricted to moving toward an endstop. In the strictest form, no motion other than homing would be allowed, but if a cartesian machine has both min and max endstops, it could be allowed to move in either direction, but the endstops would have to stay enabled until the position was known (this would not work for a delta). On a related note, does Smoothie even have software endstops? I hit Z -10mm after homing the other day when I meant to retract filament and, well, I wouldn't be telling this story if the machine had just sat there and done nothing because Z was already at zero... The ideal solution would be to have a series of options on the spectrum, with software endstops and nothing but homing allowed until the position is known on one end, and willy-nilly endstops-are-only-for-homing on the other. |
if limit switches are enabled they are on all the time and will protect each axis all the time. I see no reason to only enable them if position is unknown, basically position can be unknown at any time especially of steps are skipped at some time, which is actually why I just implemented h/w limit switches, my new bot was skipping steps and crashing into the ends because it no longer knew where it was. We don't currently have software endstops. However I think they could be relatively easily added using the same hack I used for hardware limit switches. However I won't be doing that myself due to my unreasonable hate for s/w endstops ;) |
Even if hardware endstops are enabled all the time, they won't protect you if you only have min endstops, start up at Z100 (thinking you're at Z0) and try to go to Z200 without homing. |
Actually, in the current system there's nothing stopping you from trying to go Z400 or Z-400 on 200mm tall machine, even if you have min and max endstops. |
Oh, and it's perfectly reasonable for open-loop firmware to assume that it has been properly configured to prevent skipped steps when it has not hit a hard stop. Having the option to make endstops always active to avoid collisions is a nice failsafe, but a machine needs to be able to trust the person who configured it, even if it can't trust the person who is operating it. |
not sure I understand that comment if you have min and max limits enabled and any endstop triggers while moving it will stop dead. so you will be protected from Z400 or Z-400 it doesn't really care where it is, if an endstop triggers while moving the system will freeze. Total protection is to have min and max endstops on all axis, then you are covered. In fact you only need to use 3 endstop connectors as you can wire min and max endstops up in series wired normally closed to ground. |
Or in parallel, wired normally-open. Except they don't protect you from anything at all if they're only enabled for homing. |
so enable them as limit switches and you are protected :) |
Yes, but this is problematic overkill. If limit switches are enabled, and You execute G1 X0 Y0 printer will go to 0x0, hit endstops and everything will stop until M999 or reset. For random god's sake, why? 0x0 is perfectly within limits. |
Yeah, I was pretty flabbergasted when I found I had to disable the limit switches because going to X0 Y0 would kill everything. |
if going to X0 Y0 is killing everything, then you didn't set up or configure your machine correctly. Machines should be configured with limits both limits always active, then simply set alpha_min -5 for example... now when you home the machine, X=-5 now do a G0 X0 Y0 and your X is 5mm away from touching the limit switch and returning to X0 at any speed will never trigger the limit switch. I think the reason everyone is confused by this is they think that since they set a retract distance of say 5mm, that it will set it to 0 after it does the retract, but it sets the axis before the retract happens, so if you have a retract of 5mm, then alpha_min should be -5 if you want it to be 0 after it gets done homing... but most machines would need to be something other than -5 because setting the position of a limit switch accurately is just a waste of time. It's very difficult and not necessary. Just put the switch well outside the work area, home the machine, now jog the machine until you get it to where you want 0 to be then set alpha_min to the negative distance you moved it, so if you moved it 13.412mm set alpha_min to -13.412 now home it again and go to 0 and you will be precisely at 0 and not hitting the switch. |
Thanks Zaaphod, very interesting... If i follow your council i will solve the problem when homing and got negative value on gcode... I've always use this parameter in other firmware like marlin or repetier... |
There is a PR #1149 that has soft endstops, if you want that feature give it a try. |
Some machines have more physical failsafes than others. It would be good to have a configuration option (should probably be per-axis) to only allow an axis to move in the direction of homing (with endstop always enabled) whenever its position is not known. The position of an axis is not known when a machine first starts up and hasn't homed, or when the stepper is disabled allowing the motor to turn freely.
The text was updated successfully, but these errors were encountered: