<?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>Thanks</title>
        <description>
        That seems to be working. I have uploaded my modified code below.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=1129</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=1129</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Ok, so the math would be something like:&lt;br&gt;&lt;br&gt;servoMax = 200&lt;br&gt;servoMin = 50&lt;br&gt;pixelMax = 160&lt;br&gt;pixelMin = 20&lt;br&gt;&lt;br&gt;scaleFactor = (servoMax-servoMin)/(pixelMax-pixelMin)&lt;br&gt;&lt;br&gt;SetVariable &quot;servo_pos&quot;, CInt((GetVariable(&quot;cog_x&quot;) - pixelMin) * scaleFactor) + servoMin&lt;br&gt;&lt;br&gt;which would create the scaleFactor you are talking about and would then scale the cog_x (as an example variable) that is in pixel space to servo space.&lt;br&gt;&lt;br&gt;Was that what you were thinking about? Note that the above should execute in the VBScript module.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=1129</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=1129</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Variable MAth</title>
        <description>
        Well, the end result would be a ratio of pixels to servo position. The range is the same as in my laser and circle detection posts. I would hard-code the values for the boundaries of the box, and similarly for the servo max values. For Example: The maximum X Pixel Value is 160, and the maximum x Servo value is 200. The minimum X values are Pixel: 20 Serov0:50. What I would like to do is subtract the min. servo X from the Max servo X, and do the same for the pixels. Then I could divide the pixel difference by the servo difference, and I would end up with a number that I could multiply by a pixel value to get a servo value. &lt;br&gt;&lt;br&gt;Sorry if that is confusing, I hope you catch my drift.         </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=1129</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=1129</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I&apos;m not sure what you would expect the result to be? Would it not be &quot;&quot;? Or are you trying to remove a substring from one variable to the next? Perhaps if you describe what you are trying to do we can provide the needed script.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=1129</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=1129</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Variable Math</title>
        <description>
        Can I do var = &quot;var&quot;-&quot;var&quot; in vbscript? I cannot figure out how to do this, but maybe I&apos;m just missing it.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=1129</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=1129</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
