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

Persistence Manager

2017-11-02
2021-01-04
  • KlausiKleff - 2017-11-02

    Hallo

    ich arbeite mich gerade in Codesys ein, und komme bei folgender Aufgabe nicht weiter:

    Ich brauche persistente Variablen. Diese müssen eigentlich nur bei Änderung neu gespeichert werden, um dann bei Neustart der Steuerung wieder verwendet werden zu können (Änderung der Variablen ca alle 10 Betriebsstunden)
    Ich habe nun in einen Beitrag hier im Forum gelesen, dass sich dies mit den Persistence-Manager lösen lassen würde.
    Ich komme aber nun nicht weiter wie man diesen zur Application / bzw zu den Modulen hinzufügt. In der Hilfe von Codesys finde ich hier auch nichts konkretes.
    Kann mir hierzu jemand einen Tipp geben ?

    Vielen Dank im Voraus

     
  • eschwellinger

    eschwellinger - 2017-11-05

    Hi,
    attached the example project for using the persistence manager,
    anyway an ups would even in this case help to prevent the sd card damage (in case you switch off powersupply while writing the
    persistence manager files)

    BR
    Edwin

    Persistenz_mini_SP11.project [95.92 KiB]

     
    • dumpfbacke - 2020-12-19

      Sorry for asking again.

      I am using VAR PERSISTENT RETAIN to rescue data on my raspberry pi.
      Runtimesystem will save this data in to file in case of stop runtime and restore it automaticly during startup runtime, right? in case of loss power data can not be restored because of controlled runtimestop is not possible.
      So now is it possible to save for example once per hour thisVAR PERSISTENT RETAIN file" by plc code?
      in my opinion the most simple way to rescue in case of powerloss.
      please answer, thanks dumpfbacke

       
  • franz.millegger - 2019-01-02

    Hallo,

    sorry, dass ich dieses alte Thema wieder aufgreife.
    Ich habe mir das Projekt angesehen, funktioniert auch so weit, bzw. auch klar.
    Leider schaffe ich es nicht, den Persitence Manager in mein eigenes Projekt zu integrieren.
    Ich habe mit dem Application Composer leider keinerlei Erfahrung.
    Allem Anschein nach sind hier viele POU´s, Tasks,.. automatisch generiert worden.
    Ist irgendwo ein Manual vorhanden, wie der Applcation Composer zu bedienen ist?

    Schönes neues Jahr.
    lg

     
  • celliott - 2019-10-19

    I downloaded the file "How to Setup the PersistenceManager from Scratch.pdf" and cannot complete step 5. I'm using version 3.5.15.0 and the screenshot is a little different.

    I can't seem to add the Module or the Application.

    How do I solve this issue?

     
  • eschwellinger

    eschwellinger - 2019-10-19

    Hi,

    maybe the example project helps in this case.

    Writing files to SD card could lead to corrupt SD card while switching it off.
    Therefore I told already told - for Retains in file and as alternative retains with persistence manager
    having a UPS is mandatory to have it reliable.

    BR
    Edwin

    Persistenz_mini_PI_SP15.project [277.13 KiB]

     
  • celliott - 2019-10-19

    Thanks for the example which worked fine.

    However, I needed to add this function to my existing application where before I could add/configure the persistent functionality, I had to go menu "Composer - Add Module Library to Project", select AC_PRESIST and add to my project.

    From then on, it was quite simple.

    Thanks for your help.

     
    👍
    1
    • yannickasselin - 2021-01-04

      Thanks for the info. I also had problems with step 5. "Composer - Add Module Library to Project" step is missing in the pdf.

      Thank you

       
  • celliott - 2019-10-22

    So I've successfully implemented the persistence manager, but this seems to have caused another issue.

    I now have unstable communications with one of my Modbus RTU Slave devices. I'm using Codesys V3.5.15.0.

    The modbus RTU salve, I've tried using V3.5.10.30 and V3.5.15.0 and both drop out shortly after a download. V3.5.10.30 seems to last a little longer, but drops out after a few minutes.

    If I remove the persistence manager, the modbus RTU slave works fine. Also, this slave has been working for around 18 months so I'm fairly certain it's not a wiring issue.

    How do I make this RTU slave have stable communications?

     
  • eschwellinger

    eschwellinger - 2019-10-22

    Hi,
    not sure, some ideas:

    • Check the taskdeployment where your modbus io's are updated and varify the
      priorities of your tasks according this.
      If needed call the modbus stuff in the High Task of the application composer / persistence manager

    BR
    Edwin

    IMG: ModbusIOUpdates.png

     
  • thinkamp - 2020-11-16

    Hallo,
    ich habe mich bereits eine Weile mit dem Persistence Manager beschäftigt, jedoch stehe ich nach wie vor vor dem Problem, dass die Variabeln nicht gespeichert werden.

    Ich habe alles in der Simulation ausprobiert.
    Bei einem erneuten Download werden die Daten wieder überschrieben.
    Beim ausführen des Musterprojekts werden folgende Fehler angezeigt:
    License file invalid.
    Chanel1periodicandChange: Config file not found!
    *Chanel2onChange: Config file not found!

    Es wird auch eine Datei vom Typ ~U-Datei erzeugt in der folgende Daten zu fenden sind:

    Name
    DESKTOP-QJPPC0T
    5548
    637411299644040318

    Dies entspricht nicht dem Format in wie es in der Beschreibung zu finden ist:
    https://help.codesys.com/webapp/ac_pm_storage_format;product=core_Application_Composer;version=3.5.16.0

    Kann mir hierzu jemand weiterhelfen?

    Vielen Dank im Voraus

     
  • eschwellinger

    eschwellinger - 2020-11-16

    if you write 'simulation' you mean you are using Control Win on the same machine where CODESYS is up and running or is it real simulation in CODESYS?
    Simulation is not doing these files acesses... so please login to the plc which is on your CODESYS machine.
    (use the german section if you need answers in german) 😉

     
    👍
    1

    Last edit: eschwellinger 2020-11-16
  • thinkamp - 2020-11-19

    Das Problem wurde gelöst. Es lag an dem Simulations-Modus.

     

Log in to post a comment.