S7 datablock data types

Ned_Flanders

Member
Join Date
Oct 2008
Location
In hiding, England
Posts
535
While attempting to add a couple of functions I have found a discrepancy between the data types in a datablock between the running program and the backup copy the manufacturer left.

Can I online edit the data types rather than change and download the whole block?

The datablock contains lots of machine setting values and I don't want thes to default to "Zero"!!!

Thanks, Mark
 
No, you cannot change the declaration and keep the actual online values.
This is one of the most irritating deficiencies of STEP7.

I suggest that you change the data types in the offline project, but just make sure that the location of variables dont change.
Change from WORD to INT or DWORD to DINT or DWORD to REAL will be OK.
Then do not download this modified DB to the PLC.

You can then at a later time carefully update the offline DB's actual values with the online DBs actual values.
When everything lines up with the correct values and types, do a download to the PLC.
 
While attempting to add a couple of functions I have found a discrepancy between the data types in a datablock between the running program and the backup copy the manufacturer left.

Are the data types that are different the same length e.g. word/int or dword/dint ?
 
Maybe several DINTs have been changed into double the number of INTs.

Is the size of the DB in bytes the same as before ?
Or are the modifications at the end of the DB ?
 
Maybe several DINTs have been changed into double the number of INTs.

Is the size of the DB in bytes the same as before ?
Or are the modifications at the end of the DB ?
You are right - the block is the same size.

I can work around the problem - just dont want to loose 7 years worth of settings!!!
 

Similar Topics

Hello everybody, I have strange problem. It is third time, that this think appeared. PLC worked fine with out problems and later for some unknown...
Replies
4
Views
2,490
In a data block, if the tag is ticked in the "Retain" column", is it meant to be retained after cycling the power to the PLC? I'm finding that...
Replies
2
Views
665
I'm having a bad day. Daft question coming up...Anyone know why I can't add anything into this DB? Add button is greyed-out. Thanks
Replies
14
Views
1,495
Hi Looking for some advice. I have a project that was developed for an S7-300. In that project I have a number of datablocks which only contain...
Replies
7
Views
2,527
Hi, Whenever I update a projects CPU with new code and add more variables to datablocks I encounter a problem that I'm sure there is a correct...
Replies
7
Views
3,223
Back
Top Bottom