User's Manual
PMAC2 User Manual
Setting Up PMAC2 Commutation (Direct PWM or Sine Wave) 41
The Y-memory portion of this register has only fractional information, so we will use only the X-memory
portion. Its units are (counts*Ix70). The registers are shown in table 5-1.
Motor # 1 2 3 4 5 6 7 8
Hex
X:$0040 X:$007C X:$00B8 X:$00F4 X:$0130 X:$016C X:$01A8 X:$01E4
Decimal
X:64 X:124 X:184 X:244 X:304 X:364 X:424 X:484
Normally, this register varies from -Ix71/2 to +Ix71/2, although if monitoring it, sometimes it may jump
by Ix71 units and be temporarily outside this range. This is normal behavior. Access to this register is
useful in many ways for establishing a phase reference. Define the suggested M-variable for the Motor 1
phase position register:
M171->X:$0040,0,24,S ; Motor 1 phase position (counts*Ix70)
Add this M-variable to the Watch window.
Current Command Six-Step Test
The basic technique we will use here, either for a one-time phase reference with an absolute sensor, or
power-up phase reference with an incremental sensor, is all or part of the current command six-step test.
This is very similar to the voltage command six-step test described above, except the current loops are
active. We use the ADC input offset registers to bias the phase current feedback, and hence the phase
command outputs, to drive the motor as a stepper motor to a particular location in the commutation cycle,
usually the 0
o
position. Then we can write a 0 to the phase position register.
Ix29 is the A-phase offset; Ix79 is the B-phase offset. The third phase is not directly commanded; PMAC2
will command it automatically as part of the digital current loop to balance the first two phases. For motor
1, the following sequence of commands for the current six-step test, and the expected results, could be:
#1O0 ; Open loop command of zero magnitude
I179=3000 I129=0 ; Step 1: (A) 0
o
elec.; (B) 180
o
elec.
I179=3000 I129=-3000 ; Step 2: (A) -60
o
elec.; (B) 120
o
elec.
I179=0 I129=-3000 ; Step 3: (A) -120
o
elec.; (B) 60
o
elec.
I179=-3000 I129=0 ; Step 4: (A) 180
o
elec.; (B) 0
o
elec.
I179=-3000 I129=3000 ; Step 5: (A) 120
o
elec.; (B) -60
o
elec.
I179=0 I129=3000 ; Step 6: (A) 60
o
elec.; (B) -120
o
elec.
I179=3000 I129=0 ; Step 1: (A) 0
o
elec.; (B) 180
o
elec.
Note:
On preliminary firmware versions dated before October 95 (use DATE command),
these commands produce angles rotated -30
o
from the results shown here. On
preliminary firmware versions dated 10/5/95 or 10/16/95 these commands produce
angles rotated 180
o
from the results shown here, possibly leading to a dangerous
runaway condition. If using any of these firmware versions, contact the factory for
a free firmware upgrade.
Case (A) is the proper result for all direct PWM setups (Ix82>0), regardless of the setting of Ix72. It is
the proper result for sine-wave output setups (Ix82=0) with Ix72<128. Case (B) is the proper result for
sine-wave output setups (Ix82=0) with Ix72>128.
These commands will force about 1/10 of maximum current into phases to drive the motor to known
positions in the phase cycle. Remember to clear the offsets when finished with this test:
I179=0 I129=0