How can you install block protection for an S7-SCL block?
You can set a block protection for blocks by adding the attribute KNOW_HOW_PROTECT when programming the block.
Activating block protection has the following effects.
- If you later open a compiled block with the incremental STL editor, the statement part of the block cannot be viewed.
- The negotiation part of the block will only show the variables of declaration types VAR_IN, VAR_OUT and VAR_IN_OUT. The variables of the negotiation blocks VAR and VAR_TEMP remain hidden.
When entering the block protection, the following applies.
- The keyword is KNOW_HOW_PROTECT. It is entered before all other block attributes.
- OBs, FBs, FCs and DBs can be protected this way.
Proceed as described in the table below to install block protection for an S7-SCL block.
|1||In the source folder of your STEP 7 program you open the S7-SCL source.|
|2||Insert a line with the attribute "KNOW_HOW_PROTECT" in the declaration part of the S7-SCL source.
|3||Save and compile the S7-SCL source.|
|4||Remove the S7-SCL source from the source folder. This activates block protection for your S7-SCL program.|
|5||Save your S7-SCL source.|
A padlock is displayed on the block icon in the SIMATIC Manager to indicated that the function is protected.
Fig. 2: Icon for a protected function
After the deletion of the S7-SCL source, the block cannot be changed anymore. Likewise, you can no longer deactivate the Know How protection.
More information on the topic of block protection ("Know_How_Protect") for DBs, FBs and FCs is available in Entry ID 10025431.