User's Manual
PMAC2 User Manual
Setting Up PMAC2 Commutation (Direct PWM or Sine Wave) 43
Using the Test Results for Absolute Sensor
This test is only useful when we match the super-accurate phase position to an absolute position sensor or
the index pulse of an incremental sensor. With an absolute sensor, assign an M-variable to the sensor
register, and add this to the Watch window. For example:
M175->TWR:0,0 ; Abs. pos. of 1st resolver on 1st Acc-8D Opt 7 R/D
Make sure the motor is completely at rest. Now take the sensor position value read, multiply this by I170,
and subtract this from the phase position read by M171. (If moving the motor manually so that M171=0,
negate the product). Enter this value into I175. Mathematically speaking,
I175=M171-(M175*I170)
Finally, set up I181 to read the absolute sensor on subsequent PMAC2 resets and store these values with
the SAVE command. Another phase reference need not be performed on this motor.
Using the Test Results for Incremental Index Pulse
For the incremental encoder index pulse, we will use the position capture feature to note where the index
is. Set variable I912 to 1 if getting a high-true index pulse, or to 9 if there is a low-true index pulse. (To
see which it is, define M119->X:$C000,14 and put M119 in the Watch window. If it is generally 0, it
is a high-true pulse.) To make sure the effective index pulse is only one count wide, set I914 to 1, and
I915 to the appropriate value for the encoder.
Now assign an M-variable to the encoder flag capture register:
M103->X:$C003,0,24,S ; Encoder 1 flag capture register
Add this to the Watch window. With the motor at rest, note the phase position value in M171 and the
encoder position register in M101. Write these values down. Now turn/push the motor manually in the
direction to home the machine until M103 changes. The new value is the value of the encoder register
captured at the index pulse.
Subtract the starting M101 value from this new M103 value. Multiply the difference by I170 and add this
to the starting M171 value. The result is the value we will write to the phase position register when we
are settled at the index to refine our initial rough phasing. Mathematically speaking:
(
)
171StartM101StartM103IndexM*170IPosIndexPhase +−=
Alternately, in a technique that is easier mathematically but harder physically, put M119 in the Watch
window (or the index signal on an oscilloscope) and turn the motor shaft until it stops on the index pulse.
Read the M171 phase position register value. This is the avlue we will write to the phase position register
when we are settled at the index to refine our initial rough phasing.
Using Hall-Effect Sensors for Phase Reference
Hall-effect sensors, or their optical equivalents on a commutation encoder, for a 3-phase motor can be
used for rough phasing on power-up without the need for a phasing search move. This initial phasing
provides reasonable torque, but it will need to be corrected for top operation. Usually the correction is
done when the index pulse is reached, in the same technique that is described above for the correction
after a power-on phasing search move.
Hall-effect sensors usually map out 6 zones of 60
o
elec. each. In terms of PMAC2’s commutation cycle,
the boundaries should be at 180
o
, -120
o
, -60
o
, 0
o
, 60
o
, and 120
o
. Typically a motor manufacturer will
align the sensors to within a few degrees of this, because these are the proper boundary points if all
commutation is done from the commutation sensors. If mounting the hall-effect sensors, take care to
align the boundaries at these points. The simplest way is to force the motor to the zero degree point with
a current offset (as shown above) and adjust the sensor while watching its outputs to get a boundary as
close as possible to this point.