Protection of blocks in step 7

A

Thread Starter

A- Hossein

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?
 
D

Daniel Chartier

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
 
D

Dennis Patterson

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
 
There is free software called S7PROT. With this file you can protect or unprotect all the blocks in your project.
 
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
 
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?
 
B

Barry P Fowler

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.
 
This touches on one of my (many) pet peeves. Manufacturing companies have forgotten what customer service really means. In the 1980's, when pretty much all control systems were just now transitioning from analog to digital (PLC) systems, the old analog systems had complete sets of schematics for the wiring and the electronics. Any worthy troubleshooter could get into the wiring or components and make changes as necessary to get the equipment running again to get hundreds or thousands of people back to work, or to get power plants back online, or to get sewage treatment operating again....

But now? Companies lock their software, claiming that they don't want people changing it. What happens at 3:00 in the morning when a process is down? Can you troubleshoot it if the built-in error codes aren't telling you the answer? Nope. Why not? It's "protected." This is like not giving out schematics.

In my classes, I teach folks how to reverse-engineer systems. Until manufacturers start giving out source code so folks can troubleshoot, I'm going to continue. Either that, or problems that are prolonged due to locked code should be back-charged to the party that locked the code (didn't give the equivalent of analog schematics).

Will this ever happen? Of course not. Siemens is among the worst, but are by no means THE worst for this. I'll continue to hack code until they change their outlook... and go back to the customer-friendly ways of the past.

They are protected (to forestall a rebuttal) by non-disclosure, non-compete contracts. We've used them for years, and they work. Right now, I see my actions similar to the actions of floppy-breaking programs from the (again) 1980's. The owners are preventing full use of the products one has paid for, and the owner of the license is just getting what he deserves, and already has purchased.

Let me get off my soapbox now...
 
C

Curt Wuollet

It's one of my pet peeves also, but I think the right approach is to address this up front and refuse to buy junk that has the hood welded shut. The problem is educating the people who do the buying. A good rule of thumb is to tell them that a system with no access is worth about half what a system you can fix is worth. From an informal study I did, that was about what was spent on outside resources and extra downtime. And that is being generous. Of course, it would vary with the cost of your downtime. Some places can tolerate a few extra days before a vendor tech can get there. But you need UPPER management to know that locked equipment is a poor purchase decision. Otherwise people just buy whatever is in their favorite color or whatever is the shiniest or in fashion.

Regards

cww
 
I like the Omron does it. They give you the option of write protecting but leaving the code visible with an easy way of removing the protection.

That way, you are able to view the code for troubleshooting, but are safe from accidently "fat-fingering" and breaking the code. If you really want to change the code you can by unchecking the write-protect box.
 
File / block protection is essential when developing and commissioning projects. We have had a project "magically" change overnight because we've left it open. Of course everyone swears that nobody touched it.

Once the job is finished, installed, commissioned and the "check clears", the full sources version and passwords get turned over. At that time we welcome them to play around all they want. They screw up, it's $200/hr for us to come in and make it work again.
 
thank you, Barry P Fowler
it was really good hunting...
i works with Chinese people. i found protected blocks in project.
*know_how_protected*... :(

people use cracked S7 programs(i.e. simatic manager or Net) to write PLC ladders, but same people try to protect their ladders. What is this?

big contradiction?
 
C
Simple, they just don't value _other_ people's intellectual property. Oh, the hypocrisy.

Regards
cww
 
I am trying Barry's trick and have run into a snag or two. Maybe someone has seen these and can offer some advice:

1. I can't locate a DOS based DBFedit such as Barry refers to. I have found a Windows based product DBFmanager, which may be causing snag #2:

2. With DBFManager I was able to open and edit the file as barry suggested, but when I re-open the Simatic Project All of the blocks are gone!

I checked my edit & can still open SUBBLK.DBF without an eror message, but obviously the result is not as desired.

If anyone knows where I can still get the DBFedit Barry refers to, or knows a work around for the windows product. I'm sure others would also be interested.
 
B

Barry P Fowler

> I am trying Barry's trick and have run into a snag or two. Maybe someone has
>seen these and can offer some advice:

> 1. I can't locate a DOS based DBFedit such as Barry refers to. I have found a
> Windows based product DBFmanager, which may be causing snag #2:

> 2. With DBFManager I was able to open and edit the file as barry suggested,
> but when I re-open the Simatic Project All of the blocks are gone!

Go to www.thetechnologybusiness.com, click on useful inks, click on useful downloads and then click on DBFEDIT to download the zip file.

It's freeware, it's not password protected and it's virus free!

Cheers
Barry
 
Top