karolus
In my program I declared some variables as retain.
After stop the PLC and restart in the dashboard I get the message:
'Persistent Storage: Reading persistent.file into local buffers'
But the value I expected are not in the variables.
Is their a way to write and read the values myself in a file on the machine where the PLC runs?
Quote 0 0
thiagoralves
Go to settings on OpenPLC runtime and enable persistent storage.
PS: As of now, persistent storage only backup memory word variables (%MW). In the future I will implement other datatypes as well.
Quote 0 0
karolus
Thanks for the fast reply. I have enabled the persistent storage. But my variables are DWORDs. (%MD).
That explain why I cannot store the values. Thank you for the great application.
Quote 0 0
thiagoralves
Thanks! If you have some C knowledge, you can help me implement other datatypes. Check the current implementation on /webserver/core/persistent_storage.cpp. This is not a hard task and might take about 2-3 hours from an average C programmer. All that need to be done is create a struct to store different data types on a single file and then read the file and copy the struct over to the appropriate buffers.
Quote 0 0