If the issue is related to a faulty Z-axis encoder or mechanical components, repacking the Z-axis servo may be necessary. Here are the general steps to repack the Z-axis servo:
Fanuc servo motors typically use absolute encoders. These encoders "remember" the position of the machine even when powered off. This memory is maintained by batteries (usually located in the servo amplifier cabinet or separate battery packs). fanuc 414 servo alarm z axis detect error repack