We have recently introduced backlash compensation into Marlin FW. In order to get the most of this new feature, we will need a modification to Cura Engine.
Currently Cura will insert a "Layer X" into the gcode for ease of navigation. We would like to include a gcode command at each layer in order to determine where we are at.
The current proposed gcode commands are awaiting upstream approval https://github.com/MarlinFirmware/Marlin/issues/10826 Quick Reference for this:
"M425 Z" after a "G29" enables backlash compensation with the measured value.
"M425 Z" enables backlash compensation with a user specified value.
"M425 S" sets the smoothing distance, a value of 3 mm seems to work good.
The above three items can be inserted into the start gcode with a variable.
"M425 F" sets a value from 0 to 1 which is multiplied by the backlash distance. This command is meant for use by the slicer, and allows it to "fade" away the backlash compensation gradually over several layers, or to turn it off completely after the first layer (with a "M425 F0").
Currently to implement fade, Cura will need to be modified to insert M425 F(1-(Current layer / total fade layers) at each layer.
A different option would be to have Cura insert a command at each layer defining it, and we can modify Marlin to handle fade distances via EEPROM