For some S7-200 models, you can use a memory card to overwrite or clear the internal memory. Insert an empty or pre-programmed memory card into the CPU. Cycle the power to the PLC.
There are three main official ways to regain access to a locked S7-200 CPU: Siemens S7-200 Password Unlock
I can provide those next.