Exit Condition using Register?

Things to come.
Post Reply
Backstage
Posts: 5
Joined: Wed Dec 27, 2017 11:34 am
Bot?: No

Exit Condition using Register?

Post by Backstage » Sun Jan 07, 2018 2:56 pm

I have a situation where I would like for a step change in one process to trigger one in another process. Would others find merit in being able to specify an exit condition based on a register? The step change in the first process would set the register (Existing functionality.) and that would then allow (Feature request.) the second process to proceed by referencing that register for an exit condition.

In my case, the first process is for the brew kettle which runs steps for wort collection, bring to boil (100% duty cycle), boil (70%), whirlpool, and such. The second process is for hop additions as I have seen done by others. I want to include "First Wort" for the first hop addition but don't want to start the timer for other hop additions until full boil. I can build the steps to make that happen but it requires a click in both processes at that point. I'd rather have the two tied together and this seemed like a valid approach.

Thanks for considering this or offering any suggestions on how to manage this scenario otherwise.

Cheers!

User avatar
oakbarn
Posts: 780
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Exit Condition using Register?

Post by oakbarn » Sun Jan 07, 2018 10:05 pm

If you have an unused Out and an unused DIN, you can do what you want now.

But:
You can start the Hop Addition Process On Exit of your Obtain Boil State.


In my system I have
State 0
Wait for Boil Exit on BK Temp => 208
This Has Process 5 (Hop/Pitch) to Start
Exit to State 1
State 1 is Hot Break
Boil Timer Count down from 1:30
wait.png
wait.png (21.78 KiB) Viewed 561 times
Process 5 Starts at State 0
Hop Timer Count down from 1:30
hop.png
hop.png (11.1 KiB) Viewed 561 times
Both Timers Start at the same time

Backstage
Posts: 5
Joined: Wed Dec 27, 2017 11:34 am
Bot?: No

Re: Exit Condition using Register?

Post by Backstage » Mon Jan 08, 2018 7:10 am

If you have an unused Out and an unused DIN, you can do what you want now.
I do have an Out and DIN that I could use for this but also have ideas for how I might want to use that available Out where I would need the external signal. At least that part of my explanation was sufficient as your response is spot on.
But:
You can start the Hop Addition Process On Exit of your Obtain Boil State.
Where this workaround suggestion falls short of my objective is I would like to group all hop additions into a single process. This includes "first wort" additions that occur before the boil and start of the boil timer that drives the remainder of the hop addition schedule. I'm looking to advance the states of two active processes with a single step forward click.

Rather than using the Out and DIN I'll likely insert the first wort hop addition state into the kettle process between wort collection and wait for boil. At that point, as you offered, start the timed hop addition process and associated timer.


I can only speculate on the internals of the BCS but it would seem that if registers can be asserted using settings in the State section that they could be made available for an Exit Condition. Registers appear to be global, not process or state specific, as they can be used in ladder logic.
One caveat I just realized is that registers can only be asserted on state change but not cleared. I assume that it might need to handled in ladder logic?

User avatar
oakbarn
Posts: 780
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Exit Condition using Register?

Post by oakbarn » Mon Jan 08, 2018 9:48 pm

I do use a DIN one shot to advance a State. In some cases, it advances States in different Processes. All you have to do is have the same exit condition in Different concurrent states for them both to advance at the same time.

If you are trying to get a Boil Timer and a Hop Timer to start at the same time, all you have to do is have the same exit conditions. In your case, you could have the "first Wort" and your "Boiling" have the same exit conditions. If you are using a Temp, then use the Temp in Both State Exit Conditions.

I have tried to use the registers, but they are only "on" as long as the State is ASSERTED, When you exit a State, it is "off". I have tried to use them to run a Process in a coil of a Ladder Logic, but have found that method has some drawbacks

Backstage
Posts: 5
Joined: Wed Dec 27, 2017 11:34 am
Bot?: No

Re: Exit Condition using Register?

Post by Backstage » Tue Jan 09, 2018 12:24 pm

I do use a DIN one shot to advance a State.
We have already established that this would be a way to accomplish my objective however it would require either a hardware switch or the use of one of the Outs. Neither is a direction I care to take at this point.

Where I want to coordinate a step advance is from Step 4-Bring to Boil (100%) and Step 5-Maintain Boil (~75%) in the Kettle Control process and from Step 2-First Wort Hop Addition and Step 3-Boil (Start timer.) There may be boil time necessary to adjust volume/gravity before starting the hop addition schedule and timer. For a couple of reasons including this one, I do not want to advance automatically to the Boil state. Tying to a temp probe doesn't allow for that.

As a workaround, I have shifted the first wort hop addition over to the sparge/collect process rather than including it in the timed hop schedule for boil and whirlpool steps. When I manually advance into the Boil step that also initiates the Hop Schedule process. Both use timers which are maintained at the same value using Recipe Variables to keep them in sync.

Moving on... I posted this as a new topic as a feature request. I still believe that there would be merit to allowing registers to be used as exit condition sources. What I don't know is how practical it might be to make it so. I guess we'll see.

Cheers!

User avatar
JonW
Site Admin
Posts: 1615
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Exit Condition using Register?

Post by JonW » Tue Jan 09, 2018 1:44 pm

Backstage wrote:
Tue Jan 09, 2018 12:24 pm
As a workaround, I have shifted the first wort hop addition over to the sparge/collect process rather than including it in the timed hop schedule for boil and whirlpool steps. When I manually advance into the Boil step that also initiates the Hop Schedule process. Both use timers which are maintained at the same value using Recipe Variables to keep them in sync.

Moving on... I posted this as a new topic as a feature request. I still believe that there would be merit to allowing registers to be used as exit condition sources. What I don't know is how practical it might be to make it so. I guess we'll see.
The way you're doing it is the exact way I do it. I manually start my boil timer for the exact reasons you stated.

We'll look into this as a feature, but it won't be in the short term. We're awaiting the newly designed BCS units and the focus will be on those for a while.

Backstage
Posts: 5
Joined: Wed Dec 27, 2017 11:34 am
Bot?: No

Re: Exit Condition using Register?

Post by Backstage » Tue Jan 09, 2018 5:26 pm

We'll look into this as a feature, but it won't be in the short term. We're awaiting the newly designed BCS units and the focus will be on those for a while.
Fair enough, JonW. I didn't expect anything immediate. It just seemed like something useful for future consideration.

I appreciate the suggestions I have received. I am just getting around to 4.0 migration and there has been a bit of a learning curve.

User avatar
oakbarn
Posts: 780
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Exit Condition using Register?

Post by oakbarn » Sat Jan 13, 2018 7:35 am

As far as I can figure, right now with Firmware 4.1.1 there are two ways to do without an Out and a DIN:

One is to have your Hop Addition Timer Start at State O that would "ASSERT" when you clicked to Exit to your "Boil 75%" in the Kettle State by clicking the Next State.

Two is that you could also use the Alexa Voice Control to have both States Exit with one Voice Command. I have not programmed my Alexa to do that, but I do think it is possible.

I have not done either because it was so easy to wire a momentary push button switch to do it manually with the push of a button. I use the Buttons to progress along my brew day and have found it easy and reliable. You are only working with 5 vdc.

Backstage
Posts: 5
Joined: Wed Dec 27, 2017 11:34 am
Bot?: No

Re: Exit Condition using Register?

Post by Backstage » Tue Jan 23, 2018 8:13 am

One is to have your Hop Addition Timer Start at State O that would "ASSERT" when you clicked to Exit to your "Boil 75%" in the Kettle State by clicking the Next State.
Oakbarn, this was essentially the recommendation made in the first response to my post and the workaround I am using in absence of a method to step through ALL hop additions in a single process. This includes first wort hops prior to boil.

I wired the rest of the system so adding a switch is trivial. However, that gets me away from the single interface point. Don't see the need for the added cost of Alexa integration and that still another interface point, just a different method.

I've put the register exit option on my wish list. Could happen.

User avatar
oakbarn
Posts: 780
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Exit Condition using Register?

Post by oakbarn » Tue Jan 23, 2018 5:56 pm

I can see how it would be useful for a Register to be an Exit condition. That way One Process State Exit (with the new State turning on the Register) cause a different process State to Exit simply because it exits the first Process State. I would like to see that also as I have had to “BURN” a State to start a Timer so that I could cause One Process State Timer to Exit at the same Time as a Different Process State with an identical timer. If a Register could exit, then I would gain my State back. Even if they have a lot more States, this would still be an easy way to do it. If you are using a DIN or Temperature as the Exit, that is easy as you can set the same parameter in both Exit Conditions. It is the Timer that is an issue with simultaneous exits. I know that a system wide timer has also been suggested that could also help.
I would also renew my request so that you can cause a DIN to be made momentarily by the API as that would allow for voice control.

So I add vote to request for a Register as an Exit Condition.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests