Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Global I-Variables 195
I6800 (etc.) 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 PWM
frequency of MACRO IC 0 determines the frequency of the two single-phase PWM outputs on the JHW
“Handwheel” connector.
The actual phase clock frequency is divided down from the maximum phase clock according to the setting
of I6801 (etc.). On the falling edge of the phase clock, PMAC2 samples any serial analog-to-digital
converters connected to its MACRO 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 important only if the direct PWM
command signal format is used.
The maximum value that can be written into a PWM command register without full saturation is I6800+1
on the positive end, and -I6800-2 on the negative end.
If the MACRO IC is not used to generate the system clocks, this variable for the IC is generally set to the
same value as the comparable variable on the Servo IC (I7000, etc.) or MACRO IC (I6800, etc.) that is
used. The only time a different setting should be used is if it is desired that a different PWM frequency be
generated on the two channels (“DSPGATE2” ICs only) from that of the variable controlling the system
clocks. Certain different frequencies are possible, but they are restricted to the cases where:
}Integer{
PhaseFreq
)kHz(PWMFreq*2
This will keep the PWM hardware on channels 1* and 2* in synchronization with the software algorithms
driven by the system’s Phase clock. For example if the system Phase clock frequency is 10 kHz, the
PWM frequency for channels from a different IC can be 5, 10, 15, 20, (etc.) kHz.
To set I6800 (etc.) for a desired PWM frequency, the following formula can be used:
1
)kHz(Freq_PWM*4
)kHz(8.964,117
6800I
(rounded down)
To set I6800 (etc.) for a desired “maximum phase” clock frequency, the following formula can be used:
1
)kHz(eqMaxPhaseFr*2
)kHz(8.964,117
6800I
(rounded down)
Example:
To set a PWM frequency of 10 kHz and therefore a MaxPhase clock frequency of 20 kHz:
I6800 = (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:
I6800 = (117,964.8 kHz / [4*7.5 kHz]) - 1 = 3931
See Also:
I7, I10, I67, I6801, I6802, I7000, I7001, I7002