I'm working righ now on a project which involves executing aplication on a RPi then I connect with my laptop using OPC and storing data in MySQL. The data I store is time of each process (I did a simple simulation of a line in which I replaced all unnecessary programs with timers of random value (using Oscat lib)).
My goal is to free some of codesys memory usage somehow after each cycle. I figured out that probably the only way to save some space while executing a program is to clear value of variables after the whole cycle is done. Here's my question, how? Are they saved in any file on a device and I can remove it with python or maybe it is possible to do that form a codesys level? Mb there's another option which I don't know.
I'd appreciate any type of help.
Thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm working righ now on a project which involves executing aplication on a RPi then I connect with my laptop using OPC and storing data in MySQL. The data I store is time of each process (I did a simple simulation of a line in which I replaced all unnecessary programs with timers of random value (using Oscat lib)).
My goal is to free some of codesys memory usage somehow after each cycle. I figured out that probably the only way to save some space while executing a program is to clear value of variables after the whole cycle is done. Here's my question, how? Are they saved in any file on a device and I can remove it with python or maybe it is possible to do that form a codesys level? Mb there's another option which I don't know.
I'd appreciate any type of help.
Thank you in advance.
Hello there,
can't say about memory management of codesys runtime, but you should know that PLC is not made of dynamic memory allocation (excluding NEW keyword).
So if your overall memory consumption is too high, to cut into your code variable dΓ©finitions would be a way too reduce memory imprint.
Regards,
dFx