<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0">
<channel>
    <title>RoboRealm Forum</title>
    <link>http://www.RoboRealm.com/</link>
    <description>The newest forum threads.</description>
    <lastBuildDate>Tue, 30 Nov 1999 00:11:00 EST</lastBuildDate>
    <language>en-us</language>
    <copyright>Copyright: (C) RoboRealm, http://www.RoboRealm.com/</copyright>
    <docs>http://www.RoboRealm.com/</docs>

    <item>
        <title>No Title</title>
        <description>
        Martin,&lt;br&gt;&lt;br&gt;You may have better luck trying the CScript module as VBScript does not have really easy bit operations. Still, I think you can try&lt;br&gt;&lt;br&gt;Hi = CInt(GetVariable(&quot;COG_X&quot;) / 256 )&lt;br&gt;Lo = GetVariable(&quot;COG_X&quot;) AND 255 &lt;br&gt;&lt;br&gt;COG_X_HI = Hi &lt;br&gt;COG_X_LO = Lo &lt;br&gt;COG_X_10 = (Lo * 256) + Hi &lt;br&gt;&lt;br&gt;SetVariable&quot;COG_X_HI&quot;, COG_X_HI &lt;br&gt;SetVariable&quot;COG_X_LO&quot;, COG_X_LO &lt;br&gt;SetVariable&quot;COG_X_10&quot;, COG_X_10 &lt;br&gt;&lt;br&gt;which is a bit different from yours since I figured you are wanting to switch endian (ie swap the bytes) in the number and your&apos;s just regenerated the same number. Specifically the COG_X_10 was swapped around.&lt;br&gt;&lt;br&gt;Note, if you plan to use this is the serial module to send it somewhere you can switch the \\ to / and that switches the transmitted endian at least in the serial module.&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=5006</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=5006</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>merge variables</title>
        <description>
        Hello I need to merge two 8 bit values to a 16 bit value.&lt;br&gt;The line&amp;gt; COG_X_10 = Lo | Hi&amp;lt;&amp;lt;8 gives an error.&lt;br&gt;&lt;br&gt;My code is:&lt;br&gt;Hi = GetVariable(&quot;COG_X&quot;)/256&lt;br&gt;Lo = GetVariable(&quot;COG_X&quot;)&lt;br&gt;COG_X_HI = Hi&lt;br&gt;COG_X_LO = Lo&lt;br&gt;COG_X_10 = Lo | Hi&amp;lt;&amp;lt;8&lt;br&gt;&lt;br&gt;SetVariable&quot;COG_X_HI&quot;, COG_X_HI&lt;br&gt;SetVariable&quot;COG_X_LO&quot;, COG_X_LO&lt;br&gt;SetVariable&quot;COG_X_10&quot;, COG_X_10&lt;br&gt;&lt;br&gt;Thanks Martin        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=5006</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=5006</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
