Beaglebone persistent variables

oymyakon
2020-09-24
2021-07-28
  • oymyakon - 2020-09-24

    Hi, I cannot seem to get a beaglebone to retain any variables. Can anyone help as to how to get this to work?

     
  • kallileo - 2020-10-03

    The persistence manager allows cyclic and on change saving of the variables.

    Is it possible to activate saving in application instead of using the aforementioned ways?

     

    Last edit: kallileo 2020-10-03
  • eschwellinger

    eschwellinger - 2020-10-03

    I guess you could trigger the save from application by using:

    PersistenceManager.INST_<channelname>.ExternalSave()</channelname>

     
  • kallileo - 2020-10-04

    I guess some thing like this should work

    IF xSavePersMan THEN
        PersistenceManager.INST_PersistenceChannel.ExternalSave();
        xSavePersMan := FALSE;
    END_IF
    

    I don't understand the following part.

    </channelname>
    

    In Codesys help it says:
    In case of a shutdown of the controller or after β€œReset” (warm / cold / origin) the data is stored automatically if the parameter xSaveOnChange is not set.

    What if don't want to save automatically?
    Is it possible to disable this feature?

     

    Last edit: kallileo 2020-10-04
  • eschwellinger

    eschwellinger - 2020-10-04

    then probably the persistence manager is not the right feature/tool, if you do not want have a persistent state on shutdown..!
    you may use:
    https://store.codesys.com/ini-file-utility-bundle.html
    If you just need save some parameter on demand and restore them on demand.

     

    Last edit: eschwellinger 2020-10-04
  • kallileo - 2020-10-04

    Thank you for detailed explanation.

    My controller uses Codesys 3.5.12 so now that the INI file utility is part of the IOT library and requires V3.5.14.0.
    Can I still use the 1.0.0.1 of the INI file utility or not available anymore?
    What options do I have?

     

    Last edit: kallileo 2020-10-04
  • eschwellinger

    eschwellinger - 2020-10-04

    not available (..the license)
    update the device?

     
  • kallileo - 2020-10-04

    Not possible.
    I have 3 HMI devices from different manufacturers using Codesys runtime versions 3.5.12, 3.5.10 and 3.5.7.
    So I will have to wait for years until the manufacturers decide to update their runtime to a version that can be used with the version 3.5.14.0 of IOT library.
    It's real problem with many libraries available in Codesys store.

    My HMI doesn't not have not volatile memory to save Codesys persistent variables and I didn't knew about the Persistent manager at the time I was creating my application. I couldn't use the INI file utility so basically I had write my own simple version of configuration file utility that can used to save user parameters (more than 300 values in 3 text files) on demand and restore them during the first PLC cycle.

     
    πŸ‘
    2

    Last edit: kallileo 2020-10-04
  • NicolaG_89

    NicolaG_89 - 2021-07-28

    Hi,
    you must use the Persistent Manager, please follow this PDF.
    Keep in mind that you cannot write files to the EMMC continuously, so put a interval time at least of 30 seconds.

     
  • NicolaG_89

    NicolaG_89 - 2021-07-28

    Sorry, double post

     

    Last edit: NicolaG_89 2021-07-28

Log in to post a comment.