Feature Request - State restore on power loss

Things to come.
Post Reply
dtfeld
Posts: 61
Joined: Thu Oct 27, 2011 7:02 pm
Bot?: No

Feature Request - State restore on power loss

Post by dtfeld »

ECC.

The BCS works great on a short term basis like a brew session that a couple hours long, but longer term processes like lager temp control where things happen over 4-6 weeks, power failures become a real problem. There is the ability to have a process start up on power up, but I need a way to save the timers and revert back to a specific process State on power up.

These things are usually handled in non volatile memory on a PLC. Any possibility to add this type of functionality?
mavantix
Posts: 48
Joined: Sat Aug 11, 2012 5:30 pm
Bot?: No

Re: Feature Request - State restore on power loss

Post by mavantix »

Second this feature request.
Backyard Brewer
Posts: 31
Joined: Thu May 28, 2009 8:41 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Feature Request - State restore on power loss

Post by Backyard Brewer »

This is a higher priority and we're looking into what it will take and if it's possible onthe current platform.

Thanks for the input!
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Feature Request - State restore on power loss

Post by oakbarn »

I do not yet have a BCS but this is a feature I would want. I use PIDs for brewing but wanted something to control the lager process. Would a simple battery backup power work?
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Feature Request - State restore on power loss

Post by JonW »

oakbarn wrote:Would a simple battery backup power work?
Yes, a simple battery backup would do the trick and is the way I would suggest handling this. The memory in embedded processors can only handle so many writes. By tracking all the states and timers and continously writing them to memory, you could easily wear out the flash memory.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Feature Request - State restore on power loss

Post by clearwaterbrewer »

actually, I think a way to handle long timers and power outages would be to have the BCS use ntp (internet time server) and base some or all timers off this... power goes out, comes back on, the BCS can turn on or off an output based upon what is in the program and what 'time' it is.. This is some serious programming though, lots of little things to consider.. maybe too much for the BCS... It can also tell you how long the power was out ;-)
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Feature Request - State restore on power loss

Post by brahn »

The BCS hardware doesn't have an RTC, so it has no concept of what time it is beyond how many ticks have occurred since it was started up.

I agree with JonW that the best thing to do in this case is use a battery backup. Writing the runtime information to flash on a regular basis could reduce the life of the hardware.

If you would at least like to be notified, we could probably set up an email alert when the power comes back on, or you could do that with a couple of process steps yourself with 3.7.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Feature Request - State restore on power loss

Post by clearwaterbrewer »

you do not need a RTC to to NTP, or at leasst not a hardware one, you grab the time from the network... and have a master timer that keeps times between updates, in ticks or whatever... for *some* processes, this would be a good idea... for a fermentation where on a certain date and time, you want to ramp the temp, you just put it in... no RTC needed, every so often the BCS syncs...
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Feature Request - State restore on power loss

Post by brahn »

I see what you're saying, instead of using NTP to set an internal clock, we would just check NTP periodically and update some variable. That would work. How useful would this be?
User avatar
cscade
Posts: 49
Joined: Wed Sep 16, 2009 1:54 pm
Bot?: No

Re: Feature Request - State restore on power loss

Post by cscade »

NTP is something we may consider for 4.x and beyond, depending on popularity. Since the BCS has no concept of time right now, it would be a significant change to integrate into process logic. That said, it's possible and worthy of consideration. Thanks!
Post Reply