BackHomeContact Us


rem Using quadrature-2 decoder

rem This program makes the Y-motor to move back and forth
rem Commands demonstrated; vely, accy, posy, movay, rem, wait, goto, rquad2
rem The Y-motor quadrature encoder should be connected to the quadrature encoder of
rem input of the controller. Please consult the Hardware Reference Manual.

rem Set the velocity
vely 2000

rem Set the acceleration
accy 20000

rem Set quadrature decoder to 0
squad2 0

200
rem Set the position to move to
posy 5000

rem Start the absolute move
movay

rem Wait until the move is completed
doney?

rem Wait for 250 msec
wait 250

rem Read quadrature decoder-2
rquad2 A
print "Quad-2 = ", A

rem Set the position to move to
posy 0

rem Start the absolute move
movay

rem Wait until the move is completed
doney?

rem Wait for 250 msec
wait 250

rem Read quadrature decoder-2
rquad2 A
print "Quad-2 = ", A

rem Start all over again
goto 200
end
$

 


 

www.OESIncorp.com

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