Forum

Notifications
Clear all

TIA V17 adding a static to an FB reset every recipe value in the instance DB

5 Posts
3 Users
0 Reactions
5 Views
(@tomhw)
New Member
Joined: 2 years ago
Posts: 0
Topic starter   [#46]

TIA V17, CPU 1214C on a mixer we shipped last year. Customer asked for a small change, so I added one Static Bool to FB_Recipe and downloaded software in RUN. Compile clean, download clean.

Every setpoint in the instance DB went to zero. Batch sizes, mix times, the lot, and the operator had typed those in by hand on the panel over a year. The customer thinks I've restored an old backup over their values, which I haven't. I checked the Retain setting on the instance DB and the setpoints are all retentive, and I uploaded the DB from the CPU to be sure, still zeros.

I've done interface changes on FBs before and don't remember losing values. What did I do differently this time? Any ideas. edit: forgot to say, that download was software only.


Advertisement

   
Quote
(@annaz)
New Member
Joined: 8 months ago
Posts: 0
 

Aren't retentive values supposed to survive? I set Retain on my bench DB for exactly this reason. Why didn't it protect them?



   
ReplyQuote
(@tomhw)
New Member
Joined: 2 years ago
Posts: 0
Topic starter  

Retentive protects against a power cycle, not a new interface. The download made a new DB with a new layout and the old values had nowhere to go. Pretty sure that's it, but I'm waiting for someone who knows the mechanism properly.



   
ReplyQuote
(@pnina)
New Member
Joined: 2 years ago
Posts: 0
 

Your understanding is right. A changed interface is a changed DB layout, and a normal download of that initialises the DB from start values. Retain doesn't come into it.

The way round it on S7-1200 and S7-1500 is the memory reserve. Block properties of the FB in V17, Download without reinitialization, enable the reserve and give it some bytes. There's a second tick for the retentive part and you want that one too, since your setpoints are retentive. New Statics then land in the reserve and the download keeps the values. The reserve has to be enabled and downloaded before the interface change, not after, so enabling it now costs you one more reinit.

Values go back in from the recipe sheet, then enable the reserve before the next change.



   
ReplyQuote
(@annaz)
New Member
Joined: 8 months ago
Posts: 0
 

This covers the same fault: https://plctr.com/tia-portal-download-without-reinitialization/



   
ReplyQuote
Share: