My 3D printer uses ball screws for the Z-axes. These are very smooth-running and the print bed simply falls down when the motor is not active. That is why they have brakes installed. I switch these on manually via an output pin.
If the home process fails (error message: !! Endstop y still triggered after retract), the motors are deactivated, but the brakes are not activated. The print bed then falls down. This may damage the printer, the print bed is heavy.
Can I edit the command behind the error message? I would like to add the command for the brake here.
I know that I should design the home process so that the error no longer occurs, I am working on that. However, a defective driver, motor or end stop can trigger the error again. That is why it is important to me that it is resolved. I would appreciate any tips.
[virtual_sdcard]
path:
# The path of the local directory on the host machine to look for
# g-code files. This is a read-only directory (sdcard file writes
# are not supported). One may point this to OctoPrint's upload
# directory (generally ~/.octoprint/uploads/ ). This parameter must
# be provided.
#on_error_gcode:
# A list of G-Code commands to execute when an error is reported.
# See docs/Command_Templates.md for G-Code format. The default is to
# run TURN_OFF_HEATERS.
There is one pointer I want to give all non native English speakers.
Always use English when dealing with OSes and software. English is the programming language. You’ll find help in the www much easier. I’m also a no native English speaker.
This should work during a print that is started from the virtual sd card. It wont work however if you are manually sending the home command via the console.
That would be an option, it should be possible to add a relay to that port. Some stepper driver support brake-management themself, but mine unfourtunatly don’t. I’ll try this if i don’t get a solution in software.
I got it working in another way. Repetier Server allows to filter the console output and send G-Codes as reaction.
It’s possible to filter for different error messages from klipper:
\s*(Endstop|Heater|Thermal|MCU|Lost communication|ADC|No trigger on .* after full movement)
After that errors a M112 command is sent, which brings my printer to a save state (and forces me to resolve more of the issues that cause the error message in first place).