BackHomeContact Us

 

rem Demonstrating the conditional execution of a program based on a logical statement
rem This program makes the X-motor to move back and forth
rem Commands demonstrated; velx, accx, posx, movax, rem, wait, goto. if...then...else

rem Set the velocity
velx 2000

rem Set the acceleration
accx 20000

200
I = I + 1
rem Set the position to move to
posx 5000

rem Start the absolute move
movax

rem Wait until the move is completed
donex?

rem Wait for 250 msec
wait 250

rem Set the position to move to
posx 0

rem Start the absolute move
movax

rem Wait until the move is completed
donex?

rem Wait for 250 msec
wait 250

rem Start all over again
if I < 5 then goto 200 else end
end
$


 

www.OESIncorp.com

Copyright ©  2002, 2003, 2004, 2005, 2006 Optimal Engineering Systems, Inc.