5-54 WORKING WITH THE CONTROL UNIT
SB1391 Hardware and Setup Guide - Document revision no. 1.14
5.4.5. Manual Control Using a Joystick
Attach a joystick to the analog input.
Command mnemonic Meaning Effect of command
1.
SXMO1<cr>
S
et X axis Motor
enable to 1
Enable the amplifier.
2.
SXMM21<cr>
S
et X axis Motion
M
ode to 21
Change to manual joystick
control (motion mode 21).
3.
BX<cr>
B
egin X axis Send a Begin command. The
motor is moving at a speed
which is relative to the analog
input and the value of XLV
4.
SXLV50000<cr>
S
et X
axis L
inear
V
elocity 50000
Now move the joystick. The
control unit generates velocity
commands that are directly
related to the analog voltage
output of the joystick
potentiometer and the value of
LV. The maximum velocity is
the value of LV.
5.
SXLV10000<cr>
S
et X axis Linear
V
elocity 10000
If the motor runs too fast, then to
achieve better position control
with higher resolution, decrease
the value of LV to a lower value,
say 10,000 counts/sec. Do not
make this change when the
motor is moving. Doing so
could cause the motor to jump.
6.
EX<cr>
E
nd X axis Terminate the move by an End
command.
This "smart joystick's" speed can be adapted to the needs of the application. ACSPL
programming, (introduced in the next section), can be used to write a simple program that
switches from high speed (for long travel) to low speed, with better position resolution and
control, when a switch on one of the inputs is pressed.
In order to prevent axis movement around the stationary point of the joystick, a dead band can be
defined via the L
ower Threshold (LT) and Upper Threshold (UT) parameters. For more
information about these parameters, see Chapter 6, "Reference" in the ACSPL Software Guide.