2.1 Got response from @Repetier - the errors from step 1.12 have been fixed and updated files are available from Github.
2.2 Configured e3d cooling fans as following
IO_OUTPUT(IOCoolerFan1, HEATER_3_PIN)
IO_OUTPUT(IOCoolerFan2, HEATER_4_PIN)
IO_PWM_SOFTWARE(CoolerFan1, IOCoolerFan1, 0)
IO_PWM_SOFTWARE(CoolerFan2, IOCoolerFan2, 0)
COOLER_MANAGER_SENSOR(ExtruderCooler1, TempHottestExtruder, CoolerFan1, 70, 200, 150, 255)
COOLER_MANAGER_SENSOR(ExtruderCooler2, TempHottestExtruder, CoolerFan2, 70, 200, 150, 255)
Tested - both fans worked. 70 in COOLER_MANAGER_SENSOR arguments is minimum temperature when fan turns on. Looks like it overwrites another setting
#define EXTRUDER_FAN_COOL_TEMP 80
2.3 For dual Z-axis motor support, following advice from @Repetier replaced Z-motor section with this
// ZMotor 1
IO_OUTPUT(IOZ1Step, ORIG_Z_STEP_PIN)
IO_OUTPUT(IOZ1Dir, ORIG_Z_DIR_PIN)
IO_OUTPUT_INVERTED(IOZ1Enable, ORIG_Z_ENABLE_PIN)
// ZMotor 2
IO_OUTPUT(IOZ2Step, ORIG_E2_STEP_PIN)
IO_OUTPUT(IOZ2Dir, ORIG_E2_DIR_PIN)
IO_OUTPUT_INVERTED(IOZ2Enable, ORIG_E2_ENABLE_PIN)
STEPPER_SIMPLE(Z1Motor, IOZ1Step, IOZ1Dir, IOZ1Enable, endstopNone, endstopZMax)
STEPPER_SIMPLE(Z2Motor, IOZ2Step, IOZ2Dir, IOZ2Enable, endstopNone, endstopZMax)
STEPPER_MIRROR2(ZMotor, Z1Motor, Z2Motor, endstopNone, endstopZMax);
2.4 Had to reduce MAX_FEEDRATE_Z from 7 that I used in version 1 to 5. Otherwise the motors would start turning and then stuck making that strange noise I experienced earlier.
2.5 Changed homing priorities to ZYX. This order is specific to my printer's design. It appears that the higher is the priority for an axis, the later homing will take place for it. A bit counterintuitive, but it's OK.
#define X_HOME_PRIORITY 2
#define Y_HOME_PRIORITY 1
#define Z_HOME_PRIORITY 0
#define A_HOME_PRIORITY 2
2.6 Discovered that Z-steps per mm value had to be set to half of what I used in version 1. Changed from 3182 to 1591. This allowed to revert MAX_FEEDRATE_Z to 7. At this point all motors on all axes and all stop sensors are working.
2.7 Re-enabled EEPROM. Still lots of values appear to be incorrect or random. Once again reverted EEPROM_MODE to 0. Compiled and installed firmware. Connected via Repetier Host and read EEPROM. All values are correct. Exported EEPROM content into file. Re-flashed firmware with EEPROM_MODE=1, then Imported EEPROM content from the file using Repetier Host. That did not help - after disconnecting printer, then reconnecting and re-reading EEPROM, the values appeared to be the original, not what I imported from the file. Will disable EEPROM for now and get back to it later.
2.8 Connected to Octoprint. Tested homing, movements, heaters, fan and tool change. Homing and all moves worked correctly. When heating up the nozzle to 210 degrees the temperature first went up to 217 then down to 207 and finally stabilized at 210. The second nozzle did the same. This is new behavior, I don't recall seeing it in older versions. Could be configurable. Will look at this later. When switching to Tool 1, right printhead moves to X=0 and hits the left printhead that is in parked position. Will need to fine tune X axes related settings. Also, when switching the tools, printhead move extremely fast. Hopefully there is a way to reduce this speed.
2.9 Was able to properly read content of EEPROM with Octoprint's EEprom Repetier Plugin. Save EEPROM function of the plugin did not work since EEPROM_MODE is 0, i.e. technically I don't have EEPROM at the moment, but it is still readable.
2.10 Discovered that the right extruder motor rotates in wrong direction. Replaced
IO_OUTPUT_INVERTED(IOE2Dir, ORIG_E1_DIR_PIN)
with
IO_OUTPUT(IOE2Dir, ORIG_E1_DIR_PIN)
2.11 Looks like both e3d fans go on and off together. Will need to further tune their configuration.
2.12 Manually leveled the bed and tried the 1st test print. Observed 2.66 times over-extrusion. Tried to check the value of steps per mm for extruders, but it was absent from configuration. Added lines
#define EXT0_STEPS_PER_MM 140.190
#define EXT1_STEPS_PER_MM 140.190
The values were taken from my version 1 configuration.
Also changed
COOLER_MANAGER_SENSOR(ExtruderCooler1, TempHottestExtruder, CoolerFan1, 70, 200, 150, 255)
COOLER_MANAGER_SENSOR(ExtruderCooler2, TempHottestExtruder, CoolerFan2, 70, 200, 150, 255)
to
COOLER_MANAGER_SENSOR(ExtruderCooler1, TempExt1, CoolerFan1, 90, 200, 150, 255)
COOLER_MANAGER_SENSOR(ExtruderCooler2, TempExt2, CoolerFan2, 90, 200, 150, 255)
2.13 E3D fans are now controlled separately. Extrusion amount did not change. Reduced STEPS_PER_MM from 140.190 to 52.7 and re-flashed firmware.
2.14 Still no difference. Looks like EXT0_STEPS_PER_MM and EXT1_STEPS_PER_MM values have no effect. Searched the code and found this line
Motion1::resolution[E_AXIS] = LC_STEPS_PER_MM;
Initially thought LC_STEPS_PER_MM might be the value to change, but then discovered that LC stands for LEVELING_CORRECTOR, thus it does not apply.
2.15 Replaced
STEPPER_ADJUST_RESOLUTION(E1Motor, E1MotorFinal, 500, 367)
STEPPER_ADJUST_RESOLUTION(E2Motor, E2MotorFinal, 500, 367)
with
STEPPER_ADJUST_RESOLUTION(E1Motor, E1MotorFinal, 500, 140.19)
STEPPER_ADJUST_RESOLUTION(E2Motor, E2MotorFinal, 500, 140.19)
Got the result opposite to what I expected - old extrusion was 266mm instead of 100mm. Now it is 366mm.
2.16 Commented out both STEPPER_ADJUST_RESOLUTION lines. Replaced
STEPPER_SIMPLE(E1MotorFinal, IOE1Step, IOE1Dir, IOE1Enable, endstopNone, endstopNone)
STEPPER_SIMPLE(E2MotorFinal, IOE2Step, IOE2Dir, IOE2Enable, endstopNone, endstopNone)
with
STEPPER_SIMPLE(E1Motor, IOE1Step, IOE1Dir, IOE1Enable, endstopNone, endstopNone)
STEPPER_SIMPLE(E2Motor, IOE2Step, IOE2Dir, IOE2Enable, endstopNone, endstopNone)
also replaced
TOOL_EXTRUDER(ToolExtruder1, 0, 0, 0, HeaterExtruder1, E1Motor, 1.75, 500, 5, 30, 5000, 177, "M117 Extruder 1", "", &Fan1PWM)
TOOL_EXTRUDER(ToolExtruder2, 0, 0.1, 0, HeaterExtruder2, E2Motor, 1.75, 500, 5, 30, 5000, 177, "M117 Extruder 2", "", &Fan2PWM)
with
TOOL_EXTRUDER(ToolExtruder1, 0, 0, 0, HeaterExtruder1, E1Motor, 1.75, 140, 5, 30, 5000, 177, "M117 Extruder 1", "", &Fan1PWM)
TOOL_EXTRUDER(ToolExtruder2, 0, 0, 0, HeaterExtruder2, E2Motor, 1.75, 140, 5, 30, 5000, 177, "M117 Extruder 2", "", &Fan2PWM)
This fixed extrusion problem. Manually leveled the bed and successfully completed the 1st test print!!! At the same time got response from @RAyWB on my question in Support forums confirming that the change needs to be done to TOOL_EXTRUDER line.
2.17 Downloaded the latest Printer.cpp file that contains beeper error fix. No more compilation errors. Ultratronics on-board beeper works correctly. Tested with M300 S392 P250
2.18 Added Z-probe and ABL configuration. Tested G32 command. It resulted in homing along Z, Y, X1 and A axis, then slowly moved print-head with probe to the starting position of 5x5 grid, then made quick move towards X=0 Y=0 and restarted the board. Reported issue in Support forums. Immediately received 2 replies. One of them was pointing out that my A-stop does not function properly. After running several tests discovered that indeed one of the wires connected to A-stop sensor (X-max stop) was broken. Fixed the issue. By some kind of strange coincidence the wire failed at the same time when I activated ABL.
2.18 Once the wire was fixed, checked configuration files one more time and discovered few lines that looked incorrect:
Replaced
#define ZPROBE_ADDRESS nullptr
with
#define ZPROBE_ADDRESS &endstopZMin
Commented out
#define NO_AMAX_ENDSTOP_TEST
FEATURE_Z_PROBE was still set to 0. Changed it to 1 and compiled the code. Got multiple errors. The 1st was saying that NUM_EXTRUDER is not defined. I already had line #define NUM_TOOLS 2, looks like separate definition of extruder number is required. Added #define NUM_EXTRUDER 2 to Configuration.h file. This took care of the 1st error, but few other errors did not go away. Here is the entire list:
~
~~src\communication\GCodes.cpp: In function 'void GCode_134(GCode
)':
src\communication\GCodes.cpp:725:25: error: 'Extruder' has not been declared
int startExtruder = Extruder::current->id;
~~~~
src\communication\GCodes.cpp:726:5: error: 'extruder' was not declared in this scope
extruder[p].zOffset = 0;
~~~~
src\communication\GCodes.cpp:726:5: note: suggested alternative: 'BitOrder'
extruder[p].zOffset = 0;
~~~~
BitOrder
src\communication\GCodes.cpp:759:14: error: 'startProbing' is not a member of 'Printer'
Printer::startProbing(true);
~~~~~~~~
src\communication\GCodes.cpp:761:9: error: 'Extruder' has not been declared
Extruder::selectExtruderById(p);
~~~~
src\communication\GCodes.cpp:762:36: error: 'runZProbe' is not a member of 'Printer'
float refHeight = Printer::runZProbe(false, false);
~~~~~
src\communication\GCodes.cpp:773:13: error: 'Extruder' has not been declared
Extruder::selectExtruderById(i);
~~~~
src\communication\GCodes.cpp:774:37: error: 'runZProbe' is not a member of 'Printer'
float height = Printer::runZProbe(false, false);
~~~~~
src\communication\GCodes.cpp:806:5: error: 'Extruder' has not been declared
Extruder::selectExtruderById(startExtruder);
~~~~
src\communication\GCodes.cpp:807:14: error: 'finishProbing' is not a member of 'Printer'
Printer::finishProbing();
~~~~~~~~~
src\communication\MCodes.cpp: In function 'void MCode_890(GCode)':
src\communication\MCodes.cpp:1376:28: error: 'bendingCorrectionAt' is not a member of 'Printer'
float c = Printer::bendingCorrectionAt(com->X, com->Y);
~~~~~~~~~~~~~
~~*** [.pio\build\due\src\communication\GCodes.cpp.o] Error 1
2.19 Reported these errors to developers and provided current version of my configuration files. Looking forward to get help.
To be continued