<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Scripts - BruControl Forum				            </title>
            <link>https://brucontrol.com/community/scripts/</link>
            <description>BruControl Discussion Board</description>
            <language>en</language>
            <lastBuildDate>Thu, 16 Apr 2026 16:49:50 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Scripting bug: Error reading time value from global with custom formatting</title>
                        <link>https://brucontrol.com/community/scripts/scripting-bug-error-reading-time-value-from-global-with-custom-formatting/</link>
                        <pubDate>Mon, 13 Dec 2021 23:59:20 +0000</pubDate>
                        <description><![CDATA[-Create new Global of type Time with name Mash Rest 1-Set value to 30 minutes-Read from script with
new time rest1
rest1 = &quot;Mash Rest 1&quot; value

Result -&gt; OK
-Edit Global to use a cus...]]></description>
                        <content:encoded><![CDATA[<p> </p>
<p>-Create new Global of type Time with name Mash Rest 1<br />-Set value to 30 minutes<br />-Read from script with</p>
<pre contenteditable="false">new time rest1
rest1 = "Mash Rest 1" value
</pre>
<p>Result -&gt; OK</p>
<p>-Edit Global to use a custom format of mm:ss<br />-Re-run script</p>
<p>Result -&gt; Error: Expected a Time type</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>Trystan Williams</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/scripting-bug-error-reading-time-value-from-global-with-custom-formatting/</guid>
                    </item>
				                    <item>
                        <title>HERMS Brewery Script</title>
                        <link>https://brucontrol.com/community/scripts/herms-brewery-script/</link>
                        <pubDate>Thu, 06 May 2021 15:39:34 +0000</pubDate>
                        <description><![CDATA[Is anyone using a script to run a HERMS three kettle system?]]></description>
                        <content:encoded><![CDATA[<p>Is anyone using a script to run a HERMS three kettle system? </p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>MightyOz</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/herms-brewery-script/</guid>
                    </item>
				                    <item>
                        <title>Colors</title>
                        <link>https://brucontrol.com/community/scripts/colors/</link>
                        <pubDate>Sun, 17 Nov 2019 13:13:59 +0000</pubDate>
                        <description><![CDATA[I believe the answer is no, but wanted to double check...  Are an element&#039;s color attributes reachable by script?  For example, if I use a Global as a mechanism to display a status, can I al...]]></description>
                        <content:encoded><![CDATA[<p>I believe the answer is no, but wanted to double check...  Are an element's color attributes reachable by script?  For example, if I use a Global as a mechanism to display a status, can I alternate between a red/green background color as status conditions warrant?</p><p>Thanks!!</p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>Jason</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/colors/</guid>
                    </item>
				                    <item>
                        <title>Object ref error</title>
                        <link>https://brucontrol.com/community/scripts/object-ref-error/</link>
                        <pubDate>Tue, 29 Oct 2019 02:41:27 +0000</pubDate>
                        <description><![CDATA[Hi, I&#039;m stuck again.  I was writing a script to do a boil for an hour so I could calibrate my boil off rate.  It&#039;s my first script and it was working good until I got to the point that I wan...]]></description>
                        <content:encoded><![CDATA[<p>Hi, I'm stuck again.  I was writing a script to do a boil for an hour so I could calibrate my boil off rate.  It's my first script and it was working good until I got to the point that I wanted to do something when the temperature reached a certain point. </p><p>I borrowed from your post "Brewery Code" here in the Scripts section of this forum.  I noticed that it was hanging on my wait statement even though the condition was true.  I dumbed it down to a little test script here and it is still doing the same thing. </p><p>I have a 1-Wire temp sensor called "Boil Kettle Temp".  In my test here, I can assign it to a local variable and you can see that it properly evaluates to 202.1.  The next line down though when I'm trying to use the same thing in a wait statement like you had done in your script, it errors out with an object reference error. </p><p>Where am I going wrong?!  This is on version 1.1 Build 4. </p><p>Thank you!</p><p>Jason</p><p>A portion of your script:</p><pre>wait "Boil Temp" Value &gt;= 210
Status = "Boil"<br /><br /></pre><p> </p><p>My test script:</p><pre><br />new value testTemp<br /><br />testTemp = "Boil Kettle Temp" Value<br />wait "Boil Kettle Temp" Value &gt;= 200<br />testTemp = 0</pre>
<div id="wpfa-1582" class="wpforo-attached-file"><a class="wpforo-default-attachment" href="//brucontrol.com/wp-content/uploads/wpforo/default_attachments/1572316888-Script-3.png" target="_blank"><i class="fas fa-paperclip"></i>Script-3.png</a></div>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>Jason</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/object-ref-error/</guid>
                    </item>
				                    <item>
                        <title>Date/time manipulation in v1.1</title>
                        <link>https://brucontrol.com/community/scripts/date-time-manipulation-in-v1-1/</link>
                        <pubDate>Wed, 01 May 2019 00:32:09 +0000</pubDate>
                        <description><![CDATA[I received a couple of questions about date/time manipulation, so wanted to post up a sample that may shed some light. In this &quot;Test&quot; script example, we define a date/time variable named &#039;tr...]]></description>
                        <content:encoded><![CDATA[<p>I received a couple of questions about date/time manipulation, so wanted to post up a sample that may shed some light. In this "Test" script example, we define a date/time variable named 'trigger', assign it to a date/time, then print it (to the Output tab). We then define a time variable 'change', and make it one hour. We then define another date/time, and add the 'change' time variable to it, then print it. Finally, we compare the two date/time variables and generate a print out as a result (will always resolve to "Yes" here).</p><p>If you wanted to do a comparison to the current time, use the intrinsic 'now' variable (for example: trigger = now). Also, if you wanted to add days rather than hours, you can include days in the time variable (for example: change = 1:00:00:00).</p><p>Hopefully this sheds some light. Please let us know if you have any questions, issues, or concerns!</p><pre>new datetime trigger<br />trigger = "04-30-2019 10:00:00 PM"<br />print trigger<br /><br />new time change<br />change = 1:00:00<br />new datetime future<br />future = trigger + change<br />print future<br /><br />if future &gt; trigger<br />print "Yes"<br />else<br />print "Nope"<br />endif<br /><br />stop "Test"</pre>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>pbruno3</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/date-time-manipulation-in-v1-1/</guid>
                    </item>
				                    <item>
                        <title>Temperature Conversions</title>
                        <link>https://brucontrol.com/community/scripts/temperature-conversions/</link>
                        <pubDate>Sun, 24 Mar 2019 15:55:28 +0000</pubDate>
                        <description><![CDATA[The BC manual mentions temperature conversions (C to F and F to C) for RTD&#039;s  on page 51 but doesn&#039;t give any detail on how to do the conversion. What am I missing here? I&#039;m just trying to c...]]></description>
                        <content:encoded><![CDATA[<p>The BC manual mentions temperature conversions (C to F and F to C) for RTD's  on page 51 but doesn't give any detail on how to do the conversion. What am I missing here? I'm just trying to convert RTD input data from C to F.</p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>Piggles22</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/temperature-conversions/</guid>
                    </item>
				                    <item>
                        <title>Using Global DateTime</title>
                        <link>https://brucontrol.com/community/scripts/using-global-datetime/</link>
                        <pubDate>Sun, 10 Mar 2019 19:41:02 +0000</pubDate>
                        <description><![CDATA[I am trying to compare two Global DateTime values and the syntax I&#039;m using isn&#039;t working.Example:wait G_TimeDate value &gt;= A_StartTimeLED state = onsleep 1000goto loopThis is the err...]]></description>
                        <content:encoded><![CDATA[<p>I am trying to compare two Global DateTime values and the syntax I'm using isn't working.</p><p>Example:</p><p><br />wait G_TimeDate value &gt;= A_StartTime<br />LED state = on<br />sleep 1000<br />goto loop</p><p>This is the error i get:</p><p></p><p> </p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>dgough</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/using-global-datetime/</guid>
                    </item>
				                    <item>
                        <title>Rounding or Truncating Math Calculations</title>
                        <link>https://brucontrol.com/community/scripts/rounding-or-truncating-math-calculations/</link>
                        <pubDate>Wed, 06 Mar 2019 21:31:54 +0000</pubDate>
                        <description><![CDATA[Is there a script function or method to either round or truncate math calculations to a fixed number of digits to the right of the decimal point. For example, if I want to calculate and disp...]]></description>
                        <content:encoded><![CDATA[<p>Is there a script function or method to either round or truncate math calculations to a fixed number of digits to the right of the decimal point. For example, if I want to calculate and display my grist ratio as a variable in a workspace, I only need to see it displayed on screen to 2 or 3 decimals but it currently displays up to 12 digits to the right of the decimal point depending on the values I enter for mash volume and grain weight.</p>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>Piggles22</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/rounding-or-truncating-math-calculations/</guid>
                    </item>
				                    <item>
                        <title>&#039;For&#039; statement?</title>
                        <link>https://brucontrol.com/community/scripts/for-statement/</link>
                        <pubDate>Sun, 03 Mar 2019 13:52:17 +0000</pubDate>
                        <description><![CDATA[Is there a &#039;for&#039; statement in the scripting language?for i = 1 to 9 related - can I do something like:&quot;PID 1&quot; Kp = &quot;PID 1&quot; Kp value + .01]]></description>
                        <content:encoded><![CDATA[<p>Is there a 'for' statement in the scripting language?</p><pre>for i = 1 to 9</pre><p> </p><p>related - can I do something like:</p><pre>"PID 1" Kp = "PID 1" Kp value + .01</pre>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>clearwaterbrewer</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/for-statement/</guid>
                    </item>
				                    <item>
                        <title>multiple elements - variable power via script and pseudo A-D conversion</title>
                        <link>https://brucontrol.com/community/scripts/multiple-elements-variable-power-via-script-and-pseudo-a-d-conversion/</link>
                        <pubDate>Wed, 20 Feb 2019 20:01:33 +0000</pubDate>
                        <description><![CDATA[I would like to control power with contactors, as heat generation from SSR&#039;s for the power level I am using is excessive... 45kw5x 9kw 3-phase elements controlled by 6 contactorsC1-c4 - 9kwC...]]></description>
                        <content:encoded><![CDATA[<p>I would like to control power with contactors, as heat generation from SSR's for the power level I am using is excessive... 45kw</p><p>5x 9kw 3-phase elements controlled by 6 contactors</p><p>C1-c4 - 9kw</p><p>C5 - 6kw</p><p>C6 - 3kw</p><p>with this, I should be able to get 3,6,9,12,15,18,21,24,27,30,33,36,39,42,45kw </p><p>Control would be via an analog input on the Mega , could be potentiometer or any analog signal. Could even be a PID PWM  through an analog board back into the Arduino.</p><p> </p><p>wondering what the best approach is?</p><p>here is one idea:</p><pre><br />if "analog_0" value &lt; 15<br /> // zero power<br /> "C1" state = off<br /> "C2" state = off<br /> "C3" state = off<br /> "C4" state = off<br /> "C5" state = off<br /> "C6" state = off<br />elseif "analog_0" value &lt; 31<br /> // 3kw<br /> "C1" state = off<br /> "C2" state = off<br /> "C3" state = off<br /> "C4" state = off<br /> "C5" state = off<br /> "C6" state = on<br />...<br />...<br />...<br />elseif "analog_0" value &lt; 239<br />// 42kw<br /> "C1" state = on<br /> "C2" state = on<br /> "C3" state = on<br /> "C4" state = on<br /> "C5" state = on<br /> "C6" state = off <br />elseif "analog_0" value &gt;= 239<br /> // 45kw<br /> "C1" state = on<br /> "C2" state = on<br /> "C3" state = on<br /> "C4" state = on<br /> "C5" state = on<br /> "C6" state = on<br />endif <br />sleep 10000 // 10 seconds between power changes<br />goto PowerLoop
 </pre>]]></content:encoded>
						                            <category domain="https://brucontrol.com/community/scripts/">Scripts</category>                        <dc:creator>clearwaterbrewer</dc:creator>
                        <guid isPermaLink="true">https://brucontrol.com/community/scripts/multiple-elements-variable-power-via-script-and-pseudo-a-d-conversion/</guid>
                    </item>
							        </channel>
        </rss>
		