<?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[Virtual data source, binary tags into word]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">i needed to manipulate some binary data within the scada that is then encoded into the word...</p>
<p dir="auto">i.e.</p>
<p dir="auto">b0-b15 -&gt; w0</p>
<p dir="auto">so i created a virtual data source, added some binary tags...</p>
<p dir="auto">then created a meta source word, added the b0-bx as context variables and then did...</p>
<p dir="auto">value=0;<br />
if (b0.value==1) value=value+1;<br />
if (b1.value==1) value=value+2;<br />
if (b2.value==1) value=value+4;<br />
if (b3.value==1) value=value+8;<br />
return value;<br />
word.value=value;</p>
<p dir="auto">this gave my word value...</p>
<p dir="auto">then i did a point link between meta source word and real slave device word...</p>
<p dir="auto">could i have done this in a more economical way?</p>
<p dir="auto">i did try adding the slave device word with direct binary tags, but it dint like that...</p>
<p dir="auto">but was quite happy with word to word control</p>
<p dir="auto">thanks</p>
<p dir="auto">Nei</p>
]]></description><link>https://forum.mango-os.com/topic/610/virtual-data-source-binary-tags-into-word</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 06:05:13 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/610.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 31 Oct 2010 21:12:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Virtual data source, binary tags into word on Sat, 06 Nov 2010 02:21:22 GMT]]></title><description><![CDATA[<p dir="auto">I can't think of a better way to get it to work. Looks good to me.</p>
]]></description><link>https://forum.mango-os.com/post/4857</link><guid isPermaLink="true">https://forum.mango-os.com/post/4857</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Sat, 06 Nov 2010 02:21:22 GMT</pubDate></item></channel></rss>