Welcome! Log In Create A New Profile

Advanced

Marlin 1.1.9 Firmware help with power loss homing.

Posted by Slvrsky07 
Marlin 1.1.9 Firmware help with power loss homing.
December 31, 2020 05:32PM
Hello all. I was wondering if anyone is able to help decipher part of the Marlin firmware with me. I am trying to modify the power_loss_recovery.cpp section of the firmware. Right now since I have a BLTouch, when power loss recovery kicks in, it tries to home the Z access while X is in the far left position and try to lower Z until the home switch gets activated. With the BLTouch, the stock Z home switch is gone and the BLTouch is off the bed when it tries to do this and it ends up crashing into the bed. Normal homing works great and so does bed leveling, I only have this issue when doing the power loss recovery mode.

This is where I was thinking I could add some more commands in:

#if HAS_LEVELING
strcpy_P(job_recovery_commands[ind++], PSTR("M420 S0 Z0")); // Leveling off before G92 or G28
#endif

strcpy_P(job_recovery_commands[ind++], PSTR("G92.0 Z0")); // Ensure Z is equal to 0
strcpy_P(job_recovery_commands[ind++], PSTR("G1 Z2")); // Raise Z by 2mm (we hope!)
strcpy_P(job_recovery_commands[ind++], PSTR("G28 R0"
#if ENABLED(MARLIN_DEV_MODE)
" S"
#elif !IS_KINEMATIC
" X Y" // Home X and Y for Cartesian
#endif


What I would like to add in would be this routine. Raise Z 20 MM, Home X & Y. Move X and Y in 40 MM and Home Z. Raise Z 20mm and then go back to last saved location of power loss.
Would that be possible to add each command like this one is listed? strcpy_P(job_recovery_commands[ind++], PSTR("G92.0 Z0"));

Thanks for the help!
Sorry, only registered users may post in this forum.

Click here to login