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

UniPi Neuron based on Raspberry Pi 3 Variable Retain...

mikeardy
2018-02-08
2018-02-18
  • mikeardy - 2018-02-08

    Hi,
    I'm using the UniPi Neuron S103x (https://www.unipi.technology/unipi-neuron-s103-p93).
    I need some variable declared in the program to be retained in case of power outage.
    Is it possible or not?
    Thanks.

     
  • DavidCozens - 2018-02-08

    The topic of retain memory on the Raspberry Pi has been discussedd in this forum post l viewtopic.php?t=5722 l - as the Raspberry Pi does not have non-volatile RAM a solution requires some work. Edwin shared some code that can help.

     
  • mikeardy - 2018-02-09

    DavidCozens hat geschrieben:
    The topic of retain memory on the Raspberry Pi has been discussedd in this forum post l viewtopic.php?t=5722 l - as the Raspberry Pi does not have non-volatile RAM a solution requires some work. Edwin shared some code that can help.

    Thanks.
    I red that topic but my situation is quite different from that because I don't have possibility to physic direct access to the RPi inside the Neuron.
    I need a UPS solution like this http://www.pimodulescart.com/shop/item.aspx?itemid=30 that can send a shutdown signal to the Neuron that in such a way (the second problem) mush initiate a graseful power down of linux system preventing SD file system corruption.

    Thank you.

     
  • josepmariarams - 2018-02-11

    See:

    http://pigeoncomputers.com/products/pigeon-rb300-cm3/

    Powered at 24VDC with capacitor ups. The problem witth it is that outputs are NPN and inputs PNP which can be solved with din rail optocouplers.

    Be healty

     
  • DavidCozens - 2018-02-12

    mikeardy hat geschrieben:
    Thanks.
    I red that topic but my situation is quite different from that because I don't have possibility to physic direct access to the RPi inside the Neuron.
    I need a UPS solution like this http://www.pimodulescart.com/shop/item.aspx?itemid=30 that can send a shutdown signal to the Neuron that in such a way (the second problem) mush initiate a graseful power down of linux system preventing SD file system corruption.
    Thank you.

    Hi Mike,

    I think you will need to go for an external UPS, there are several din rail options from companies like "MeanWell" that give a digital signal while the supply is good. If that signal is connected to one of the digital inputs on the Neuron then you should be able to gracefully save the retain data and then use codesys to issue a shutdown command which will ensure the integrity of the file systems. The issue that you will then have is how to you wake up the raspberry Pi again once the power returns? My suggestion would be to run the power through a din rail delay relay, where the relay is signalled from the UPS. I think you should be able to arrange it so that if the UPS signals a loss of supply you cut off the power to the RPI after a given time, and only re-apply power once the UPS signals a good supply voltage.

    regards David

     
  • mikeardy - 2018-02-18

    DavidCozens hat geschrieben:
    Hi Mike,
    I think you will need to go for an external UPS, there are several din rail options from companies like "MeanWell" that give a digital signal while the supply is good. If that signal is connected to one of the digital inputs on the Neuron then you should be able to gracefully save the retain data and then use codesys to issue a shutdown command which will ensure the integrity of the file systems. The issue that you will then have is how to you wake up the raspberry Pi again once the power returns? My suggestion would be to run the power through a din rail delay relay, where the relay is signalled from the UPS. I think you should be able to arrange it so that if the UPS signals a loss of supply you cut off the power to the RPI after a given time, and only re-apply power once the UPS signals a good supply voltage.
    regards David

    Thank you!

     

Log in to post a comment.