SIXpack 2 – Manual (V1.10 / January 29
th
, 2010)
33
6.6.5
Starting linear interpolation of multiple axis
A linear interpolated movement of different axis is possible with the command
StartInterpolation
(CMD $50). All
motors reach the target at the same time. The target has to be set previously at motor standstill with the
command
SetTargetPosition
(CMD $24).
The axis with the longest distance, i.e. the longest movement time at maximum velocity, is the leading axis. The
velocities of the other axis rely on this leading axis. A small inhomogeneity may occur, nevertheless. Therefore the
status of all moved motors should be checked before the next command.
Example:
In Figure 6.6 (right) a linear interpolated ramp run is demonstrated. Motor 1 has a longer distance to
move than motor 2. Therefore Motor 1 is accelerated to the velocity defined in
VMax
. For motor 2 a lower
maximum velocity has been calculated. Both motors reach their target simultaneously. The longer the distance the
lower is the acceleration compared to the other motors. Please refer to chapter 7.5.
v(t)
t
VMax
(Motor 2)
VStart
(Motor 2)
Motor 2
v(t)
VMax
(Motor 1)
VStart
(Motor 1)
Motor 1
t
v(t)
t
VMax
(Motor 2)
VStart
(Motor 2)
Motor 2
v(t)
VMax
(Motor 1)
VStart
(Motor 1)
Motor 1
t
Figure 6.6: Synchronous start of motors (left) and Linear interpolated ramp (right)
6.6.6
Configuration for rotating movements
The SIXpack 2 differentiates between linear and rotating movements. The active mode is defined by the flag
MT_ROTARY (command
SetMotorParameters
, CMD $24).
Most important is the interpretation and definition of the positioning values. In linear mode the difference
between actual and target position is interpreted as absolute value for the micro steps to run. Target positions
may be out of the value range defined by
Poslimit
.
The value range is strictly limited by the value of
Poslimit
. Positions above this value are adjusted with a
modulo operator to a multiple value. The flag MT_NULLLEFT (command
SetMotorParameters
) defines in rotating
mode if the positioning values are in positive or negative area:
MT_NULLLEFT = 0:
0 ≤ position value <
Poslimit
MT_NULLLEFT = 1:
- (
Poslimit ) <
position value ≤ 0
The direction of the motors rotation is in standard configuration identical to the linear mode. Movements with
rising coordinates lead to clockwise rotation and with falling coordinates to counter clockwise rotation.
If the flag MT_OPTIMIZEWAY = 1 (command
SetMotorParameters
) is set the SIXpack 2 chooses the shortest way to
get to the target position from the starting position.