User's Manual

PMAC2 User Manual
32 Setting Up PMAC2 for Direct PWM Control
Preparation
To prepare PMAC2 for this test:
Set Ix00 for all other motors to 0 to de-activate them.
Set Ix01 for all other motors to 0 to turn off the commutation (these make sure PMAC2 has enough
calculation time to gather data fast enough).
Set I902 to 0 for divide-by-1 to make servo update rate equal to phase update rate (this permits
PMAC2 to gather data every phase update).
To set up the motor under test:
Set Ix00 to 1 for the motor under test to activate it
Set Ix01 to 1 for the motor under test to turn on phase/current calculations (these may have been left
at zero from the earlier tests).
Give the motor a K command to turn off the outputs.
Set Ix71 to 1 to effectively cripple the commutation algorithm and prevent movement during the test.
Make sure the other setup I-variables are set as instructed above (only I902 and Ix71 should be
different from what they would be in the final application.
Start with Ix62=0.1, Ix61=0.0, and Ix76=0.0 as current loop gains.
Set Ix77 to 3000 to provide about 10% direct current command.
In the Detailed Plot section of data gathering, specify data gathering at intervals of one servo cycle.
Select for gathering the commanded and actual direct current registers every servo cycle for the motor
under test. The addresses for these registers are found in tables 3-9 and 3-10.
Motor # 1 2 3 4 5 6 7 8
Hex
Y:$0043 Y:$007F Y:$00BB Y:$00F7 Y:$0133 Y:$016F Y:$01AB Y:$01E7
Decimal
Y:67 Y:127 Y:187 Y:247 Y:307 Y:367 Y:427 Y:487
Motor # 1 2 3 4 5 6 7 8
Hex
Y:$0044 Y:$0080 Y:$00BC Y:$00F8 Y:$0134 Y:$0170 Y:$01AC Y:$01E8
Decimal
Y:68 Y:128 Y:188 Y:248 Y:308 Y:368 Y:428 Y:488
Executing the Current-Loop Test
Once the data gathering has been set up, the following commands can be given:
DEFINE GATHER ; Reserve memory for data gathering buffer
#1 ; Make sure proper motor is addressed
GAT O0 ; Start data gathering and give current command
ENDG K ; Stop gathering and end current command
The data is then uploaded and plotted. The aim is to get as quick a response as possible to the
commanded value without significant overshoot or any instability. Typical current loop proportional
gains are in the range 0.5 to 0.75. Typical current loop integral gains are around 0.01.
Clean-Up
When finished with this test, restore I171 and I902 to its proper value:
There should now be current loops operating properly. The next step is to get the commutation algorithm
working properly. See the Setting op PMAC2 Commutation section.