User's Manual
PMAC2 User Manual
24 Setting Up PMAC2 for Direct PWM Control
If there is only a permanent magnet field, the armature current reading can either be fed into ADC A or
ADC B, with Ix82 telling PMAC2 which one is used. If ADC A is used, the serial digital input for ADC
B (+signal only) should be tied to GND so a zero feedback value is forced (alternately a background PLC
can periodically zero the direct current integrator register). If ADC B is used, then PMAC uses the
Compare A read/write register for the (non-existent) direct current feedback; in this case, a zero value
should be written into this register on power-on/reset, and no other value should be written to it during the
application.
If there is a wound field, it must be commanded from PMAC2’s B phase, and the current feedback must
be brought back into PMAC2’s B-phase. If only uni-directional voltage and current are required for the
field, the field windings can be commanded from a single half-bridge. If bi-directional voltage or current
is required, a full H-bridge must be used, with PMAC2’s B-phase commanding the two half bridges in
anti-phase mode (the command for the top of one half is also used for the bottom of the other half).
I-Variable Setup
To set up a motor for this technique, the following I-variable settings must be made:
• Ix00 = 1 to activate the motor
• Ix01 = 1 to activate commutation algorithms
• Ix02 should contain the address of the PWM A register for the output channel used (this is the
default), just as for brushless motors
• Ix70 = 4, Ix71 = 4: This defines a commutation cycle size of 4/4 = 1 count. The use of 4/4 instead of
1/1 allows us to rotate the angle +
90
o
for test and tuning purposes.
• Ix72 = 64 or 192 for 1/4 or 3/4 cycle between the armature (rotor) and field (stator). If a positive
voltage output number creates a negative current feedback number, use 64; otherwise use 192.
• Ix73 = 0, Ix74 = 0: No power-on phase search will be required
• Ix75 = 0: Zero offset in the power-on phase reference
• Ix77 = 0 for motors without wound field. With a wound field, Ix77 determines the strength of the
field; with field weakening functionality, Ix77 will be a function of motor speed.
• Ix78 = 0 for zero slip in the commutation calculations
• Ix81 = $80770: This tells PMAC2 to read the low eight bits of Y:$0770 for the power-on phase position.
This register is forced to zero on power-on/reset, so this setting forces the phase position to zero.
• Ix82 should contain the address of ADC B register for the feedback channel used (just as for
brushless motors) when the ADC A register is used for the rotor (armature) current feedback. If there
is a wound field, the stator field current feedback should be connected to ADC B. If there is a
permanent magnet field, there will be no feedback to ADC B.
• Ix82 should contain the address one greater than that of the ADC B register for the feedback channel
used when the ADC B register is used for the rotor (armature) current feedback. This is suitable for
motors with only a permanent magnet field.
• Ix83 does not really matter here, because the commutation position is defeated by the single-count
cycle size. However, it is fine to use the default value.
• Ix84 is set just as for brushless motors, specifying which bits the current ADC feedback uses.
• Ix61, Ix62, and Ix76 current loop gains are set just as for brushless motors. Before using the current
loop tuning aids for the rotor current, force the commutation phase angle to 90
o
by setting the phase
position register Mx71 to 1 (out of 4). Remember to set it back to 0 before actual operation.