In STEP 7 version V5.5 onwards you can install an encrypted block protection for functions and function blocks in the Offline and Online views. The table below gives the procedure for using the "S7 Block Privacy" program to encrypt your blocks and protect the block code against unauthorized access.
To be able to use the improved block protection in STEP 7 V5.5 you must first install the "S7 Block Privacy" program from the STEP 7 DVD.
- Insert the STEP 7 DVD in the drive of your programming device.
- Open the "CD_2 > Optional Components > S7 Block Privacy" folder on the STEP 7 DVD.
- Start the "Setup.exe" program and follow the installation instructions.
After installation, select the "Block Protection" function in the SIMATIC Manager under "Tools > Block protection...".
||For this you mark the block folder in the SIMATIC Manager and select the "Tools > Block protection..." function in the menu bar. Alternatively, you can right-click on the block folder and select the "Block protection..." function in the pop-up menu.|
||Open the object hierarchy tree in the "S7 Block Privacy" dialog. This gives you a list of all the blocks that you can encrypt with the "S7 Block Privacy" program. The "S7 Block Privacy" party can only encrypt FBs and FCs.|
||Right-click on the block that you want to encrypt and select "Encrypt block..." in the pop-up menu.|
||In the "Block Encryption" dialog you now have to enter your password (Enter key) of at least 12 characters. Repeat the password to confirm in the next line and confirm with OK.
Check that the "Also encrypt decompilation information" option is enabled as in Fig. 01. If you do not select this option, you can no longer decrypt the block after encryption. The code is then permanently encrypted.
||Acknowledge the subsequent message with "OK". When you open an encrypted block, you can no longer see and edit the program code.
After encryption, you can only edit the block again after decryption with your password. We recommend that you save the password.
||If you want to encrypt multiple blocks at the same time, click the boxes on the left of the blocks. If you want to encrypt all the blocks at the same time, click the box on the left of the block folder. This checks all the boxes. Then you only have to encrypt once as described in steps 4 to 7.|
The encrypted blocks are marked red and with a key in the SIMATIC Manager. Proceed as described in the table below to decrypt the blocks.
||For this you mark the block folder in the SIMATIC Manager and select the "Tools > Block protection..." function in the menu bar. Or you right-click block folder and click the "User protection..." function in the pop-up menu.|
||Open the object hierarchy tree in the "S7 Block Privacy" dialog and mark the blocks (set check mark) that you want to decrypt.|
||Right-click one of these blocks and select "Decrypt block...".|
||When the "Block Encryption" dialog opens you enter your password and click OK to confirm.|
||Close the "S7 Block Privacy" program. The blocks you selected are decrypted and you can edit them again.|
Press the F1 key in the "S7 Block Privacy" program to receive more information on encrypting blocks.
Block encrypting via the "Know_How_Protect" command and compilation of the source block are also possible. More information on this is available in Entry ID: 10025431
The figures in this FAQ were created with STEP 7 V5.5.