Welcome! Log In Create A New Profile

Advanced

Small bugs in firmware ?

Posted by amigob 
Small bugs in firmware ?
March 20, 2016 05:58AM
I installed a IR z probe on my Prusa i3 and the probe has the following behavior.

If I move the z axe down at a certain point it will trigger, but if I move 3 mm more down it untriggers.
So if I now do a G30 ( single point z probing ) from homing high, the z goose up and doesn't stop, not even when it runs out of space.
So it ignores the working area size ?.
Some how it doesn't stop to go the other what to measure the z height. I set in the config 'Distance to switch off z probe' to 7mm so I expect that the z axes will move to 7mm above 7 and start probing. ( but it doesn't)

If I move the z axes manual to 10mm and then start G30 it works perfect.

So is this intentionally behavior like this ?
Re: Small bugs in firmware ?
March 21, 2016 08:59AM
G30 will never move start position height. It is only for probing just where you are plus running start/end probe script depending on P parameter.
Some printer configuration smove z before doing G32 probes.

NO idea why it moves up instead of down when starting lower, also I guess you meant something different. It should turn at z hit and go back to start z height. Can you be more procise what exactly happens when you have which sitation. In any case you need to make sure z is not triggered when starting g30 and gets triggert.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Small bugs in firmware ?
March 21, 2016 01:08PM
I am not 100% sure what happens but when starting probing it seems that it thinks that I can direct start probing, because the sensor is not active ( it is a homing level ( 0,0 ) . When it does that is even goes further down then homing allows.

I look in the code and I fount some , in my opinion strange if statement in startProbing
void Printer::startProbing(bool runScript) {
    float oldOffX = Printereye popping smileyffsetX;
    float oldOffY = Printereye popping smileyffsetY;
    float oldOffZ = Printereye popping smileyffsetZ;
    if(runScript)
        GCode::executeFString(Com::tZProbeStartScript);
    float maxStartHeight = EEPROM::zProbeBedDistance() + (EEPROM::zProbeHeight() > 0 ? EEPROM::zProbeHeight() : 0) + 0.1;
    if(currentPosition[Z_AXIS] > maxStartHeight) {
        moveTo(IGNORE_COORDINATE, IGNORE_COORDINATE, maxStartHeight, IGNORE_COORDINATE, homingFeedrate[Z_AXIS]);
    }
    Printereye popping smileyffsetX = -EEPROM::zProbeXOffset();
    Printereye popping smileyffsetY = -EEPROM::zProbeYOffset();
    Printereye popping smileyffsetZ = 0; // we correct this with probe height
    PrintLine::moveRelativeDistanceInSteps((Printereye popping smileyffsetX - oldOffX) * Printer::axisStepsPerMM[X_AXIS],
                                           (Printereye popping smileyffsetY - oldOffY) * Printer::axisStepsPerMM[Y_AXIS],
                                           0, 0, EEPROM::zProbeXYSpeed(), true, ALWAYS_CHECK_ENDSTOPS);
}

It only moves to the starting point for probing when it is to high, but when it is to low ( sensor is not triggered that low ) it starts moving to a point beyond Z home switch.

I removed that IF statement, and now the 3 point measurement ( G32 3 point config ) works perfect. I had some problems now with G30 that I don't understand , it moved down without looking at the sensor information. So it will not trigger at all, I will do some more testing tomorrow.

But G32 works for me now.

Edited 2 time(s). Last edit at 03/21/2016 01:10PM by amigob.
Re: Small bugs in firmware ?
April 03, 2016 04:12AM
To move z you should know where you are. The if condition is something like that. If you homed to z max (as you should with z probe) you z might be too high and it will lower z probe for faster probing.

On the other side if you enable printer you have z = 0 also you are not sure what z really is. If z is near top going up might be a problem. In your case you also have a problem if you are too low as I understand. But that is something special to your used sensor. Sensors keeping triggered would detect it and not probe at all.

So the right solution would be to home and set z manually to a correct level before starting with z probing. As you see it reads maxStartHeight which does not mean lower values would not work. And this gives the freedom to do so.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Sorry, only registered users may post in this forum.

Click here to login