6/29/2021 9:01 AM | |
Joined: 5/27/2014 Last visit: 9/24/2025 Posts: 122 Rating:
|
Manual also mentions, that running timer should not be reinitialized. What are the real world consequences of this and what is good programming practice to prevent this issue? Generally I have instance data for timers defined in Statics in FB. If I change any variable declaration in FB, TIA ask me to re-initialize the DB. If any timer is running and I choose to re-initialize DB, all running timers will end up with Q in TRUE. How do you deal with this, if I can't switch PLC to STOP?
------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 06/29/2021 09:41:31New subject after splitting TIA V20 update 3 |
|
6/29/2021 3:29 PM | |
Joined: 7/7/2010 Last visit: 9/24/2025 Posts: 16136 Rating:
|
Only download changes to instance DBs when any instance DB timers are not going to cause a problem. If you are downloading changes to a timer DB, something is not right. Only DBs that are changed because of downloaded changes get reinit'd. During the download, it does not reinit every DB in the system, only those affected by the changes. If you change something that is used in a lot of places, it may cause a large ripple of instance DB changes, but they should not affect instance timers inside of those FBs. There are work-arounds if you absolutely must make changes (while things are running in automatic operation), and they are horrible to do and I do not recommend it. Structure the logic so a timer having to start over is not going to happen because you updated an FB. And, to be honest, I do not recall ever running into a situation where a running timer lost its state. It probably happened, but I don't recall under what circumstances or whether it was an older version of portal and PLC firmware.
|
science guy |
|
Follow us on