How to edit scripts that turn off klipper?

Basic Information:

Printer Model: Custom
MCU / Printerboard: Manta M8P v2.0
Host / SBC CB1
klippy.log

Describe your issue:

Hi, is there a way to edit the scripts that turn off klipper, for example, when a heater is not heating as spected?
I mean, where are these scripts located?

I’d like, under my responsability, to edit these scripts in order that my prints don’t stop under a emergency stop or a shutdown as klipper does, but just simply pause my print or something else. Is this possible?

You won’t do that. It’s a safety measure.

And see your house burn down because you have not been there when the issue occurred?

Hi @EddyMI3D thanks for response.

Obiously, i would add the necessary procedures for this to be a safe option.
The heating problem was just an example.

In my case, i have a large format printer and sometimes my prints can be around a week. Let’s suposse that the cable of a thermal sensor just drops, in the 6th, day so klipper turns off.
I agree with you that safety will always be the priority, but i’d like just to add some procedure that allows me to save the print.

I have also thought about trying to include some recovery mode that just lets me resume the print, in the same point where, when restarting the machine, like when a power loss… But i think that isn’t implemented already in klipper, isn’t it?

Anyways, thanks a lot!

Disclaimer: In this reply, I’m not trying to be argumentative, I’m genuinely curious about your thought process here.

Can you explain why losing a thermal sensor and not shutting down is not a problem?

There are three cases here that need to be considered:

  1. The connection to the thermistor breaks and the readings are invalid.
  2. The relevant heater is stuck on and the monitored temperature goes high with the thermistor indicating what you would consider an invalid reading. If this is ignored then you risk damage to the heater element and the model being printed is ruined as well as a fire.
  3. The relevant heater fails and the monitored temperature drops which indicates what you would consider an invalid reading. This causes the model to be ruined. There’s also risk of damage to the hot end and its drive mechanism when the model is displaced off the cold build surface or it collides with a solid mass of plastic.

I would think that the appropriate solution, rather than disable to heater safety checks, is to make sure that your thermistor wiring is properly routed and protected against pinches, snags, mechanical fatigue and abrasive wear. I don’t see why this is a problem as I’ve run my printers for tens of thousands of hours without ever having a thermistor (or, honestly any other wire) failure.

1 Like

Hi @mykepredko .

Losing a thermal sensor is a problem, and as you say, it’s weird that this happens if wiring is properly routed.

What i want to do is to modify it so it doesn’t shut down klipper, but yes it pauses my print, shuts down any heater, and activates a liquid cooling system i have integrated in my printer. (btw i have this component defined as a temperature_fan and shutdown_speed: 1.0 but it doesn’t activate in shutdown state, i dunno why, but this is another discourse).

I have come to this discourse because when using a PT1000 with MAX 31865, sometimes when doing some restart, i had spikes in the thermal value, as mentioned in this discourse Ebb36 Temp sensor spikes on Klipper restart

This was very anoying as sometimes i just couldn’t start my machine as it was doing spikes all time and sending klipper to shut down state.

For now i have modified the way i read those pt1000, so i dont have that problem, but i’d like to modify the scripts for my machine anyways.

You know that a lot of filament detaches from the print bed when it gets cold?

Hi, yes. That was just a fast response for the example.

I have to define very well which things must shut down when this happens and any actions i command, etc. Also, a lot of testing after all.

Also, mention that my machine is not a basic and dumb printer as many desktop printers. It is a industrial printer, so it includes a lot of additional safety components (hardware, electromechanical, thermocontact, relays, closed loop motors, and all kind of elements) that control in a safer and faster way some possible faults, so, essentially, the most important parts are protected by these elements.

So…Do you know where are these files located, or even more, what are their names? @EddyMI3D @mykepredko

It is that deep in the code, only the Devs can know.

Ok, i’ll continue my search :sweat_smile:

Thanks again.

Look at my GitHub, at Cuore, or at Phoenix X86 repositories, I switch off all my printers from Klipper, via M18 gcode, once I finish print, or after 30 minutes of inactivity switches off, if the nozzle is hot, always cool it down before to switch off, or in case of a thermal malfunction or alarm.
There are, in most of the cases some hardware, not only software, the most complex is the case of my Phoenix printer, there is a transmitter inside the printer, and a receiver outside, in order to completely cut the power, you’re invited to have a look: