Retaining point value
-
Quick question about how the Mango ES works in terms of point values being retained over a power cycle. Lets say that I want to calculate a point value internally, using meta type data I figure, how do I ensure that if the unit is power cycled that value doesn't go back to zero?
Thanks
-
Hi psysak,
Mango logs data, logged data is written to the disk and retained. A point's logging settings determines when it logs. Its purge settings determine when that data is purged.
There is some amount of buffering done by the database engine for a write to make it into the database. You can find these settings in the Mango NoSQL section of the system settings. By default, them minimum time for small batches and the minimum batch size should result in new data being inserted upon delivery to the database controller. Backdates have a 5 second default delay, such that if there are many backdates that work can be done together.
I am somewhat surprised at the question. Were you observing that some data was not being retained in some situations?
-
Hey Phil.
So if a point has logged data, ie its value is being stored in the history at some interval, when the unit power is cycled the current value of that point should be set back to it's latest historical value? Is that how it's supposed to work?
If that is the case then I will have to have a look at what I've been seeing and get back to you because I was pretty convinced that I see values set back to zero.
Just to be clear what I am asking is if I can have a points current value survive a power cycle. If I set a point in the Mango, let's say a meta point, to 5 and I power cycle the unit I was wondering if that 5 would survive.
-
If you have a meta point, and it is set to log all data. You set it a value, and nothing else sets a value, no update events occur for the meta point. You restart Mango. Yes it should have the value you set to it.
You could have other properties get in the way, but I would be surprised had you set them up as such. Some things to be aware of:
-
If you meta point is interval logging then until that interval log, there is data that could in theory be lost. The interval should begin either when the data source is enabled (if polling, or at next poll) or when the point is enabled (if not a polling data source, like Meta). So, if it's a minute average and Mango loses power 59s into that interval, that data is lost.
-
There are prevent extreme sets settings that will prevent it from setting a new value outside those bounds. These are disabled by default.
-
There are prevent extreme values settings that will prevent it from logging extreme values. This is astronomically large values by default, and also disabled.
All that to say that if you're on the Data Point Details page and you toggle "Show cached data" off, then all the samples in that table are recorded in the database and will persist through a power cycle.
-
-
Hey, looks like that works. I made sure to log the point values and then power cycled. Thanks for explaining that, it's good to know.
-
Certainly, glad to hear it's behaving.