Member Login
member
passwd
remember me on
this computer.

- join now -
- forgot username or password? -

Search

Jump to a Date

Sponsored Communities
Cool stuff
Select a topic of interest:
...and press:
Neat Stuff
Control.com Stuff

Visit our shop for nerds in control lifestyle products.

Fortune
Warp 7 -- It's a law we can live with.
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
advertisement
from the plc department...
Protection of blocks in step 7
Software, including programming, OS issues, etc. topic
Posted by A- Hossein on 16 November, 2006 - 12:59 am
I have some question about protection of blocks (FCs, FBs and OBs in SIMATIC Manager) in step 7. Please guide me.

what is the cause of block protection?
have siemens ever authorized the Professional programmers about protection (unprotecting)?
Can I unprotect these blocks by means of a database, and is this permitted by the company?


Posted by Daniel Chartier on 18 November, 2006 - 2:21 am
On November 16, 2006, A- Hossein wrote:
> I have some question about protection of blocks (FCs, FBs and OBs in SIMATIC Manager) in step 7. Please guide me. <

Hello A-Hossein:

I'll try to answer your questions as you asked them:

> what is the cause of block protection? <

Once you (you or Siemens or anyone) have coded and tested a block (say a PWM output controller or a new FIFO control block) and you want it used without any changes by the user in your program(for consistency, say) then compile the block source with the words KNOW_HOW_PROTECT in the block header. Then you are sure that all subsequent calls of that function will behave in a safe and predictable way.

> have siemens ever authorized the Professional programmers about protection (unprotecting)? <

Once a block is protected, no one, not even the original programmer can open it (unless he unblocks it). Siemens recomends that the original programmer keep an unprotected copy of the block so he can eventually modify it if needed.

> Can I unprotect these blocks by means of a database, and is this permitted by the company? <

There are different ways to unblock the Know-How Protect, here is a link to another forum with one answer using Access (dbf file format):

http://www.plctalk.net/qanda/showpost.php?p=116925& ;postcount=7

Another source is runmode.com, they offer S7-canopener as a tool for unlocking protected blocks.

The protection on the blocks is not a copywrite protection. They are for consistency and safety. Siemens only puts this warning on their site: if anyone modifies one of the Siemens protected blocks and provoques a mishap or an accident by calling an unprotected Siemens block, Siemens will not be considered responsible or liable.

Hope this helps,
Daniel Chartier


Posted by Tom Morrison on 18 November, 2006 - 1:46 pm
Use S7 can opener found here if you need to break the S7 protection on blocks
http://www.runmode.com/


Posted by Dennis Patterson on 18 November, 2006 - 1:49 pm
Hi,
Look at it this way, can you see the code behind an allen bradly timer? or an S7 timer? well the generic set of functions provided by siemens are locked aswell, so that they may not be tampered with . Because of the flexibility of creating functions allows for siemens to make a lot of system functions and conversions. but of course they must be protected.

You can also protect your functions by exporting it to a .AWL file, write- KNOW_HOW_PROTECT after your comments line (before the first declaration), recompile it and its locked.

Hope that helps some
Dennis


Posted by Anonymous on 15 December, 2006 - 11:34 pm
There is free software called S7PROT. With this file you can protect or unprotect all the blocks in your project.


Posted by Ashish on 10 January, 2007 - 11:03 pm
Where I can get the software S7PORT? Please suggest the link.

Regards,
Ashish


Posted by Chuck on 3 July, 2008 - 12:56 am
Did you ever find this software?


Posted by Anonymous on 19 July, 2007 - 7:41 pm
I want to know if i can download s7port software to unprotect s7 blocks freely? and also , if i can unprotect SFB and SFC blocks for S7?


Posted by Anonymous on 17 December, 2006 - 6:00 pm
You can use a sprot it's a friendly software to insert or remove Know_how_protect without crate souge file.it's a free software


Posted by Tiesto on 16 May, 2007 - 11:45 pm
A similar (more flexible) tool can be found at http://www.s7tools.com. Although it's not freeware.


Posted by Barry P Fowler on 4 September, 2008 - 12:33 am
Hmmm, locked blocks! You buy a machine, go in to work on a machine or inherit a machine with an S7 PLC fitted. You want to either diagnose a fault, modify some code or extend the functionality... but someone has kindly locked several of the function blocks!

It's a nightmare, I've been there on site in the middle of the night and have needed to get access to an FB or FC block! Well eventually I thought sod this for a lark and spent several days scouring the web for solutions. But I'm probably a cheap skate, so I purposefully searched out and found a free solution. The others recommended here probably work fine, but the tools I use are free.

DBFEDIT is the tool to use. Basically you install (copy and paste) a copy of DBFEDIT into a folder with a nice simple name, e.g. C:\DBFEDIT
then you need to find the project you want to unlock, which will be in your programs file, under Siemens\Step7\S7Proj or wherever you have stored it. Now you need to locate your project within the folder until you find a file called subblk.dbf which will be in a folder called OFFLINE. First step is tomake a copy of this folder, nice and simple just copy and paste so you have a safe version. Then cut the file SUBBLK.DBF and paste it into the folder containing DBFEDIT. Dbfedit is a dos based tool, so use the DOS window in XP, etc to run it, now you see the reason for choosing a simple file name, in my case the instruction would be found in C:\DBFEDIT>dbfedit.exe subblk.dbf

An old DOS type window will open with lots of data in. Scroll across till you see the column headed Password, now go down changing all entries to 0, (typically locked blocks will contain the number 3) there will be far more entries than locked blocks, don't worry about this just do as above. I find that you can get a good rhythm going by pressing Enter on the cell to be change, press Backspace, press Enter, then press the down arrow. Once this task is done and all entries in the Password column are 0, just press ESC (don't need to save, its done automatically), then exit the DOS window.

Now cut the unlocked SUBBLK.DBF file from the DBFEDIT directory and paste it back into the original directory. Open the project in Simatic Manager and YAY the blocks are unlocked.

I haven't found any tools capable of unlocking SFC SFB, etc., but you have to be just desperate to stick your nose into them, LOL!

Remember, back up, back up, back up! If you screw up your program because of this then you only have yourself to blame! Ive used this 100's of times and its only ever failed because I screwed up, but redoing it with the backup (copy of SUBBLK.DBF) ALWAYS worked.

Good hunting.

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

Internet Explorer 6.0 Fix

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!