Success: Runout for Octoprint, Host Action Commands, & Emergency Parser

Update: I got around to some testing.

I did a multi-extruder (non-duplication) print from HMI to make sure my code doesn’t interfere with normal prints using the Snapmaker HMI screen. Used default Prusaslicer profile to slice. Printing and tool-changes were normal. I triggered runout on each extruder and the native HMI runout handling was normal. No issues.

I did the same multi-extruder (non-duplication) print from Octoprint with the same slicer settings and ran into some issues which I have since addressed.

Issue 1. Standard Marlin allows you to configure a single NOZZLE_PARK_POINT which is where the active extruder parks on pause (ie in case of filament runout). However, the ideal park point for T0 is far left, outside of the print area and the ideal park point for T1 is far right, outside of the print area. Extruders can crash If they share a single park point that is too far left or right.

Fix 1. Configuration.h now has NOZZLE_PARK_POINT_T0 and NOZZLE_PARK_POINT_T1 so that you can configure separate park positions.

Issue 2. Snapmaker uses a custom gcode command for tool changes (M2000 S200). Originally, this gcode was incompatible with Octoprint. I have altered the code so that it works with Octoprint. This test resulted in successful tool change when switching from T0 to T1. T0 returned home and T1 continued the print in the correct location. However, when switching from T1 back to T0, T1 did not return all the way home. It stopped at x324 because it was restricted by software endstops.

Fix 2. Software endstops are now temporarily disabled during tool change. This is safe because no other motion gcode can be injected into the queue during this very brief period while M2000 S200 is executing. Software endstops are disabled just long enough for T1 to return home, and then reenabled.

These fixes are untested. I will be away from the printer for a week. Feel free to test and let me know the results.

*Current firmware version is 0.0.04.
If you’ve download a previous version prior to these fixes, please update to latest version.