|
|
The previous chapter offered an overview of characteristics to consider
when selecting an amplifier or motor driver. The number and type of
connections from the PMD device to the motor amplifier will vary according
to which PMD device you are using and what type of signal your amplifier
is expecting. This is because different electrical properties are needed
to run different motor types.
Even within the same motor type, the properties of the electrical
signal to the amplifier can be different. The other portion of the motor
interface is motor feedback to the PMD device. In open-loop applications
like step and micro-step motors, feedback is not necessary and is very
often not used. However when running a closed-loop servo application,
the feedback signal (usually position) is a requirement. In a servo
application, the feedback signal and the reference signal are combined
to create an error signal that is the input to the PID filter. Please
reference the next chapter for a detailed description of the PID filter.
5.1 Brushed Motor Interface
A brushed motor application involves the fewest connections and the
complexity of the signal properties is also reduced. This is realized
by the fact that the brushed motor amplifier is not responsible for
the commutation of the motor. As a result of the electrical contact
brushes that are present, a brushed motor has the ability to mechanically
commutate itself. If we ignore what is happening inside the brushed
motor we can jump to the assumption that there is only one current path
to and from the motor. The magnitude of the current in that single path
is proportional to the
amount of torque produced by the motor and the direction of the current
in the path determines the direction of the torque. This concept is
described in the previous chapter.
Figure 5.1 demonstrates the use of a National Semiconductor® LMD18200
H-Bridge with an MC2140. This interface can be used with the MC2100,
MC2800, MC3110, MC58110 and the MC58x20. The LMD18200 is a very common
“voltage” control brushed motor driver. The LMD18200 can
be driven with 3.3V CMOS or 5V CMOS output. For clarity only one complete
motor/encoder connection scheme has been shown. Connections from the
other motors and encoders would be done is the same fashion.
In the following schematic, a magnitude and direction PWM signal is
used in order to drive a DC brushed motor with a nominal 24V, 2A drive.
There are two methods in which the output current of the H-bridge may
be controlled. One method optimizes the current for mechanical bandwidth
(large accelerations and decelerations), while the other method optimizes
the current for smoothness of motion.
First, in the locked antiphase control mode (see the LMD18200 datasheet),
a 50/50 PWM signal is applied to the LMD18200 DIR input, while the PWM
input is tied high. The current ripple in this mode is relatively high,
as the circulating currents are quickly decaying. Second, in the sign/magnitude
control mode, sign and magnitude PWM signals are applied to both the
PWM and DIR inputs of the LMD18200. In this mode, the resultant current
ripple is lower. Thisresults in a smoother operation of the motor. When
the acceleration/deceleration requirements for
the motor are not too high, the sign/magnitude PWM control mode is preferred.
The LMD18200 is equipped with an internal over-current circuit, which
is tuned to a 10A threshold. External over-current circuitry may be
added for currents with a lower threshold by using the sense output.
This circuitry is not shown. Pin 7 (Vsense) of the LMD18200 is a signal
that may be used in order to sense the amount of current flowing through
the motor windings. The sense output of the LMD18200 samples only a
fraction of the drive current, with a typical 377µA sensing per
1A driving current. For a nominal 2A driving current, an Rsense = 400O
power resistor may be used with the external circuitry in order to generate
another external signal to stop the driver. The stop signal sources
both outputs. This is the recommended braking method, as the braking
current goes through the upper pair of DMOS, which are connected to
the internal over-current circuitry (see the LMD18200 datasheet).
A connection to a differential encoder is shown in Figure 5.1. Note
the use of a Differential Line Receiver. The output of the Receiver
is TTL that can be directly connected to the IO. In the case of a Pilot
or Single Axis Magellan this would be a direct connection to the CP
device. Since the output is not differential, the receiver should be
physically placed away from the motor and driver, which are significant
sources of EMI. The pull-up and pull-down resistors guard against bouncing
in case any of the encoder lines break. The quadrature encoder inputs
on a Magellan processor are not 5V tolerant, therefore the voltage supply
to a differential receiver used on a Magellan design should be 3.3V.
Single-ended encoders can also be used but are not recommended by
PMD because of the lack of noise immunity. If a single-ended encoder
is to be used the developer should take precautions against noise by
adding filters to the encoder line and minimizing the length of the
wire and traces associated with the encoder signals.
The value of the Motor Voltage is specific to the motor and amplifier
being used. Common values range from 12-48 V. The PMD chipset does not
“see” this voltage, so the chipset does not place any restrictions
on this value.
The Index signal from the encoder is not necessary. However many of
PMD’s customers find it useful, in conjunction with the “High
Speed Capture” feature, for high accuracy homing routines. The
PMD device shown in Figure 5.1 is a Navigator IO chip. In the Navigator
product family all connections to PWM drivers and encoders are from
the IO chip. This is also the case for the 2-IC Magellans. The Pilot
product family and single-axis Magellans do not have an IO chip in which
case all connection are made to the CP chip. The pin labels for these
connections remain the same (i.e. PWMMAG, PWMSIGN, QUADA, QUADB).

Click to Enlarge
It is also common to interface a brushed motor driver with an Analog
motor command. As mentioned in Chapter 4, a decision between an IC driver
or an off-the-shelf amp must be made. In the case of the off-the-shelf
amp, the analog motor command is more commonly used. The PMD device
does not provide the analog signal directly. When the output mode of
the PMD device is set to DAC, a value that represents the motor command
for that servo cycle will be asserted on the data bus. At the same time
0x400X will be asserted on the Address bus. The value of the last nibble
of the address value is specific to which axis the analog motor command
is intended for. The developer is responsible for providing a DAC to
convert the 16-bit word when address 0x400X is asserted. For more information
please refer the Peripheral Interfacing section of the User’s
Guide. The encoder interface remains the same when using the PWMSign/Mag
output mode.
5.2 Brushless Motor Interface
Use of a permanent magnet brushless motor increases the complexity
of the hardware requirements, however the benefits include improved
efficiency, response, and life span. All brushless motors need to be
commutated electronically. The MC2300, MC2800, MC3310, and MC58000 all
provide the necessary commutation functionality. If the reader is unfamiliar
with commutation they may wish to seek further explanation elsewhere,
however a complete understanding of commutation is not required. All
of the brushless motors mentioned in this document have three phases,
some with and some without Hall effect sensors.
Processing of the three Hall Effect sensor signals provides low-resolution
information on the current angular relationship between the stator and
the rotor. When available, this information is used to determine the
appropriate phase of the motor command signal sent from PMD’s
internal commutation mechanism. The PMD device allows for two different
methods of closed-loop commutation, Hall-based or sinusoidal. (Reference
the SetCommutationMode command) The Hallbased method is synonymous with
“six-step” or “trapezoidal” commutation. In
this method, the Hall Effect sensor signals are used to calculate the
phase angle for the motor command. When using the sinusoidal commutation
mode, if Hall Effect sensors are present, they are only used until a
Hall Effect sensor transition occurs; from then on the encoder feedback
is used to determine the phase angle. The feedback from an encoder will
provide higher resolution than the Hall Effect sensors for the purpose
of determining the current commutation angle of a motor. This is because
typical Hall Effect sensors only have an angular precision of 60 degrees.
In low and medium speed applications the sinusoidal commutation will
always provide smoother motion. As the desired angular speed (RPM) approaches
the commutation rate, the benefits of the increased resolution disappear
and sinusoidal commutation begins to look identical to trapezoidal commutation.
Chapter 7 provides an extensive discussion specific to Hall Effect sensor
configuration.
As mentioned above, the encoder signal can be used for commutation
phase calculations. When this is the case the PMD device must be provided
with the number of encoder counts to expect during one electrical cycle.
The developer must use the SetPhaseCounts command to provide this information
to the PMD device. Encoder based commutation permits servo control of
brushless motors that do not have Hall effect sensors. Since quadrature
encoders do not provide an absolute position, the phase offset is not
known initially. When utilizing the non-Hall Effect sensor method, the
PMD device must execute a specific initialization procedure in order
to determine the phase offset. The developer should specify the initialization
procedure by using the SetPhaseInitialization command. When Hall Effect
sensors are not present the Algorithmic phase initialization method
should be chosen. When this method is selected and the PMD device is
sent the InitializePhase command, one of the phases is energized and
a small amount of motor rotation will probably occur. Note: the motor
must be free to rotate during this procedure. The PMD device will take
note of the encoder value when this phase is fully energized. Next,
a second phase will be energized, further motor rotation in the opposite
direction will probably occur and again the encoder position will be
noted. In most cases the second step is redundant, but there are a few
situations where energizing only one phase is not sufficient for rotation.
Combining this information with the SetPhaseCounts value will provide
enough information to facilitate successful commutation. For more information
on the Phase Initialization procedure refer to the “Step-by-Step
Guide To Phase Initialization” document which can be found on
the PMD Applications Notes Web Page.
In the following example, PWM 50/50 outputs are used in order to drive
a L6234 three-phase motor driver. The TTL/CMOS input levels of the L6234
digital part pose no problem for the CP / IO chip outputs. If the power
supply cannot sink the switching currents from the motor, a large capacitor
should be added at the Vs input pin and ground. The schematic shows
a 100µF capacitor for a nominal 2A motor. To detect malfunctions,
the Vsense signal may be used in order to sense the amount of current
flowing through the motor windings. For a nominal 2A driving current,
an Rsense = 0.15O power resistor may be used with the external circuitry
in order to generate the ~Halt signal which will short the motor winding
to ground. Other braking configurations may be implemented by altering
the halt signal interface.

Click to Enlarge
5.3 Microstepping Interface
Use of a microstepping interface implies that a step motor will be
used and the angular position of the step motor will be controlled at
fractional step intervals. PMD’s product family offers two independent
solutions for designing a microstepping system. In the first solution
the PMD device will output a pulse and direction signal and the amplifier
will convert each pulse into a microstep. The magnitude (fraction of
whole step) of the microstep is determined by the amplifier and is usually
programmable. However this solution for microstepping will not be detailed
here. Examples of
PMD products that output a pulse and direction signal will be detailed
in Section 5.4.
The second solution for designing a microstepping system involves
using a PMD product that will output a two-phase commutation signal.
These products include the MC2400, MC3400 and the MC5800. When commutating
a brushless motor some positional feedback is required in the form of
Hall Effect sensors or encoders. However, control of a step motor is
referred to as “open loop” because no feedback is necessary.
The two-phase microstepping signal represents a position while the phased
signals for a brushless motor represent a torque. In both cases the
amplitude of the summed phases will define a voltage (or current depending
on driver selection) and thus define a torque. However the angle of
the phases in a microstepping signal creates a magnetic direction vector
that points toward the desired angular position at all times. This means
that when in motion, this angle is pointed toward the current desired
position for that instant in time. When the destination position is
reached, the directional magnetic vector will remain pointed at the
destination position and the amplitude will remain constant.
As mentioned before the summed amplitude of the phases define a torque
in the case of both brushless motor commutation and microstepping commutation.
Since microstepping is a form of open loop control, the user is given
direct control of the phase amplitude (torque) as opposed to closed
loop control where the PID defines the torque in response the position
error. For this reason the user must use the SetMotorCommand command
to define the phase amplitude. In step motor applications the highest
demand for torque arises while the motor is being accelerated. In more
general terms the demand for torque is highest when the motor is in
motion. This is a result of a need for energy to overcome inertial and
frictional components in the motor and system. When a step motor is
stationary (holding position) a “holding torque” is required
to prevent external disturbances from causing the motor to lose position.
In the majority of step motor applications the holding torque requirement
is less then the torque requirement for motion. Therefore it is recommended
that the user utilize the SetMotorCommand command to reduce the current
(torque) when holding position and then increase the current just prior
to beginning a new motion.
5.3.1 ST6202 Microstepping Reference Designs
As in the case of DC brushed motors, step motor control will most
often utilize H-bridges. In the case of a step motor, two H-bridges
are required, one for each phase. The use of STMicroelectronics®
L6202 devices will be detailed here. A pair of ST L6202 H-bridges
are used in order to drive a two-phase microstepping motor in a voltage-control
mode, with the following nominal values: Vs=24V, Imax=2A. As in the
previous design, the driver also provides a current sense output that
can be used with external over-current rotection circuitry.
o schematics are shown, which utilize different decay current methods.
The first schematic uses a fast decay mode, and in the second schematic,
a mixed-decay mode is utilized. Decay mode refers to the manner in
which circulating currents in the motor windings are directed in the
H-bridge. Figure 5.3 illustrates the two decay modes. In the fast
decay mode, after the drive stage with switch pairs one and four on,
the current in the motor winding is circulated through the opposite
pair of switches two and three. Due to the large voltage applied across
the motor winding, the current decays faster in this mode.
In a slow decay, the winding current is circulated through the upper
or lower switches of the H-ridge in either pair one and three, or
pair two and four. The current decay in this mode is mostly due to
power-dissipation in the switches and motor windings.

Fast decay is usually the preferred choice when a fast
reaction is needed. When attempting to promptly decrease the current
through the winding, it is beneficial to use the fast decay mode.
Slow decay is desirable, as long as the current through the winding
tracks the commanded waveform, since slow decay will result in smaller
power dissipation in the motor and smoother movement.
5.3.1.1 Fast Decay Mode
Figure 5.4 depicts a schematic driving a pair of ST L6202s using
a fast decay mode. The ST L6202 has separate controls inputs for
either side of the bridge (IN1 and IN2). Applying a PWM 50/50 to
one of the inputs and its complementary to the second will result
in a fast decay mode operation.

Click to Enlarge
5.3.1.2 Mixed Decay Mode
In a mixed decay mode, both types of decay modes are used. For example,
slow decay is used when building the current in the winding, and
fast decay is used when decreasing the current in the winding (see
Figure 5.5). The MC58000 family provides an easy method for microstep
control that enables setting the appropriate decay method for the
mixed-decay mode drive. As mentioned before applying a PWM 50/50
to one of the inputs and its complementary to the second will result
in a fast decay mode operation. Applying a PWM magnitude signal
to one of the inputs while keeping the other one low will result
in a slow decay mode operation.
The motion processor is configured for a 50/50 PWM
two-phase mode. In this mode, PWMMagA/B are PWM 50/50 sine signals,
shifted by 90 degrees. PWMMagC, which carries a 50% duty cycle PWM
signal, is used in order to generate an effective PWM magnitude
signal (XmagA/B) by XORing it with the 50/50 PWMMagA/B signals.
A decay mode indicator is generated out of the PWMSignA
and PWMSignB signals. Each PWMSignA/B signal is differentiated in
order to detect its falling and rising edges. The differentiated
signals are then applied to the asynchronous reset and set inputs
of a D-FF, to generate the FastA/SlowB signal. The FastA/SlowB signal,
when high, indicates that Phase A and Phase B are in fast and slow
decay modes, respectively.
Table 1 shows the logic which generates the input
signals to the L6202 H-bridge, IN1 and IN2, as a
function of FastA/SlowB, PWMSignA, and PWMSignB signals.
In the schematics of Figure 5.6, the logic of Table
1 is implemented by the use of a pair of 74AC153 dual 4-to-1 multiplexers.
More efficient designs may be derived by exploiting the inter-relations
of the different signals. The propagation delay through the logic
should be kept as small as possible to reduce delays between the
two phases and to reduce asynchronous effects.

Table 1: H-bridge control signals in mixed-decay mode according
to the electrical cycle of Figure 5.5. MagA is the PWMMagA signal
in PWM 50/50 mode, while XMagA is the PWM signal in Sign/Magnitude
mode.
In order to generate the sign signals, the PWMMagA/B
50/50 signals are compared against the 50% duty-cycle reference
signal. ~ResetSign and ~SetSign are active low when the reference
signal is wider or narrower than the PWMMag signal, respectively.
The 20MHz CPClock clock synchronizes these signals. The propagation
delay through the logic should be less than 25µsec.

Figure 5.5: Control signals in mixed decay mode for
the microstepping motor for one electrical cycle, when phase B is
leading phase A.

Click to Enlarge
5.3.2 A3953 Microstepping Reference Design
The A3953S from Allegro Microsystems® is an H-bridge
designed to drive full-step motors. In order to have a finer step
resolution, the reference voltage of the chopper in the A3953S is
used to introduce the sine waveform. The interface to the driver
requires a low-pass filter in order to generate the analog equivalent
of the PWM half sine waveform in the sign and magnitude format.
In order to achieve a smooth equivalent signal, the PWM cycle frequency
should be set to 80kHz, using the SetPWMFrequency command. The MC58000,
MC2400, and MC3400 can generate a PWM signal with an 80kHz cycle.
The update rate of the PWM duty cycle is limited to 10kHz by the
controller’s commutation rate. PMD recommends limiting the
microstepping waveform to no more than 500Hz in order to ensure
the waveform contains enough points to create a proper sinusoid.
The decay mode, either fast or slow, may be controlled
via the A3953 MODE input. PWMSignA and PWMSignB signals are used
in order to generate a mixed mode decay pattern similar to the one
shown in Figure 5.5. Each PWMSignA/B signal is differentiated in
order to detect its falling and rising edges. The differentiated
signals are then applied to an asynchronous reset and set inputs
of a D-FF, to generate the FastA/SlowB signal. The FastA/SlowB signal,
when high, indicates that Phase A and Phase B are in fast and slow
decay modes, respectively. If fast decay is more desirable than
a mixed mode decay, the logic that generates the ModeA/ModeB signal
can be eliminated and the MODE input to the A3953 should be tied
high.
The A3953 operation may be tuned with the use of external
components. CT is used to determine the blanking period of the current
sense comparator circuitry. The product of RT and CT is used to
determine the PWM constant off period. Refer to the device datasheet
for more details. The sense resistors, RS, should be selected according
to the maximum current intended to be flowing through the windings.
Since the output current is controlled through Vref, the maximum
voltage swing of Vref should be considered when the sense resistor
is calculated.
LPF design
As previously mentioned PMD recommends limiting the microstepping
waveform to no more than 500Hz. In the context of the LPF design
presented here, PMD recommends further limiting the waveform to
no more than 150Hz.
Figure 5.7 shows the spectra of the PWM signal encoded
with a 150Hz electrical cycle signal, superimposed with an ideal
analog 150Hz absolute magnitude sine wave. The PWM signal possesses
energy at the PWM cycle frequency and its higher order harmonics.
This energy is related to the PWM encoding waveform, which should
be filtered out; the non-filtered portion of it will appear as ripple.
The LPF goal is to pass the energy of the encoding signal, while
suppressing the PWM waveform contributions. Based on this figure,
the filter should have a cut-off frequency at 5kHz, and suppression
of at least 40dB at 78kHz.
A second order passive filter is adequate for this
task, as indicated in Figure 5.8 and Figure 5.9. Figure 5.8 shows
a second-order RC filter frequency response, and Figure 5.9 shows
the filter’s output for an ideal 150Hz electrical cycle PWM
input.
- If a different filter is to be designed, the following points
should be considered.
- Reducing the cut-off frequency will result in a larger imperfection
at the zero crossing point due to:
- The filtered curve at the zero crossing points will experience
higher levels.
The filter group-delay will be larger; thus increasing the mismatch
between the sign signal and the filtered signal. This can be
remedied by delaying the sign signal according to the filter
group delay.
- Increasing the cut-off frequency will reduce the suppression
of the PWM waveform, resulting in larger ripple.
- Increasing the order of the RC filter will result in a better
waveform. Due to the slow rolloff of the filter, the improvement
will probably be insignificant.

Figure 5.7 - Spectra of the PWM and the encoding signal for 150Hz
electrical cycle rate. The PWM waveform contributions are being
filtered, while keeping the encoding signal’s main spectra.


Click to Enlarge
5.4 Step Motor Interface
This section details the use of the Allegro Microsystems A3977. When
using this part with a PMD controller, the Allegro device will receive
a step and direction signal from the PMD controller (MC58000, MC55000,
MC2500, MC3510). Depending on how the Allegro device is configured,
the step signal from the PMD controller will result in a full step or
a microstep. Note that when the A3977 is configured to microstep, the
PMD controller has no knowledge of this. This implies that when the
PMD controller is given an instruction from the host to move one “step”,
this will result in the A3977 generating one “microstep”.
The A3977 is capable of driving bi-polar step motors in full-, half-,
quad-, and eighth-step modes. When the step signal transitions from
logic low to logic high, the A3977 will advance the motor one full-,
half-, quad-, or eighth-step; according to the configuration of the
MS1 and MS2 pins. The A3977 will ignore the falling edge of the step
signal input. Since not all step drivers interpret the step signal in
the same manner, PMD controllers give the user the ability to define
the step event. The SetSignalSense command can be used to inform the
PMD controller that a falling edge will be interpreted as a step or
that a raising edge will be interpreted as a step. In the context of
the A3977 the latter is true. If this driver is being used with an MC58000
or an MC55000, the SetSignalSense command would be needed because the
default step generation behavior for these PMD controllers is falling
edge based. For other PMD controllers please refer to the documentation
for the default step generation behavior.
The A3977 operation may be tuned with the use of external components.
CT is used to determine the blanking period of the current sense comparator
circuitry. The product of RT and CT is used to determine the PWM constant
off period. R1 and R2, along with RT and CT, determine the percentage
of the fast decay in mixed decay mode. The sense resistors, Rsense#,
should be selected according to the maximum current and voltage restrictions
of the driver. Refer to the device datasheet for more details.
The maximum step rate the A3977 can handle is 500kHz. The 2-IC Magellan
controllers (MC58x20 and MC55x20) as well as the Navigator controller
(MC2500) contain a user command that defines the maximum step rate (SetStepRange).
The PMD controller will use this information for calculating pulse distribution.
The result of setting a step rate maximum that is far above the expected
step rate is that the steps at slower velocities will not be evenly
distributed over time. In the context of the A3977 it is recommended
to use the SetStepRange command with an argument value of 4 (=625 kHz).
However the user should be careful not to program a velocity that exceeds
the 500kHz maximum of the A3977. The maximum step rate on a 1-IC Magellan
is fixed at 100kHz and on a Pilot its fixed at 50kHz, therefore there
would be no need to worry about exceeding the maximum step rate of the
A3977 when using these particular PMD controllers.
The design in Figure 5.11 uses the sense outputs in order to detect
a malfunction by sensing the current through the motor windings. To
generate the ~Halt signal, external over-current circuitry can be used
with a 0.15O power resistor (Rsense) for a rated 2A motor.
With additional circuitry, the host may control the number of microsteps
per whole step using the MS1 and MS2 inputs of the A3977 through the
CP user I/O space. In order to avoid ambiguity, these signals should
be buffered by the direction signal transition; either positive or negative.
Using this method will make the transition deterministic at the direction
change instance, and will also satisfy the set-up time requirements
of the A3977. With the configuration shown below the A3977 will advance
1/8 of a whole step for each step pulse received from the PMD controller.

Click to Enlarge
5.5 Motor Interface Troubleshooting
Creating an interface between a motor and a PMD controller will always
involve various electrical connections between the PMD controller, a
driver or amplifier, and the motor itself. Recommendations for troubleshooting
these connections are based on the type of motor in use.
5.5.1 Troubleshooting Servo Motors (DC Brushed and Brushless
DC)
Note: Chapter 7 of this document is devoted to helping the user
determine proper Hall Effect sensor configuration. If there is a need
to troubleshoot a Brushless DC motor with Hall Effect sensors please
refer to Chapter 7.
The amplifier/driver for a servomotor will accept a torque signal
from the PMD controller. The format of the signal my take on many
forms (PWM, Analog), but the signal always represents the instantaneous
desired magnitude and direction of torque. Under closed loop operation
the torque signal is determined by the PID and is internally represented
as a signed 32-bit integer (-32768 to 32767). The sign of the torque
value is a direct correlation to the direction of the torque; positive
or negative translates to CW or CCW torque. Whether or not a positive
value will create a CW or CCW torque entirely depends on the system
setup. The PMD controller will function correctly either way as long
as a positive torque corresponds to a direction of rotation that will
cause the encoder value to increment.
After all connections have been made, it is recommended that the
user attempt open loop control before tuning PID parameters or generating
a motion profile. Open loop control permits explicit control of the
torque signal by the user. The task of the user is to verify that
when the amplifier/driver receives a user controlled torque signal
that the subsequent torque exerted by the motor is appropriate in
both magnitude and direction. The definition of “appropriate”
is very system specific. Assuming that the configuration on the PMD
controller has been initialized (Motor Type, Output Mode, Commutation
Mode), the user can gain explicit control of the torque output signal
by using the following commands on a specific axis:
SetMotorMode 0
SetMotorCommand <user_selected_value>
Update
Note: If a Brushless DC motor with sinusoidal commutation is
being used, the Phase Initialization procedure must be
completed prior to the sending the above commands.
The selection of the value of the argument to SetMotorCommand has
been left to the user. The behavior of a PID is not deterministic
if the torque signal reaches numerical saturation (i.e. –32768
or 32767). Therefore it is expected that the electrical gains within
the system will allow the PMD controller to work below saturation
levels. On the flip side, due to the integer representation of the
torque value, it is also expected that electrical gains in the system
will not be so large as to render the torque value resolution useless.
In a typical application a motor command of 5,000 – 10,000
will cause motor rotation in a no load condition. The negative of
this value should also be used with SetMotorCommand and Update to
verify rotation in the opposite direction with approximately the same
speed and current draw results. Note that a motor command of 16,383
is half way to full scale. If a value of greater than 16,383 is required
for rotation with no load then the system level gains, motor selection,
and power rail requirements need to be reconsidered.
If no torque at all is present there is probably a connectivity
issue in the system. At this point, troubleshooting involves investigating
the documentation for your amplifier/driver and motor. If the PMD
controller is writing to a DAC in order to generate an analog torque
signal for the amplifier/driver, the analog output of the DAC should
be verified.
5.5.2 Troubleshooting Microstepping Interfaces
As mentioned in section 5.3, the commutation performed in a microstepping
interface is considered open loop. The proportionality that exists
in servomotors between motor speed and the amplitude of the motor
command signal does not exist in a microstepping interface. The frequency
of the sinusoid embedded in the motor command signal determines the
motor speed. The frequency is a result of the commanded velocity calculated
by the trajectory generator in the PMD controller. Also mentioned
in section 5.3 is that SetMotorCommand will directly control the amplitude
of that signal.
Assuming that the configuration on the PMD controller has been initialized
(Motor Type, Output Mode) the recommended procedure for roubleshooting
a microstepping interface involves generating a velocity contouring
profile with the following commands.
SetMotorMode 1
SetPhaseCounts <user_selected_microstep)
SetProfileMode 1
SetVelocity <user_selected_velocity>
SetAcceleration <user_selected_velocity>
SetMotorCommand <user_selected_value>
Update
The user-selected argument to the SetPhaseCounts commands will define
the number of microsteps in one whole step. A Velocity Contouring
profile will be generated and the resulting frequency of the sinusoid
will be:
Freq= <user_selected_velocity> * (1 / <user_selected_microstep>)*
(1/Cycle_Time (sec))
The units of the SetVelocity command are microsteps/cycle. The default
cycle time depends on the product and number of axes in use, but can
range from 51.2us to 614.4us. To determine the cycle time for the
product in use please refer to the User’s Guide (Sec. 3.8 in
the Magellan User’s Guide and Navigator User’s Guide,
Sec. 3.7 in the Pilot User’s Guide ) or use the GetSampleTime
command and convert the returned value from microseconds to seconds
for use in the above equation.
Assuming the argument to SetMotorCommand is non-zero, the PMD controller
will continuously output a two phase signal at the frequency defined
above. If the driver and step motor are properly configured and connected
then the step motor should be rotating at Freq/4 (whole steps per
second). This number comes from the fact that every complete sinusoid
created by a microstepping waveform represents four whole steps.
At this point if the step motor is vibrating or making noise but is
not rotating the user should experiment with a smaller velocity or
a larger motor command. If the motor does nothing at all, the user
needs to verify connections and proper initialization of the driver.
5.5.3 Troubleshooting Step Motor Interfaces
Use of a step motor with a PMD controller requires the least amount
of setup of any other motor type. As in the case of the microstepping
interface, the recommended procedure for verifying the interface to
a step motor involves generating a velocity contouring profile on
the PMD controller. The goal is to have the controller output a steady
stream of steps, while the user needs to verify the driver and motor
are reacting to the stream.
Step motor drivers usually provide the user with the ability to
select the drive current. Before attempting the procedure below verify
the PMD controller is configured for step and direction and ensure
the driver has been configured to use an appropriate drive current.
SetMotorMode 1
SetProfileMode 1
SetVelocity <user_selected_velocity>
SetAcceleration <user_selected_velocity>
Update
At this point the PMD controller will output a stream of steps to
the driver and the motor should be rotating. If the motor does nothing
or behaves erratically the user needs to verify connections and proper
configuration of the step motor driver.
Section 5.4 explains the different ways a step motor driver may
interpret the step signal. Some drivers look for a step occurrence
on a raising edge and some on a falling edge. The user needs to consult
the documentation for the particular driver in use and may need to
use the SetSignalSense command to get the PMD controller’s step
output to correspond.
|
|