Unexpected behavior when switching Tools in IDEX

edited October 2019 in Extruder & Bed
The issue described below "cost" me several hours of troubleshooting and I decided to share my experience hoping that this knowledge may save others some time.

First of all, whatever I was "fighting" with is not a firmware bug. I'd rather call it unexpected behavior.

I just finished building IDEX printer and was trying to find optimal settings for each carriage offset, park positions and max length along X. I was using Octoprint UI to move print heads. One of the tests is to move left printhead (Tool 0)  to certain position along X, then activate right printhead (Tool 1). This should cause Tool 0 to move to the very left and park and Tool 1 to come out from parked position at the right end of X axis and move to the last X position of Tool 0.
I was mainly occupied with changing aforementioned settings and was observing that in some cases Tool 1 would move and in others it would not. Tool 0 was moving all the time without issues. Since I've never owned or configured IDEX, my thinking was that certain combinations of offsets and max_x_ length are incompatible, but then at certain point I reverted the settings to the values that worked before, but Tool 1 did not move. 

To keep long story short - I discovered that only when Auto bed leveling is enabled you have to home Z before switching to Tool 1. Octoprint has separate buttons for homing X/Y and Z. I was not homing Z, since with Z-probe and auto leveling, Z home has to be at Z-max and homing to Z-max on large printers is rather slow process. Without homing Z, when switching to Tool 1 Printer::isPositionAllowed was returning False because this condition was not met:

    allowed = allowed && z >= zMin - 0.01;

My z was -0.03 and zMin was 0.

I was able to find out that -0.03 comes from Printer::updateCurrentPosition(true); call in Extruder::selectExtruderById(uint8_t extruderId) method. Strangely enough (or by some kind of coincident) when I was switching back to Tool 0, z was becoming positive and Printer::isPositionAllowed was returning True allowing Tool 0 to move. For the very 1st run for Tool 0 Extruder::selectExtruderById(uint8_t extruderId) method was not called, z value was 0 and tool was moving.

With ABL off, Tool 1 is moving without issues, i.e. Z-homing is not required.

In almost all the cases print jobs start with homing all axes, that's why there is nothing to be concerned about when it comes to regular printing.

So, if you are running any kind of tests with independent dual extruders with ABL enabled, make sure to home Z after powering up your printer, re-flashing firmware or after resetting the mainboard.



Sign In or Register to comment.