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
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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
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!