Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Global I-Variables 214
On Turbo PMAC2 boards that are not Ultralite, Servo IC 0 typically provides the Phase and Servo clock
signals for the entire board (I7007 = 0), so I7000 is used to derive the Phase clock and Servo clock
frequencies for the board, along with I7001 and I7002. (On Turbo PMAC2 Ultralite boards, this function
is controlled by I6800, I6801, and I6802, because MACRO IC 0 controls the board clock frequencies on
these boards.)
I7m00 controls these frequencies by setting the limits of the PWM up-down counter, which increments
and decrements at the PWMCLK frequency of 117,964.8 kHz (117.9648 MHz).
The actual Phase clock frequency is divided down from the maximum phase clock according to the
setting of I7001. On the falling edge of the phase clock, PMAC2 samples any serial analog-to-digital
converters connected to its Servo ICs (as for phase current measurement), and interrupts the processor to
start any necessary phase commutation and digital current-loop algorithms. Even if phasing and current-
loop algorithms are not used, the MaxPhase and Phase Clock frequencies are important because the servo
clock is derived from the phase clock.
The PWM frequency determines the actual switching frequency of amplifiers connected to any of four
machine interface channels with the direct PWM command. It is only important if the direct PWM
command signal format is used.
The maximum value that can be written into the PWM command register without full saturation is
I7m00+1 on the positive end, and I7m00-2 on the negative end. Generally, the “PWM scale factor”
Ixx66 for Motor, which determines the maximum PWM command magnitude, is set to I7m00 + 10%.
Generally I7m00 for Servo IC m that is not controlling the system Phase clock frequency is set to the
same value as I7000 or I6800, which controls the board’s Phase clock frequency (with I7001 or I6801). If
a different PWM frequency is desired for the PWM outputs on Servo IC m, I7m00 should be set so that:
}Integer{
PhaseFreq
)kHz(PWMFreq*2
This will keep the PWM hardware on these channels in synchronization with the software algorithms
driven by the system Phase clock.. For example, if the phase frequency is 10 kHz, the PWM frequency
for channels 5 to 8 can be 5, 10, 15, 20, (etc.) kHz.
To set I7m00 for a desired PWM frequency, the following formula can be used:
1
)kHz(Freq_PWM*4
)kHz(8.964,117
00m7I
(rounded down)
To set I7000 for a desired maximum phase” clock frequency, the following formula can be used:
1
)kHz(eqMaxPhaseFr*2
)kHz(8.964,117
7000I
(rounded down)
For accessory boards in which alternate addressing of the Servo IC is used (labeled Servo IC m*), this
function is controlled by I7m50, not I7m00.
Example:
To set a PWM frequency of 10 kHz and therefore a MaxPhase clock frequency of 20 kHz:
I7000 = (117,964.8 kHz / [4*10 kHz]) - 1 = 2948
To set a PWM frequency of 7.5 kHz and therefore a MaxPhase clock frequency of 15 kHz:
I7000 = (117,964.8 kHz / [4*7.5 kHz]) - 1 = 3931