G32 causes nozzle to crash into bed when preheat is specified.

With some combination of firmware parameters, G32 causes my printhead to crash into my bed.  Let me explain how I think this happens:

I have a printer that has sat idle so long that the steppers have been powered down so they are no longer locked.  This is a Delta style printer so it homes to max.  I see that the print head has actually sagged, it is at a lower position than it was at.

The Arduino part of the printer is powered by the USB port from a Raspberry Pi.  The 24 volt power is controlled by an SSR that is controlled by the usual ATX power supply control.

So the printer might think it has a position for the head, but as soon as the steppers are disabled, the position is useless.  The fact that the 24 volt power is also down may or may not affect anything.

I power the printer completely on (M80) and then send commands to heat the hotend and the bed and then send G32 S2.  I have not waited for the hotend to heat - I used to use a manually positioned Z probe which needed a click to start, I am switching to a new system which is mounted permanently to the printer.

I have FEATURE_AUTOLEVEL, and Z_PROBE_MIN_TEMPERATURE and, I believe, Z_PROBE_REQUIRES_HEATING defined, so, from this state where the position of the extruder is undefined and the extruder has not had time to get up to speed, it executes this line: Printer::moveToReal(IGNORE_COORDINATE,IGNORE_COORDINATE,RMath::max(EEPROM::zProbeHeight(),static_cast<float>(ZHOME_HEAT_HEIGHT)),IGNORE_COORDINATE,Printer::homingFeedrate[Z_AXIS]);

If the steppers have sagged, the nozzle crashes into the bed.  This happens to me way too often.

I think I can patch it by adding the following commands before the move:


But I don't think that is a general solution, it does not consider lasers and it does not consider that I might not want to home some axis.  I believe I can also bypass the problem simply by executing G28 to home the printer before I execute G32.

I would think that when the main power is turned on, or when the steppers are turned on (I am not that familiar with the firmware, I have just coded for a few years now) that the position of the head should be undefined and if this routine is entered with an undefined extruder position, it should refuse to move the head, or it should home first - before it moves the head to the heating position.  Maybe that should be part of Printer::moveToReal().

As soon as runBedLeveling is run it will do a home.  So I am not sure what to do about this.  Maybe there is a way to say, "just heat where ever you are, don't worry about a move" but I don't get it.

By the way, my personal eventual patch was to simply remove the Printer::moveToReal() method call.  I still am not sure why my extruder never actually heats, but that is not the point of this bug report.


  • I failed to specify that this code is from the commands.cpp file inside the code that runs when a G32 is executed.
  • Are you using 0.92.x? In dev version I see that deltas are always homed before bed leveling, so there it should not happen.
Sign In or Register to comment.