{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern\fprq1 Swiss;}{\f3\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green240\blue240;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f3\fs20\cf3 'This pogram gives motor response similar to a mouse pointer \par 'does in Windows. \par 'The faster you move the encoder, the highr the velocity. \par 'The slower you move it, the slower the velocity. \par 'Unlike Mode Follow where you follow an encoder directly \par 'at some gear ratio, this will allow a move that is essentially accelerated \par ' by how you move the encoder. \par 'As a result, a short move done slowly produces a short distance change on the shaft. \par ' A short move done quikly produces a long move on the shaft. \par 'It os good for manual jog of an axis via track-ball input \par 'where the track ball has a low line count output but you need \par 'faster control allong woth very fine micro control. \par 'Ideal application is a microscope inspection table. \par \par 'Setting up some variables \par s=1000\tab 'Speed multiplier \par w=100\tab \tab 'time between data samples \par \par 'Set up some starting accel and velocity \par A=1000 \par V=0 \par \par 'Set motor to Velocity mode \par MV \par G \par \par \plain\f3\fs20\cf2 WHILE\plain\f3\fs20\cf3 1 \par \pard\li720\plain\f3\fs20\cf3 a=CTR\tab \tab 'Set "a" to value of external encoder \par WAIT=w\tab 'wait "w" clock ticks \par b=CTR\tab \tab 'set b to external encoder \par v=a-b\tab \tab 'getting difference in change \par V=v*s\tab \tab 'and multipling it times a number \par G\tab \tab 'go at that speed \par \pard\plain\f3\fs20\cf2 LOOP\plain\f3\fs20\cf3 \par \par END \par \plain\f2\fs26\cf3 \par }