G29 tests probe position at current head position, should test at probing positions

Hi, currently I'm trying to install BLTouch at my selfmade coreXY (300x300x300).
And for now I also try to home to Z_Min (for avoiding much Z travelling) where also BLTouch -Signal is connected to.
If it does not work finally, I'll switch to home to ZMax, but for now I'm in good hope.

The problem I found is using G29 (and probably G33): "Sometimes" I get an "Error:Activating z-probe would lead to forbidden xy position:..."
Analysing this "sometimes" I found, that in both commands the probe position is checked.
The checked position is the current probe position, when the G29 command is entered.
The checked position should be the specified probing positions.

In my case:
Z_Probe_OffsetY = 39
all Probing Positions are between 60 and 160 (X and Y)
If the print head is homed and I enter G29, I get the error described above and the head will crash into the bed sind the probe is not activated.
If the print head is at Y >40, everything is working fine.

In my mind the conditions leading to the error message should be a test of all probing positions.



Comments

  • You know G32 does what you think G29 should do? G29 is measuring average height, G32 is autoleveling!

    Yes, starting at wrong position can cause the error. In V2 firmware this gets autocorrections. Maybe I should add a move to bed center in V1 as intermediate fix so it works more reliable. These things are so connected that small changes easily break a lot, so do not like o make complicated changes after working 3 years to perfect it:-) But center sounds like something I can add safely at right spot.
  • Thank you for your quick reply!

    Yes, I know G32.
    Just startet step by step, testing and adjusting parameters, G29 before G32 and 33.

    And I already experienced those connections you are talking about;-)

    For avoiding the danger the head crashing into the bed (like described in my first post),
    I helped myself by a little hack in bedlevelling.cpp, startprobing.
    I changed the if error conditions, originally testing the currentposition of the printhead,
    now testing DISTORTION_YMIN as well as  EEPROM::zProbeY1.
    If the head was detected to be in unallowed area, I added an emergency stop.
    This works well for G29, G32, G33. All those commands are doing their job now with BLTouch without danger of crashing!

    But, like expected, this does not any more check G30 for unallowed positions.
    I tried already but I did not manage to move the probing position out of restricted area.
    (I am no software developer).

    Therefore may I ask you to give me a hint, where to add which command to move the probing position, for example to bed center like you described already?

    Thank you very much in advance.



  • In Printer::prepareForProbing after homing and setting z height you can add

    moveToReal(xMin + 0.5 * xLength, yMin + 0.5 * yLength, IGNORE_COORDINATE,homingFeedrate[X_AXIS],false);

    Have this already done for next update, just need testing this and some other mods I added.
  • Thanks again for your hint. I digged a bit into the called probing functions and found an interesting thing which makes the proposed “moving the head to the center of the bed” unnecessary in my mind.

    Like stated already, I’m no programmer, so forgive me, if I’m wrong.

    In G29, G32 and G33 I found a call for PrepareForProbing(..) and later StartProbing(..)

    In PrepareForProbing you check for unallowed positions and if found, you move the print head to an allowed position already.

    Later in StartProbing you do an identical check and it detects again an unallowed position, which causes to stop with an error message. How can this happen?

    I thought it might be a problem with small numbers and float/int/ whatsoever and changed the code in PrepareForProbing where the print head is moved to by adding /substracting 0.1:

        if(ZPOffsetX > 0 && targetX - ZPOffsetX < Printer::xMin) {

           targetX = Printer::xMin + ZPOffsetX + 0.1;

        }

        if(ZPOffsetY > 0 && targetY - ZPOffsetY < Printer::yMin) {
            targetY = Printer::yMin + ZPOffsetY + 0.1;

        }

        if(ZPOffsetX < 0 && targetX - ZPOffsetX > Printer::xMin + Printer::xLength) {

            targetX = Printer::xMin + Printer::xLength + ZPOffsetX - 0.1;

        }

        if(ZPOffsetY < 0 && targetY - ZPOffsetY > Printer::yMin + Printer::yLength) {

            targetY = Printer::yMin + Printer::yLength + ZPOffsetY - 0.1;

    Result: An unallowed start position of the print head is already corrected by PrepareForProbing, and startprobing will not abort the probing any more in this case.


    Regarding my notes in case of G29, G32, G33 for checking probing positions instead of current head positions I try to

    -          Change the if condition in PrepareForProbing for checking DISTORTION_YMIN as well as  EEPROM::zProbeY1.

    -          And maybe create a new StartProbingG30 where the current position will be checked and corrected.






  • Yes, you are right. Looking deeper in the code you see that PrepareForProbing is operating in real positions while G32 afterwards disables rotation correction so for Z>0 positions can change to illegal positions. Have added 1mm now for next update hoping it helps.
Sign In or Register to comment.