Open mrbi11 opened 10 years ago
While I am sorry for your wrecked printer, I understand that the option is available for those printers where the endstop are touched while printing, and the resulting electrical noise can harm printer functioning. Do note that endstops can be placed anywhere, and printer movement can be set to be beyond the phisical placement of the switch/sensor. All above IMHO, as I am not involved in any way into coding process and I am "cartesian" guy.
best regards Davide Ardizzoia
Author,
I beleive the below will in all cases work for delta machines. Note for my own clarity I replaced "curd with deltaSegment below and cur with printLine below, so I would not confuse them.
if((deltaSegment != 0)) { // Check max end stops // if axis indicates step and increase, kill the step if end stop is on if((deltaSegment->dir & XCD_FLAG)==XCD_FLAG) if(READ(X_MAX_PIN) != ENDSTOP_X_MAX_INVERTING) { deltaSegment->dir&=~XD_FLAG; printLine->dir&=~XD_FLAG; } if((deltaSegment->dir & YCD_FLAG)==YCD_FLAG) if(READ(Y_MAX_PIN) != ENDSTOP_Y_MAX_INVERTING) { deltaSegment->dir&=~YD_FLAG; printLine->dir&=~YD_FLAG; } if((deltaSegment->dir & ZCD_FLAG)==XCD_FLAG) if(READ(Z_MAX_PIN)!= ENDSTOP_Z_MAX_INVERTING) { deltaSegment->dir&=~ZD_FLAG; printLine->dir&=~ZD_FLAG; } // Now check min end stops. // If the axis indicates step but NOT increase, kille the step if min stop is on if((deltaSegment->dir & XCD_FLAG)==XD_FLAG) if(READ(X_MIN_PIN) != ENDSTOP_X_MIN_INVERTING) { deltaSegment->dir&=~XD_FLAG; printLine->dir&=~XD_FLAG; } if((deltaSegment->dir & YCD_FLAG)==YD_FLAG) if(READ(Y_MIN_PIN) != ENDSTOP_Y_MIN_INVERTING) { deltaSegment->dir&=~YD_FLAG; printLine->dir&=~YD_FLAG; } if((deltaSegment->dir & ZCD_FLAG)==XD_FLAG) if(READ(Z_MIN_PIN)!= ENDSTOP_Z_MIN_INVERTING) { deltaSegment->dir&=~ZD_FLAG; printLine->dir&=~ZD_FLAG; } }
Davide it is not possible for delta printers to print while at endstops. This is not an "option" for anyone, it is an internal coding bug. thanks for your interest
To anyone else who happens across this. The low level code that check any axis endstop only prevents movement past the endstop. It does not stop printing, or the other axis. If Z is at either endstop, x and y can still move, Cartesian or delta. And Z is free to move away from the endstop, and the same is true for all axis.
In fact, the code in cartisian low level endstop checking has ALREADY been modified to always check the Z axis endstop because Quote: // Test Z-Axis every step if necessary, otherwise it could easyly ruin your printer! From repetier.ino around line 1800. Why, having realized this is fatal for printers whoever authored that change did not also fix the x and y axis, is unclear.
There are no printers which can safely move PAST their endstops, or their endstops are in the wrong spot, and are "midstops", Cartesian or Delta
But Author, if you read this far, the same change should be propagated to X and Y axis near line 1800, which can have NO effect on printing, because printing already always checks endstops. But not being the Cartesian expert, that is merely my humble opinion.
First, there is a good reason to not always check end stops. Quite some printers have false end stop signals from time to time, which ruin the print when triggered during print process. These guys are very happy to be able to disable that checking. If x or y axis goes out of range, normally no real harm is done except a stalling stepper. If you have seen the gears used in original mendels you would also see this is not true for z axis, which is why you can not disable it, also I had users who even wanted this.
Back to delta. I have never seen a delta with min endstops, simply because they make no sense. Where would you like to place them? You would need to place them so deep, that under normal moves you hit the bed before anyway. So in my opinion, the only reasonable approach is:
Idally we achieve this without slowing the computation down too much, e.g. no sqrt etc,
Again, the SOFTWARE ALWAYS CHECK ENDSTOPS WHILE PRINTING.
The software is incapable of not checking endstops on request. So any false signals are already having all the effect they can possibly have. Endstops CAN NOT BE DISABLED DURING A PRINT. Have I said that enough yet?
The only place the formware disables checking, is for some non-printing moves, and that disabling is because it thinks it is moving the other way. This saves no time, and has no effect, unless it is in fact wrong about which way it is moving.
Said all that already. Have a look at the code before we repeat ourselves again.
Min endstops prevent the carriage from crashing through the floor, making quite a lot of sense. They may not be useful for calibration but are quite useful in not wrecking printers.
All delta moves do 3 sqrt's on each position computation. No sqrt is required for limit checks.
A while back, I wrecked my delta because it has no min endstops or other software checks to avoid crashing the carriage into the floor. Two motors later...
I have once again wrecked my delta printer, this time while trying to generate accurate calibration (skipping boring part), and then it repeatedly rammed carriages into the top, even though there are in fact end stops.
Reviewing the code, there is a flag one can pass to DISABLE check endstops. Such flag can have no beneficial effect, and if it has an effect, the effect will be to wreck a printer.
Further digging showed that the flag was set to disable, when the software intended to move down, away from endstops. Due to a bug (which I helped with) the software actually generated movement up, but with end stop checking disabled, wrecked my printer.
I assumed there was some problem, such as the low level code would do nothing, even move downward away from endstops, if they were engaged. But I discovered, this is not the case. The software check for max end stops only affects increasing movements.
And I discovered the DELTA version of the breshnev function DOES NOT HAVE checks at all for min end stops, although the rambo card (and others) do have the inputs there. (Just because SOME hardware vendors don't care if you smash your printer, doesn't mean the software should not care either.) And yes, min end stops are possible for delta's, and I am in the process of installing them.
So, please REMOVE the ability to DISABLE end stop checking. I would say all the people whose printers you save would thank you, but they wont, because they wont know you saved their printer. But if they knew, they would definitely thank you.
So this is basically an improve your karma/ sleep better at night request.
thanks.