<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Binary to multistate meta point]]></title><description><![CDATA[<p dir="auto">I would like to use a binary and a numeric as context points in a multistate meta point.<br />
My problem is with the binary context point. The statement if(n.value==1.0) works for the numeric point but if(b.value==true) does not work for the binary.<br />
I have tried different combinations of true, false, 1, 0, 1.0. 0.0 with no change.<br />
Writing “return k” and clicking the Validate Script button yields the message Success. result=true but using if(k.value==true) does not work.</p>
<pre><code>
// multistate meta point
// k = fanRelay (binary)
// p = fanProof (numeric)
var s = 0

if(k.value==true) {
    if(p.value==1.0) {
        s = 1;
    }
    else {
        s = 2;
    }
}

</code></pre>
]]></description><link>https://forum.mango-os.com/topic/1006/binary-to-multistate-meta-point</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 12:22:17 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1006.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 13 May 2012 01:13:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Binary to multistate meta point on Mon, 21 May 2012 04:53:39 GMT]]></title><description><![CDATA[<p dir="auto">As i said, it works for me. What version are you using?</p>
]]></description><link>https://forum.mango-os.com/post/6378</link><guid isPermaLink="true">https://forum.mango-os.com/post/6378</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 21 May 2012 04:53:39 GMT</pubDate></item><item><title><![CDATA[Reply to Binary to multistate meta point on Sun, 20 May 2012 05:57:58 GMT]]></title><description><![CDATA[<p dir="auto">I installed ScadaBR alongside Mango M2M on my server and the bug does not exist in ScadaBR.</p>
<p dir="auto">ScadaBR works correctly.</p>
<p dir="auto">I still cannot use binary context points in Mango.</p>
<pre><code>return binaryPoint.value; fails on my fresh Mango install.
</code></pre>
]]></description><link>https://forum.mango-os.com/post/6377</link><guid isPermaLink="true">https://forum.mango-os.com/post/6377</guid><dc:creator><![CDATA[matthew.sellars]]></dc:creator><pubDate>Sun, 20 May 2012 05:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to Binary to multistate meta point on Mon, 14 May 2012 20:38:02 GMT]]></title><description><![CDATA[<p dir="auto">I have been experimenting with Virtual data points as banging the fan on and off was slow.<br />
If I switch the context variables in this meta point it will work.<br />
Changing the state of the binary variable has no effect.</p>
<p dir="auto">Attachment: <a href="http://archive.infiniteautomation.com/forum/posts/downloadAttach/144.page" rel="nofollow ugc">download link</a></p>
]]></description><link>https://forum.mango-os.com/post/6370</link><guid isPermaLink="true">https://forum.mango-os.com/post/6370</guid><dc:creator><![CDATA[matthew.sellars]]></dc:creator><pubDate>Mon, 14 May 2012 20:38:02 GMT</pubDate></item><item><title><![CDATA[Reply to Binary to multistate meta point on Mon, 14 May 2012 17:30:26 GMT]]></title><description><![CDATA[<p dir="auto">Works for me. In fact, both of these do:</p>
<pre><code>if (b.value == true)
</code></pre>
<p dir="auto">... and:</p>
<pre><code>if (b.value)
</code></pre>
]]></description><link>https://forum.mango-os.com/post/6366</link><guid isPermaLink="true">https://forum.mango-os.com/post/6366</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 14 May 2012 17:30:26 GMT</pubDate></item></channel></rss>