And what happens with the destination/position during initialisation?
Do you think the axis is being powered downward, or dropping under gravity?
It can be quite surprising how easily/quickly quills/heads will drop under gravity. It could be worth trying to apply a bit friction to the ballscrew/motor/belt so it definitely can't move just by gravity.
I will check, but if it was falling under gravity wouldn't it try to correct upwards instead of driving it downwards? I do see the feedrate in Mach go to 120 briefly which is the max speed so it appears to be driven.
You might post your Initialization Program so we can see how things are being initialized and handled.
You might also observe the KMotion Axis Screen's Commanded Destination and Encoder Position before and after initializing and the motion downward.
One possible scenario is that your Z axis servo doesn't have any Integrator gain and because of gravity the actual position is significantly below the commanded position. Normally when enabling the axes the target Destination is set to the current Position as an attempt not to move much. However in this scenario the result will be a step downward each time the system is initialized. For example say the Commanded Position is 1000 but due to gravity the Position drops to 900. If the system is re-initialized and sets the Commanded position to where it is (900) the position will then drop to 800.
Ok, after playing with it some more and manually releasing the brake to see how fast the z axis moves down under gravity I am leaning more and more towards the control loop/drive power is not fast enough to catch the initial drop of the Z axis when the brake is removed. So either I need to power the drives and enable control then wait a second before releasing the brake or I need to speed up the response of the control loop (assuming the drive enable gets power to the drives fast enough).
I have attached pics of the axis screen on a fresh restart and when it faults after the first and second reset in Mach. Also attatched is the current init program and a console capture.
I suspect the issue might be that you are having Mach3 enable the Drives (and release the brake) and then later Mach3 performs the Initialization C Program that starts the Servo. If these don't happen at the same time then the axis will be falling in the meantime. Or conversely the Servo can go nuts if enabled with the drives disabled and the brake on. I'm not sure what order Mach3 does things. I thought I read somewhere that Mach3 enables the axes one at a time with a delay between them as an attempt to avoid a current surge of all of them enabled at the same time.
Try having KFLOP enable the Drives at the same time as it enables the KFLOP Axes. You may want to configure the Mach3 Enable Outputs to dummy or Virtual IO Bits.