All LEDs flashing is usually just before PLC boots up. I suspect a power supply or short issue, using a multimeter check all PSU voltages.
If all ok, disconnect at first the spindle drive and isolate it, then see if the control powers up.
If not, disconnect all drives and then 24vdc PLC outputs. You need to try and isolate what is pulling down the control.