Well i this could be as easy as..
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 ' <=== Switch is in central POS
LOW Break_Pin
endif
goto MAIN
End
Just connect a PIC i/o directly to the controller BREAK pin... this have to work... i guess.
or if you feel to add extra parts...
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=392&stc=1">
Both should work now!
Bookmarks