22
phase. For example if the profile mode is S-curve, and a
SMOOTH_STOP command is given, the profile will decelerate in a
manner exactly equal and opposite to the acceleration phase.
The STOP command functions in all profile modes; S-curve point-
to-point, Trajectory point-to-point, Velocity Contouring, and
Electronic Gear.
The SMOOTH_STOP functions in S-curve point-to-point,
Trajectory point-to-point, and Velocity Contouring profiling mode.
It does not function in Electronic Gear mode.
Caution should be exercised when using the STOP command due
to the large and abrupt changes in motion that may occur.
Motion Complete Status
To simplify the programmng of a complete motion systemit is
convenient to have the motion chipset indicate when a particular profile
move has been completed.
This function is provided by two status bits in the chipset's status word
(See the section of this manual entitled "Axis Status " for more
information on the axis status word). These two bits are called the
motion complete bit, and the in-motion bit.
The motion complete bit is controlled interactively by the chipset and
the host. After a motion has completed, the chipset sets the motion
complete bit on. The host may then poll this bit to determne that motion
is complete, or if desired, the host can programthe chipset to
automatically signal when the motion is complete (using an interrupt). In
either case once the host has recognized that the motion has been
completed the host clears the motion complete bit, enabling the bit to
indicate the end of motion for the next move.
The following list shows the conditions that will cause the motion
complete bit to occur:
-
Profile has reached the destination position (point-to-point
profile modes only)
Axis trajectory reaches a velocity of zero and the current
velocity command is zero
SMOOTH_STOP command is given and axis trajectory
reaches a velocity of zero
STOP command is given
Limt switch condition occurs
-
-
-
-
The in-motion bit is simlar to the motion complete bit except that it
continuously indicates the status of the axis without interaction with the
host. In addition this bit is used exclusively for polled mode operations.
It can not cause an interrupt to the host to be generated.
The motion complete and the in-motion indicator bits function in
the S-curve point-to-point, Trapezoidal point-to-point, and Velocity
Contouring profile modes only. They do not function when the
profile mode is set to electronic gearing.
The motion complete and in-motion bits indicate the state of the
trajectory generator, not the actual motor. Even if the trajectory
generator has completed a motion, the actual axis position may or
may not be at rest depending on servo lag, stability, and other
system conditions.
Digital Servo Filtering
A digital filter is available for use in calculating a motor output signal.
The filter used is a PID (proportional, integral, derivative) filter, along
with a velocity feedforward termand a termto adjust the offset, also
called the DC bias value. This filter type is known as a PID+Vff filter.
This filter uses programmable gain values which can be tuned to
provide excellent control accuracy and stability over a large range of
systems.
The following schematic diagramshows the computational flow for the
PID+Vff digital filter.
Proportional Term
P = En *Kp
Actual Position
FromEncoder
Target
Position
Integral Term
I = (S+En)*Ki
S = S+En
Derivative Term
D = (En-E(n-1))*Kd
Target
Velocity
+-
+
++
+
Output
To Motor
Kvff
Bias
+
In the PID+Vff filter, the host-specified parameters are:
Symbol
Kp
Ki
Kd
Ilim
Kvff
Name
Proportional Gain
Integral Gain
Derivative Gain
Integration Limt
Velocity Feedforward
gain
DC motor offset
Representation & Range
unsigned 16 bits (0 to 32767)
unsigned 16 bits (0 to 32767)
unsigned 16 bits (0 to 32767)
unsigned 16 bits (0 to 32767)
unsigned 16 bits (0 to 32767)
MtrBias
signed 16 bits (-32767 to 32767)
The PID+Vff filter is calculated as follows:
Position Errorn = En = TPn - APn
Outputn = En*Kp + (En-En-1)*Kd + Int(En)*Ki/256 + TrgtVel*Kvff/4
+ MtrBias