<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=390&stc=1">
Well i guess you could fix about everything by reading the actual motor position and tell him to go to the readed position.
well to make it more clear... here's a snip of the idea
it's an idea. Let us know!Code:MAIN: IF (UP = 0) AND (DOWN=1) THEN serout FM, T9600 ,["W01 01 200", CR, LF] 'Write velocity limit value serout FM,T9600,["P01 270000", CR, LF] 'Send MOVETO_ABSOLUTE command ENDIF IF (DOWN = 0) AND (UP = 1) THEN serout FM, T9600 ,["W01 01 200", CR, LF] 'Write velocity limit value serout FM,T9600,["P01 0", CR, LF] 'Send MOVETO_ABSOLUTE command ENDIF if (DOWN = 1) AND (UP = 1) then ' SERIN motor position ' SEROUT motor position to make him stop endif goto MAIN End




Bookmarks