Z axis disables during Operation

Hello I have been having this issue with just the Z axis. It seems to disable, I can twist the lead screw by hand. Restart button does not fix the issue, I have to shut off the power supply to get it to work again. It happens at random times, sometimes within 5 minutes. This time it ran for 3 hours. I’ve replaced the stepper motor and rewired all the steppers with shielded cable. I’m using a skr v1.4 turbo and tmc5160 drivers in spi mode. Sensorless homing. Tmc debug does not give any errors. Any help would be appreciated. ! Picture of the wiring and in the wood where the z stopped working and was falling down during x/y movements.
image|320x240 image

I’ve experienced this in a case when my Z driver was overheating. Could that be the case? Have you checked the voltage on that driver?

Yvan thanks for the reply. I havnt physically check the voltage. But there 84oz 2a nema 17’s and I have the voltage rsense at .75 and voltage at 1.2 (1200) the motors are a little warmer than room temp. Only the Z disables.

Could this be down to #define DEFAULT_STEPPER_DEACTIVE_TIME 120 in configuration_adv.h?

I don’t know about an skr1.4 or whether it applies to TMC5160 drivers but in the Marlin 2.0 I have at line 749 this sets the timeout for the 3 axis’ at 120 seconds since the last movement of a particular axis… It might appear to be a random timeout but it only appears that way …it depends on how often you have a Z move instruction!

You could send M18 Z S0 before your job to find out before messing with the firmware.

Thanks for the reply, it is set to 120 seconds. The DISABLE_INACTIVE_Z false. I assume that overrides it but I will set the timer to zero and see if that helps.

M18 z will disable the stepper what will s0 do?

When M18 uses the S parameter, it sets the inactivity timeout. I’m out of town and cannot test it, but I assume that using the M18 command with an S0 as Yvan suggests will leave the steppers enabled and turn off the inactivity timeout. See reference.

Ok, I’ll try that. I set the timer to zero in the firmware and will give that long program a try again in the next few day’s