rem Demonstration of usage of variables
rem This program makes the X-motor to move back and forth
rem Commands demonstrated; velx, accx, posx, movax, rem, wait, goto
A = 2000
B = 20000
C = 5000
T = 250
rem Set the velocity
velx A
rem Set the acceleration
accx B
200
rem Set the position to move to
posx C
rem Start the absolute move
movax
rem Wait until the move is completed
donex?
rem Wait for T msec
wait T
print "X = ", X
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 T msec
wait T
print "X = ", X
rem Start all over again
goto 200
end
$
Copyright © 2002, 2003, 2004, 2005, 2006 Optimal Engineering Systems, Inc.