Download ManualV3 - Electromate

Transcript
Application Example: Joystick Control
Read the voltage of an X-Y joystick and drive the motors at proportional velocities.
10 Volts = 3000 rpm = 200,000 count/s
Speed/Analog Input = 200000/10=20000
Instruction
Interpretation
#JOYS
JG 0,0
BG XY
#LOOP
VX=@AN[1]*20000
VY=@AN[2]*20000
JG VX, VY
JP #LOOP
EN
Label
Set in Jog Mode
Start motion
Define subroutine
Read joystick and compute speed X
Read joystick and compute speed Y
Change speeds
Jump to subroutine
End program
135
ELECTROMATE INDUSTRIAL SALES LTD.
TOLL FREE PHONE (877) SERVO98 • TOLL FREE FAX (877) SERVO99
[email protected] • WWW.ELECTROMATE.COM