To fix the error, you must first understand the "holy trinity" of the 810D:
: This is a frequent cause if the machine has been powered down for a long time. If the battery dies, the NCK and PLC data stored in SRAM are lost, causing the connection failure. Perform an NCK/PLC Reset and Restore : sinumerik 810d waiting for nck connection