Siemens Step 7 Data Block export with all dependencies

Pete_S

Member
Join Date
Mar 2015
Location
Portland Maine
Posts
76
Hello All,

Is there a way in Step 7 5.5 SIMATIC Manager to export a data block so that it can be imported into another project with all dependencies (UDT's and structures)? I am familiar with AB products and they make this a rather trivial procedure (for instance I can export a routine and get all referenced structures and tags in new project when I import the routine) and I cant seem to find a simple way to do it with Siemens. Any help would be greatly appreciated.
 
Either just copy it from one project to the other (you can open multiple)

Or create a library and add it to it.
 
Either just copy it from one project to the other (you can open multiple)

Or create a library and add it to it.

Hi boneless,

When I try to copy and paste the DB into a new project I get a host of errors due to missing dependencies. It is a rather large DB so going through and finding all dependencies and copying all to resolve errors is not a trivial task.
 
I haven't tried this but let us know if this works: from the Lad/STL/FBD editor, select "Generate Source" from the FILE menu, enter the source file that you wish to create, select the object that you wish to generate the source for and check the "Include Reference Blocks" option.

I would hope that it outputs all referenced objects related to that object you selected. From help: "Select this option if you want to generate a sorted source file which, in addition to the selected block, contains the whole block tree which is called from this block."
 
I should add that you copy the generated source file to your other project, compile it, and it should have duplicated what you were trying to copy using the simple method.
 
Gotya.

Have you attempted copying the associated UDT prior to copying the DB?
 
Use the block consistency check to show the calling tree for the DB concerned. This will show which UDTs are used in the DB and hence which UDTs you will also have to copy to your other project.

e.g. DB1 uses UDT1 and UDT2, UDT1 uses UDT3

udtd.JPG
 
Hey guys,
Thanks for all the advice, much obliged. Sorry for delayed reply, had to close out some low hanging fruit customer issues before digging back into this.

@ jstolaruk:

When I attempt to use the method that you suggested, objects under Bausteine (blocks?) are not accessible as Bausteine is greyed out as seen in attachment "generate source". Maybe I am missing some "prerequisite" checkbox or option?

@ L D[AR2,P#0.0]

When I attempt to use the method you suggested, the check consistency option is not available as seen in attachment "Block consistency". Again
maybe I am missing some "prerequisite" checkbox or option?

@ boneless

As you can see from screenshots this is a large project with many levels of nested UDT's so manual ctrl +c ctrl +v would take more time than I can dedicate to this QA effort.



Thanks again guys!

generate source.png Block consistency.png
 
Create a new project and insert an S7 program into it.
Copy the DB you are interested in and all the UDTs from your project to the new project. Generate the calling tree by right clicking on the blocks folder (as indicated above) and use Check Block Consistency to determine the UDT's you need - note them down. Delete the UDT's you do not need from the new project. The remaining blocks are what you need.

There is no automatic way to do this. Control A/C/V and Delete required. Post the archived new project containing the DB and UDT's if you need more help.
 

Similar Topics

Just a quick question I can't find an answer on yet. I have created my own recipe structure using a Global DB and when I came in this morning...
Replies
2
Views
2,018
Hello, I am trying to find an easy way to create data blocks in Step 7 with ~100K tags other than manually defining each tag in the LAD/STL/FDB...
Replies
8
Views
14,203
Hello World Have a bit of an unusual problem. On a project currently being developed I have been issued with blocks that MUST be used, however...
Replies
2
Views
1,990
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
249
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
547
Back
Top Bottom