Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Memory of a PLC

Zavakh
2018-11-15
2018-11-15
  • Zavakh - 2018-11-15

    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.

     
  • dFx

    dFx - 2018-11-15

    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

     

Log in to post a comment.