Reference Manual
PMAC 2 Software Reference
PMAC I-Variable Specification 131
PMAC2 Encoder/Flag/Output Setup I-Variables
The DSPGATE1 Servo ICs of PMAC2 controllers have several setup variables. PMAC2 has I-variables
for the important setup registers of 2 Servo ASICs comprising eight servo interface channels. It is
possible to use two additional Servo ASICs on ACC-24P2 or ACC-51P boards, but these do not have I-
variables assigned to their setup registers.
Global / Multi-Channel ASIC I-Variables
The I-variables I900 – I909 on a PMAC2 controller control the global setup registers of the two possible
on-board Servo ASICs of the PMAC2. Several of these registers on the first Servo ASIC control
important parameters for the whole PMAC2 system.
I900 MaxPhase and PWM 1-4 Frequency Control {PMAC2 only}
Range
0 .. 32767
Units
MaxPhase Frequency = 117,964.8 kHz / [2*I900+3]
PWM Frequency = 117,964.8 kHz / [4*I900+6]
Default
6527
MaxPhase Frequency = 117,964.8 / 13057 = 9.0346 kHz
PWM Frequency = 117,964.8 / 26114 = 4.5173 kHz
Remarks
I900 controls the maximum phase clock frequency for the PMAC2, and the PWM
frequency for machine interface channels 1-4. It does this 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 I901. On the falling edge of the phase clock, PMAC2 samples
any serial analog-to-digital converters connected to its ASICs (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 PhaseClock 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 PMAC2’s first 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 I900+1 on the positive end, and -I900-2 on the negative end. Generally, the
PWM scale factor Ix66 for Motor, which determines the maximum PWM command
magnitude, is set to I900 + 10%.
To set I900 for a desired PWM frequency, the following formula can be used:
1
)kHz(Freq_PWM*4
)kHz(8.964,117
900I −= (rounded down)
To set I900 for a desired “maximum phase” clock frequency, the following formula can be
used:
1
)kHz(eqMaxPhaseFr*2
)kHz(8.964,117
900I −= (rounded down)
To set a PWM frequency of 10 kHz and therefore a MaxPhase clock frequency of 20 kHz:
I900 = (117,964.8 kHz / [4*10 kHz]) - 1 = 2948