S7 Data block structure lost

AlanW

Member
Join Date
Apr 2007
Location
Newcastle
Posts
19
I accidentally modified the structure of a datablock and saved it (but didn't download it). Is there any way to recover the datablock structure from the PLC back into Step 7?

S7-400, Step7 v5

Thanks

Alan
 
How much of a change to the structure have you made ? Is this in a running process or development ?
 
it's arunning process and I've completely lost the structure (it wasn't that big to start with, probably only 20 bytes or so)
 
That the DB is short is good news. My suggestion as follows.

Delete the DB from your offline folder
Copy the DB from the online folder to the offline folder.
Open the DB in the offline folder. The variables names will now be STATx but the type of variable will be intact. Change to declaration view. Change the STATx variable names to more meaningful ones. As long as you only change the variable name and not the variable type you will be ok. Do not delete or insert any declarations. Save the offline DB.
 
I haven't got Step 7 in front of me at the moment, but you open the online folder from the toolbar in Siematic manager. I would normally drill down to the block folder and then display both the offline and online windows as two panes (ALT W arrange vertically). I would then drag/drop the DB from the online folder to the offline folder.
 
Another possibility is that if this is an instance DB for an FB , go to where the call is made ( after deleting - or better rename/renumbering the dodgy DB just in case) , you should then see that the declaration is in red , and you will be given the option to regen the block .

The online button is on the top task bar , and opens an online copy of the offline program , right click and copy the block you have messed with , and drop it back to the offline window , assuming that this Db isn't an FB DB
 

Similar Topics

Afternoon, I have a DB in TIA Portal V16 that is optimised. I cannot change this. There is an array inside that block which consists of 3000...
Replies
9
Views
1,130
Hello all, PLC-programming noob here. I have multiple clients accessing some data on my Siemens S7 1211C PLC; some OPC clients and some direct...
Replies
30
Views
8,302
Hey people, I have been using GET_NAME , GET_IM_DATA and ModuleStatus FB to get an info from Modules inside my program, but ever since and...
Replies
4
Views
2,542
Hi, just wondering if I could get some advice when setting up function blocks (Currently using Siemens S7) using a STRUCT data format. Say I was...
Replies
11
Views
3,003
Hi, Ok bear with me, I have an Array of Real in a DB ranging from 0 to 10. In ladder I want when count pulse = 100 move count into Array 0...
Replies
1
Views
2,079
Back
Top Bottom