User's Manual

PMAC2 User Manual
42 Setting Up PMAC2 Commutation (Direct PWM or Sine Wave)
Direction Balance Fine Phasing Test
Typically, the stepper motor phasing test will establish a phase reference to within 1 or 2 degrees. This is
adequate for many purposes, but for complete optimization of the motor phase reference, it is necessary to
perform another test. This test, described below, finds the best phase reference by making sure that key
performance measures are the same in both directions. Usually the improvement seen in performance
from this fine phasing is better smoothness, not increased torque.
The use of current-loop integrator registers as explained below can only be used in direct PWM systems.
The tests can still be run on sine-wave output systems, but the measurement to be compared in both
directions is the motor velocity. This can simply be read in the position window of the PMAC Executive
Program. This measurement, which is also possible on direct PWM systems, is not quite as sensitive to
phase differences as the measurement explained below, but can still result in an improvement.
This test only needs to be performed once for a given motor. Its purpose is to establish a relationship
between the motor phase angle and an absolute sensor on the motor (e.g. resolver or incremental encoder
index pulse). Most motor manufacturers who mount feedback devices at the factory do not specify a
mounting repeatability tolerance (between motor phase angle and sensor angle) tighter than 1 or 2
degrees. The results of this test do not necessarily carry from one motor to another of a given design.
This test is generally not appropriate for linear motors, because of the relatively uncontrolled movement it
produces. It should only be done on unloaded rotary motors. On linear motors, a fine phasing test can be
done by adjusting the phase position register so that no movement occurs when a large value of Ix77 (e.g.
16,000) is given with an O0 command. The test should start with small values, and movement quickly
stopped with a K command.
Preparation
In the Detailed Plot menu of the data gathering section of the PMAC Executive program, set up to gather
the Direct Integrator Output and Quadrature Integrator Output registers. Set the gathering period to about
10 servo cycles. The addresses of the registers for each of the motors are shown in tables 5-2 and 5-3.
Motor # 1 2 3 4 5 6 7 8
Hex
Y:$0046 Y:$0082 Y:$00BE Y:$00FA Y:$0136 Y:$0172 Y:$01AE Y:$01EA
Decimal
Y:70 Y:130 Y:190 Y:250 Y:310 Y:370 Y:430 Y:490
Motor # 1 2 3 4 5 6 7 8
Hex
X:$0046 X:$0082 X:$00BE X:$00FA X:$0136 X:$0172 X:$01AE X:$01EA
Decimal
X:70 X:130 X:190 X:250 X:310 X:370 X:430 X:490
Executing the Test
Before performing this test, first use the stepper-motor method of phasing to get close. Then, in the
terminal window of the Data Gathering section of the PMAC Executive, use the following set of
commands (wait a couple of seconds between commands):
DEFINE GATHER ; Reserve memory for gathered data
GAT O10 ; Positive command
O-10 ; Negative command
ENDG K ; Stop gathering and kill motor
Upload the gathered data and plot direct and quadrature voltage vs. time. The goal is to have the average
direct voltage reading be the same for the moves in both directions. The quadrature voltage will change
in sign at the move reversal. To adjust the system, wait until the motor is stopped after the test (M171 is
constant) and make a small adjustment to the M171 phase position register with a command like:
M171=M171+5
Then repeat the test as needed until the direct voltage readings are received as close as possible in both
directions. This test is sensitive to a count of phasing error, so the last change should probably be +
1 count.