If the PLC protection level allows you to go "Online" (e.g., it is only set to rather than Full Protection ), you can reset it via software. S7-1200 Reset Password Without MMC Using Firmware Update
A SIMATIC Memory Card (minimum 4MB or larger, e.g., 6ES7954-8LC03-0AA0). The Procedure:
Once the LEDs stop flashing (typically steady amber), power down the PLC, remove the card, and power it back up.
The PLC is now at factory defaults with no password protection, allowing you to download a new project. 2. TIA Portal Factory Reset (Online Method)