RevPi Core 3 - Keep the variable value after unexpected shutdown

Topics about the Software of Revolution Pi
Post Reply
max1796911
Posts: 2
Joined: 05 Mar 2019, 07:04

RevPi Core 3 - Keep the variable value after unexpected shutdown

Post by max1796911 »

Hello Mr. and Mrs.

We are now evaluating a potential Revolution Pi application project.
The customer requires some configuration(variables) that its value can be kept after rebooting the system.
Similar to the Persistent variable which can be declared in CODESYS.

However, we are not sure how to approach this issue.
Could someone help us with this issue?

*We are now planning on programming the application either with Python or logiCAD3.
*This is the first time we utilize this kind of system and we understand there might be multiple approaches to tackle this.
We would appreciate a simple solution that we will be capable of the actual implementation.
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: RevPi Core 3 - Keep the variable value after unexpected shutdown

Post by dirk »

Hello with Python there exists a module called Pickle which implements simple serialization:
https://wiki.python.org/moin/UsingPickle
You should have in mind to prevent exhaustive writing to the eMMC as this has limited writing capability.
The logi.cals forum is perfect in case you have questions on this topic as there are the experts.
max1796911
Posts: 2
Joined: 05 Mar 2019, 07:04

Re: RevPi Core 3 - Keep the variable value after unexpected shutdown

Post by max1796911 »

Thank you for your reply!
I think Pickle should work just fine for our application.
The logi.cal solution is much appreciated as well.
Post Reply