BASIC commands
PROGRAMMING MANUAL
151
R
e
vi
si
o
n
1
.0
3.2.200 MOVETANG
/i
Type
Axis command
Syntax
MOVETANG(absolute_position [,link_axis])
Description
In many X-Y plotting systems, there is a need to keep the stylus oriented in
the direction of travel. Each combination of speeds in X and Y results in a
Vector value which needs to be fed to a third axis controlling the rotation of
the stylus.
Examples of machines that require such a control are; glass cutting, knife
blades, powered jig-saws and “pizza wheels”.
MOVETANG
Moves the axis to the required position using the programmed
SPEED
,
ACCEL
and
DECEL
for the axis. The direction of movement is
determined by a calculation of the shortest path to the position assuming that
the axis is rotating and that
REP_DIST
has been set to PI radians (180
degrees) and that
REP_OPTION
=0.
IMPORTANT: The
REP_DIST
value will depend on the
UNITS
value and the
number of steps representing PI radians. For example if the rotary axis has
4000 pulses/turn and
UNITS
=1 the
REP_DIST
value would be 2000.
If a
MOVETANG
command is running and another
MOVETANG
is executed
for the same axis, the original command will not stop, but the endpoint will
become the new absolute position.
Arguments
•
absolute_position
The absolute position to be set as the endpoint of the move. Value must
be within the range -PI to +PI in the units of the rotary axis. For example
if the rotary axis has 4000 pulses/turn, the
UNITS
value=1 and the angle
required is PI/2 (90 deg) the position value would be 1000.
•
link_axis
An optional link axis may be specified. When a link_axis is specified the
system software calculates the absolute position required each servo
cycle based on the link axis
TANG_DIRECTION
. The
TANG_DIRECTION
is multiplied by the
REP_DIST
/PI to calculate the
required position. Note that when using a link_axis the absolute_position
parameter becomes unused. The position is copied every servo cycle
until the
MOVETANG
is
CANCEL
led
Example
An X-Y positioning system has a stylus which must be turned so that it is fac-
ing in the same direction as it is travelling at all times. The XY axis pair are
axes 4 and 5. The tangential stylus axis is 2:
BASE(0,1)
WHILE TRUE
angle=TANG_DIRECTION
MOVETANG(angle) AXIS(2)
WA(1)
WEND
Or:
Using the
link_axis
parameter load a
MOVETANG
which remains
running to automatically update the stylus position. The XY axis
pair are axes 4 and 5. The tangential stylus axis is 2:
MOVETANG(0,4) AXIS(2)
See also
TANG_DIRECTION