Process State 0 Timer - Continue

Describe your system and processes, and post your config file.
Post Reply
clegg
Posts: 18
Joined: Mon Mar 07, 2011 12:31 pm
Bot?: No

Process State 0 Timer - Continue

Post by clegg »

I'm having trouble with the timer for a process state = 0. It seems that the "continue from previous state" cannot be on in this state? I can select the box, but once clicking apply it is reset to off.

Is this intentional? Is it possible for this functionality to be enabled? I have a fermentation control state where I would like to have a total fermentation timer, but this is not possible because my process loops back to state 0 as a hold temp state and the timer is reset.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Process State 0 Timer - Continue

Post by JonW »

For several of my Procs, I use State 0 as "Initialize Proc" and set accumulated timers and things there. I then immediately jump to State 1 to continue processing. I then may loop between states 1 to 7 where the "Continue from previous state" value is set.
clegg
Posts: 18
Joined: Mon Mar 07, 2011 12:31 pm
Bot?: No

Re: Process State 0 Timer - Continue

Post by clegg »

Got it, thanks. Maybe I'll turn State 0 as my Yeast starter state and to initialize as you do below.

I'll edit the Wiki to show the fact that state 0 cannot continue as soon as my account is removed from "new" status. Not sure how long that takes but hopefully soon...

JonW wrote:For several of my Procs, I use State 0 as "Initialize Proc" and set accumulated timers and things there. I then immediately jump to State 1 to continue processing. I then may loop between states 1 to 7 where the "Continue from previous state" value is set.
clegg
Posts: 18
Joined: Mon Mar 07, 2011 12:31 pm
Bot?: No

Re: Process State 0 Timer - Continue

Post by clegg »

I made the programming change last night to make state 0 my yeast starter and start fermentation with step 1. State 0 also starts the counter such that my state 1 hold temperature can have the "continue from previous state" option selected.

Just for people who may be curious on the functionality, the "continue from previous state" check box continues all functions of the timer from the previous state and not just the initial value. When it is selected, all other fields (count up/down, etc) are ignored. This is contrary to the way I was expecting it to work, which is just to set the initial value from the previous state and use the other fields to define behavior.

As a result my total fermentation timer includes the starter time. Not exactly the way I wanted it but still better than it was previously. Perhaps in a future version the timer behavior could be updated to only take the initial value from the previous state and use the behavior options defined in the current state. That would would enable me to split them apart.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Process State 0 Timer - Continue

Post by JonW »

I'm not sure I'm clear on what you're trying to do. Why would you want to take the initial value into another state? The reason for the "continue from previous state" is to keep the timer running. If you want a new initial value in the next state, just set the value the same as you did for the previous state and the timer will restart. If you're looking to have the same initial value in multiple states, that's not what the "continue from previous state" option does.
clegg
Posts: 18
Joined: Mon Mar 07, 2011 12:31 pm
Bot?: No

Re: Process State 0 Timer - Continue

Post by clegg »

Let me describe a bit more. Here is my fermentation setup:
State 0 = Starter. Exit condition is Win 0 = On, which proceeds to state 1 to start fermentation.
State 1 = Fermentation Hold Temp. Launches a state 2-6 when needed to heat or cool.
State 2-6 = Cool or Heat freezer air based upon wort temp. Return to State 1 when wort temp is at target.
State 7 = Cold crash. Entered from previous states by Win 1 = On.

I have two timers:
Timer 0 = Total fermentation time.
Timer 1 = Current state time.

I'd like to start the Total Fermentation Timer the first time Hold Temp (state 1) is entered. However, my heating and cooling states 2-6 loop back to the hold temp state 1 when they reach target. On those subsequent entries I want the timer to continue counting from the previous value.

Ideally what I would do is disable the state 0 timer (yeast starter) and have an initial value of 0. Then set state 1 to count up with the "continue from previous" value. The first time the state is entered (from the starter) it would start counting up from a value of 0, while on previous return loops would continue from the current value.

The issue is that the "continue from previous state" does not allow you to set a count up / down. It simply keeps the timer completely in the previous condition. In my case that means that if it is disabled in the starter it will stay disabled in all subsequent states. To resolve this I set the counter to start counting up in state 0 and continue from here. The only drawback is that the total fermentation timer now includes the starter time.

I could add another 1 second state in between that would simply initialize the timer, but I'm out of states.

The suggestion is to have the "continue from previous" check box apply to the initial value of the timer, but not the count up/down setting. That would enable my situation above. It would also enable things such as counting a timer up in one state and then counting it back down to zero from that value in a subsequent state.

Hopefully that makes sense, it's difficult to describe in writing.

JonW wrote:I'm not sure I'm clear on what you're trying to do. Why would you want to take the initial value into another state? The reason for the "continue from previous state" is to keep the timer running. If you want a new initial value in the next state, just set the value the same as you did for the previous state and the timer will restart. If you're looking to have the same initial value in multiple states, that's not what the "continue from previous state" option does.
User avatar
bbrally
Posts: 210
Joined: Sat Mar 27, 2010 3:59 am
Bot?: No
Location: Vancouver, BC
Contact:

Re: Process State 0 Timer - Continue

Post by bbrally »

Adding another state would seem to be your easiest option.

I too ran out of states and had to use the "spawn/kill other processes" in order to add more states to my process.

At the end of state0 you could kill process1 and spawn process2 for a "fermentaion process". This would give you one extra state for the initialization of the timer.

Another option might be to have a process just for the total fermentation time. Spawn it as you leave state0 and start the "fermentation time process". It would run at the same time as your current process0.
clegg
Posts: 18
Joined: Mon Mar 07, 2011 12:31 pm
Bot?: No

Re: Process State 0 Timer - Continue

Post by clegg »

I like this. Will try it tonight. Thanks.
bbrally wrote: Another option might be to have a process just for the total fermentation time. Spawn it as you leave state0 and start the "fermentation time process". It would run at the same time as your current process0.
Post Reply