Forum

formulas with the t...
 
Notifications
Clear all

formulas with the time variable

6 Posts
4 Users
0 Likes
4,020 Views
(@thesleepydog)
Active Member
Joined: 7 years ago
Posts: 9
Topic starter  
Are formulas allowed with the time variable?

example:

[setup]
new time First_Hop
new time Boil_Time
[main]
Boil_Time = 01:00:00
"Step" Type = CountDown
"Step" Value = Boil_Time
First_Hop = 00:30:00
restart "Step"

[hop_loop]
if "Step" value <= First_Hop + 00:10:00 //trying to test again value of 40mins
..
end if


   
Quote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

You can’t do online math so the if statement won’t work correctly. Create a new variable and perform the ten minute addition before the if statement. LMK if you need an example. 


   
ReplyQuote
(@thesleepydog)
Active Member
Joined: 7 years ago
Posts: 9
Topic starter  
So this could work?

example:

[setup]
new time First_Hop
new time First_Hop_Timing
new time Boil_Time
[main]
Boil_Time = 01:00:00
"Step" Type = CountDown
"Step" Value = Boil_Time
First_Hop = 00:30:00
First_Hop_Timing = First_Hop + 00:10:00 restart "Step"

[hop_loop]
if "Step" value <= First_Hop_Timing //test against value of 40mins
..
end if
..

   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

That should work. It needs be tested to be sure. If it doesn’t, let us know and we can determine why not and figure out the fix. 


   
ReplyQuote
(@diebeerery)
Eminent Member
Joined: 6 years ago
Posts: 25
 

I do my hops with a variable that you can adjust here is my setup for that..

[setup]

new value FirstHop
new time FirstHopTime
new value SecondHop
new time SecondHopTime
new value ThirdHop
new time ThirdHopTime
new value FourthHop
new time FourthHopTime
new value FifthHop
new time FifthHopTime
new value SixthHop
new time SixthHopTime
new value SeventhHop
new time SeventhHopTime

FirstHopTime = 00:50:00
SecondHopTime = 00:45:00
ThirdHopTime = 00:30:00
FourthHopTime = 00:20:00
FifthHopTime = 00:07:00
SixthHopTime = 00:05:00
SeventhHopTime = 00:00:01

[boil]
if "First Hop" state == true
wait "Boil Timer" value <= FirstHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Second Hop" state == true
wait "Boil Timer" value <= SecondHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Third Hop" state == true
wait "Boil Timer" value <= ThirdHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Fourth Hop" state == true
wait "Boil Timer" value <= FourthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Fifth Hop" state == true
wait "Boil Timer" value <= FifthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Sixth Hop" state == true
wait "Boil Timer" value <= SixthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Seventh Hop" state == true
wait "Boil Timer" value <= SeventhHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif

This post was modified 6 years ago 2 times by DieBeerery

   
ReplyQuote
(@texaswine)
New Member
Joined: 5 years ago
Posts: 3
 

Just sitting down this weekend to do some scripting. Almost done with my first pass, but the hop additions have me scratching my noggin and I'm kind of stuck.

Bryan, it looks like you and I have taken an almost identical approach to the hops. But what I'm wondering is how you kick over and do something like start the wort pump with 10 minutes remaining but you have a 5 minute hop addition. The way the script above is written the pump won't kick on until all the hops have been added, correct? Maybe the key is to not turn on the wort pump until the boil is over!

Would like to know how you fine folks are handling this.


   
ReplyQuote
Share: