01First tell which of the two it is
If the message says parameter write is enabled and the machine is otherwise working normally, it is the notice. If the message appears after a power cut, at start-up, or when you try to edit, and comes with programs missing or odd behaviour, it is memory. The treatment is completely different.
02If it is the write notice, turn it off
Put the parameter write switch back to its normal position from the relevant control screen. Also ask who enabled it and what for: if parameters were adjusted, it is worth knowing which, and writing it down. A machine should not be producing with write enabled.
03If it is memory, take a backup before touching anything
Even with the memory damaged, get out what you can: programs, parameters, tool offsets, work offsets and macro data. Any partial copy is better than none. If the transfer also fails, tell maintenance before attempting any fixes.
04Check how far the damage goes
List the programs: see whether they are all there, whether any has an odd size or will not open. Check work offsets and tool offsets against the values written on the setup sheets. Damage limited to one program is solved by reloading it; damage that reaches parameters and offsets is another order of magnitude.
05Do not run memory clear procedures on your own
Control memory erase and re-initialisation operations are done with a key combination at power-up and delete data irreversibly. Running them without understanding the scope or having a backup is how you turn a bad day into a bad week. That is done by maintenance or the service engineer, with the good copy in hand.
06Check the control battery if the damage was spontaneous
If nobody switched anything off mid-edit and corruption appeared anyway, suspect the battery backing the memory. It is checked and changed by maintenance, and it is worth doing before restoring data so it is not lost again.