rem Demonstrating the usage of the status of the Y-motor
rem This program makes the Y-motor to move back and forth
rem Commands demonstrated; vely, accy, posy, movay, rem, wait, goto, rstsy, ry
rem Set the velocity
vely 2000
rem Set the acceleration
accy 20000
200
rem Set the position to move to
posy 5000
rem Start the absolute move
movay
rem Wait until the move is completed
100
ry
wait 250
rstsy A
if (A & 1) = 1 then goto 100
ry
rem Wait for 250 msec
wait 250
rem Set the position to move to
posy 0
rem Start the absolute move
movay
rem Wait until the move is completed
150
ry
wait 250
rstsy A
if (A & 1) = 1 then goto 150
ry
rem Wait for 250 msec
wait 250
rem Start all over again
goto 200
end
$
Copyright © 2002, 2003, 2004, 2005, 2006 Optimal Engineering Systems, Inc.