plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can you install block protection for self-created blocks

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> ROSimatic
View previous topic :: View next topic  
Author Message
mamiko
Member 2
Member 2
mamiko

Joined: 25 Dec 2017
Posts: 420

PostPosted: 01/06/2023 13:00    Post subject: How can you install block protection for self-created blocks Reply with quote

How can you install block protection for self-created blocks?
https://support.industry.siemens.com/cs/document/10025431/
STEP 7 provides the KNOW_HOW_PROTECT function for protecting the programs. If you open a block protected by this function, then you can only view the block interface (IN, OUT and IN/OUT parameters) and the block comment. The program code, the temporary/static variables and the network comments are not displayed. It is not possible to change the protected block.
In this video we show you, how you install block protection for self-created blocks.
https://teraboxapp.com/s/18dBLcwnC2ihuyiZRReRAHw

Instructions
Open the function block to be edited.
In the LAD/STL/FBD editor you generate a source via "File > Generate source".
Enter an object name, e. g. "ProtectFB".
Mark the block for which the STL source is to be generated and use the arrow key to move this block into the "Blocks Selected" window on the right.
Click OK to generate the source.
Confirm the following message with Yes.
Close the source editor again.
Open the newly created source in the "Sources" folder of your S7 program.
Insert a line with the "KNOW_HOW_PROTECT" command in the declaration section of the source block under "TITLE".
Save and compile the source.
Note
The block protection can only be removed again via the STL source. If the STL sources are no longer available to the program or project via the "KNOW_HOW_PROTECT" command, you can no longer remove the protection for the blocks.

The block is now protected. The program code and the static variables are not visible after opening the block. Proceed as follows to deactivate KNOW_HOW_PROTECT for your program blocks (FBs, FCs and DBs).
Open your source.
Remove the "KNOW_HOW_PROTECT" entry.
Save and compile the source again.
The block protection is now deactivated.
Back to top
View user's profile Send private message
mamiko
Member 2
Member 2
mamiko

Joined: 25 Dec 2017
Posts: 420

PostPosted: 01/06/2023 13:05    Post subject: Encrypted block protection for FBs and FCs from STEP 7 V5.5 Reply with quote

Encrypted block protection for FBs and FCs from STEP 7 V5.5
https://support.industry.siemens.com/cs/document/45632073/
To be able to use the improved block protection in STEP 7 you must first install the "S7-Block Privacy" program from the STEP 7 DVD. After installation, select the "Block Protection" function in the SIMATIC Manager under "Options > Block Privacy...".
In this video we show you the procedure for using the "S7-Block Privacy" program to encrypt your blocks and protect the block code against unauthorized access.
https://teraboxapp.com/s/1NNVqZBQbPN9NUNCmBLUajw

Instructions
Mark the block folder in the SIMATIC Manager.
To open the "Block Privacy" function, right-click on the block folder and select "Block Privacy" from the context menu. Or execute the following menu command "Options > Block Privacy".
You can see the object hierarchy tree in the "S7-Block Privacy" dialog. All the blocks that you can encrypt with the "S7-Block Privacy" program are listed here. The "S7-Block Privacy" program can only encrypt FBs and FCs.
If you want to encrypt numeroase 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. All ticks will then be ticked. This checks all the boxes.
In this example we only want to encrypt FB1. Right-click the block and select "Encrypt Block" from the context 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.
Note the "Also encrypt decompilation information" option. If this option is not selected, the block can no longer be decrypted after it has been encrypted. The code is then encrypted forever. If you want to decrypt the block again later, activate the option.
Click on OK and also confirm the following message with OK.
Close the "S7-Block Privacy" dialog.
The encrypted block is red in the SIMATIC Manager and marked with a key. Now open the encrypted building block.
With the encryption, the program code can no longer be seen and edited. We recommend that you save the password.
To decrypt the block again, right-click on the block folder and select "Block Privacy" from the context menu.
Mark the block that you want to decrypt, in this example this is FB1.
Right-click the block and select "Decrypt Block" from the context menu.
Enter your password and confirm with OK.
Close the "S7-Block Privacy" dialog.
The block is now decrypted again and you can edit it again.

Further Information
Press the F1 key in the "S7 Block Privacy" program to receive more information on encrypting blocks.

Note
Block encrypting via the "Know_How_Protect" command and compilation of the source block are also possible. More information on this is available in
https://support.industry.siemens.com/cs/document/10025431/how-can-you-install-block-protection-for-self-created-blocks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> ROSimatic All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro