➄
Basic 6250 Features
67
To establish the velocity resolution, you must define the full-scale velocity and the usable
voltage.
Define Full-
Scale
Velocity
You must define the full-scale velocity for your application with the
JOYVH
and
JOYVL
commands. Both commands establish the maximum velocity that can be obtained by
deflecting the potentiometer fully CW or fully CCW. The
JOYVH
command establishes the
high velocity range (selected if the joystick select input is high—sinking current). The
JOYVL
command establishes the low velocity range (selected if the joystick select input is
low—not sinking current).
The
JOYAXL
and
JOYAXH
commands define which analog channels are to be used with which
joystick axes when the joystick select input is low or high, respectively.
Define
Usable
Voltage
Use the commands described in the following table to establish the joystick's usable velocity
range.
The analog-to-digital converter is an 8-bit converter with a voltage range of 0.0V to 2.5V.
With 8 bits to represent this range, there are 256 distinct voltage levels from 0.0V to 2.5V. 1
bit represents 2.5/256 or 0.00976 volts/bit.
Command
Name
Purpose
JOYEDB
End Deadband
This command defines voltage levels (shy of the 0.0V and 2.5V endpoints)
at which maximum velocity occurs. Specifying an end deadband effectively
decreases the voltage range of the analog input to compensate for joysticks
that cannot reach the 0.0V and 2.5V endpoints.
JOYCTR
(or
JOYZ
)
Center
Voltage*
This command defines the voltage level for the center of the analog input
range (the point at which zero velocity will result). As an alternative, you
can use the
JOYZ
command, which reads the current voltage on the
joystick input and considers it the center voltage. You can check the center
voltage by typing in
JOYCTR
[cr].**
JOYCDB
Center
Deadband
This command defines the voltage range on each side of the center voltage
in which no motion will occur (allows for minor drift or variation in the
joystick center position without causing motion).
*
Because the center voltage can be set to a value other than the exact center of the potentiometer's voltage
range, and because there could be two different velocity resolutions, the CW velocity resolution may be
different than CCW velocity resolution.
** Because of finite voltage increments, the 6250 will not report back exactly what you specified with the
JOYCTR
command.
Joystick
Control
Inputs
The table below lists the 6250's four joystick control inputs and their active levels and what
the active levels affect.
Joystick Input Bit
Active Level
Effect of Active Level
Axis select
Ø
Selects
JOYAXL
1
Selects
JOYAXH
Velocity select
Ø
Selects
JOYVL
1
Selects
JOYVH
Joystick release
Ø
Exit Joystick Mode (equiv. to
JOYØØ
command). To use the joystick
again, issue the
JOY11
command.
1
Stay in Joystick Mode
Joystick trigger
(general purpose)
Ø or 1
Interpreted by user program (status is reported with the
TINO
and
INO
commands)
Joystick auxiliary
(general purpose)
Ø or 1
Interpreted by user program (status is reported with the
TINO
and
INO
commands)
Typical
Applications
A typical joystick application is two-axis, in which a high velocity range is required to move to
a region, then a low velocity range is required for a fine search. After the search is completed it
is necessary to record the motor positions, then move to the next region. The joystick trigger
input can be used to indicate that the position should be read. The joystick release is used to
exit the joystick mode and continue with the motion program.
Joystick Set
Up Example
The following table describes the requirements of the application described above, and how the
6250 is configured to satisfy those requirements. The resulting joystick voltage configuration is
illustrated below. Given: one analog input channel is used for each axis.
Requirement
Configuration
Set max. high-range velocity to 5 rps (on both axes)
Type in the
JOYVH5,5
command
Set max. low-range velocity to 1 rps (on both axes)
Type in the
JOYVL1,1
command