Manual Control Z-Min bug

Good day,


for my printer i changed the following line in Printer.cpp from the repetier-firmware:

if (destinationSteps[Z_AXIS] < zMinSteps && !isZProbingActive()) Printer::destinationSteps[Z_AXIS] = Printer::zMinSteps;

to

if (destinationSteps[Z_AXIS] < 0 &&
!isZProbingActive()) Printer::destinationSteps[Z_AXIS] = 0;

Software Z min endstop is turned on.

I got a Z Min Pos of 20.04mm in the eeprom.
Then I move Z in negative direction with the manual control buttons.
Here comes the problem:
When going below 0 (like clicking 3 times on the -10 button when  at position 20.04), the printer stops at 0, but the Z Min Value in the host software turns red.

So I did some testing (with M111 S24) and found some values where it does and where it doesn't turn red.

With these Z Min Values it does not turn red: 0.04, 10.04, 19.04, 0, 10, 20, 25, 30.5 mm
But with these it does: 20.04, 21.04, 30.04 mm

And with Z min pos =  30.55mm it turns red after several button presses while already being at position 0.

Now I did some testing with destinationSteps[Z_AXIS] while being at Z = 0 and pressing the -10 Z button.
It always returns 0 on the working Z Min Values.
with the non-working values it returns 0, the text goes red, and when i click it again it returns high negative values (ex. -64500)
and with z min pos = 30.55mm it returns -1 for the first 3 presses and then -64501.

Can you help me with this problem?

Best regards,
Florian



Comments

  • Your z min must be 0! With z max homing you adjust only z length if G1 Z0 ends above the bed. If you don't you get in trouble, which you already know :-)
  • The printer has Z Min Homing,
    the endstop is at ~20mm to 0mm (I modified the homing process so this works) but the printer shall be able to drive up to 0 (he does!)
    I use different Z Min Positions for different kinds of extruders, some are a bit lengthier than others.

    only problem is that the host loses track of the position somehow when moving manually at some Z Min Positions (but not all) so I have to home again, even though the printer does not drive over the 0mm.
    and always check endstops is turned off

    thanks for the fast reply!
  • If you have z min it defines the position where z = 0 is. That is where it needs to trigger and you need to adjust it as long as it does this. So if it hits already 20mm above bed z = 0 is 20 mm above bed and you can not move below 20mm (or should not be able). z min is still 0. You can adjust it a bit if it triggers below 0 since you can tell firmware to go up a bit after triggering, but that will crash your extruder into bed every time you home, so not a good idea.
  • If you have z min it defines the position where z = 0 is. That is where it needs to trigger and you need to adjust it as long as it does this. So if it hits already 20mm above bed z = 0 is 20 mm above bed and you can not move below 20mm (or should not be able). z min is still 0. You can adjust it a bit if it triggers below 0 since you can tell firmware to go up a bit after triggering, but that will crash your extruder into bed every time you home, so not a good idea.
    With my printer I need to do be able to do this, and it does (since I modified the code which I've written in the first post).
    The printer moves perfectly fine, stops at 0mm, only the host then loses the right position (turns red), but only at some Z Min Positions, not all.

    But since I just need to home after that and i dont drive to 0 manually that often, it's not a big deal.
    I just thought I'd report it since it seems like a bug to me that it works with some positions and not with others.


Sign In or Register to comment.