Retain - forgets when program is updated

emilg

Level-1
Beiträge
52
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello

I have a Mbus program reading out 41 Mbus meters running on a SRT SoftPLC.
When i made small changes in the program it forgets the old values from the meters. I have marked Retain but 8/10 times the values get to 0.0 again.....
( i newer uses Cold start)
Is there some thing i can do to prevent it from happens?'
Can the Properties reserve/retain make som difference?
Is it possible to make a retain/memory area in the PLC for some program's there is reserved, and not can be overwrited by some other parts of the program?



multical.png
 
Dear emilg,

the runtime checks in regards of the tetain variables the name of the application.
In case the name (maybe included version number) changed, the runtime will reset the retain variables.
--> In this case you'll get a warning that a warm restart won't be possible.

As solution you can keep always the name of the application and add the version in a top level folder or in a commentfield of a POE.

An other alternative could be to store retain (mostly recipe values) inside of a csv file inside of the flash.

Just feel free to call the Hotline for any further questions.

Reg

Frank
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Thanks. I will see if i can solve some problems with the names.
Is there a way to save all the PLC's Retain values directly to a CSV file, and then restore them again?
fx. save 512bytes of retain to csv, and then back if values are lost?

- Emil
 
Hi emilg,

out of the box this function is not implemented.
But in case you need it only during upgrade operation you can easily use the import/export recipe functions of the Watch window.
Just import a variable (or at best a struct), right click and activate read recipe.
Pc Worx will now upload the values and you can send them back after the update is performed.

Another posibility would be to use the File FBs...

Reg

Frank
 
Zurück
Oben