User's Manual

PMAC User Manual
Setting Up a Motor 53
SETTING UP A MOTOR
What is a Motor?
A motor, to PMAC, is a unit that has feedback, output, flags, and potentially a master. A motor is set up
by assigning it these attributes and activating it. This is done through the use of I (initialization)
variables. Position information is typically pre-processed through a structure known as the Encoder
Conversion Table, explained below.
Defining the Motor
The settings of a few I-variables define the motor for PMAC. That is, they tell it where to get its inputs,
and where to put its outputs (which is as much as PMAC can really know). By making all of these
locations set up by variable values, PMAC provides incredible flexibility in setting up a system.
Motor I-Variables
Each motor has an identical set of I-variables. The hundreds digit of the I-variable number corresponds to
the number of the motor. To refer to a motor I-variable generically, we replace the hundreds digit with
the letter x, where x represents the number of whichever motor we are dealing with at the time (for
example Ix03 could represent I103, I203, I303, and so on, to I803).
The default values of the variables provide the settings that most will want to use, so they will not need to
change these settings. However, if a different setup from the default is desired, it is a simple matter of
changing a variable or two.
Activating the Motor
Variable Ix00 for Motor x controls whether PMAC does calculations for this motor or not. If using Motor
x at all, set Ix00 to 1 (activated). If not using the motor at all, set Ix00 to 0 (de-activated), so PMAC does
not waste processor time doing calculations for the non-existent motor. An activated motor can be either
enabled or disabled; activation simply means that PMAC is paying attention to what happens on the
motor.
Does PMAC Commutate this Motor?
Virtually all motors need to be commutated somehow — the only significant exception is the voice-coil
motor. The important question here is whether PMAC does the commutation. If the commutation is done
inside the motor (as in brush motors) or in the amplifier, PMAC does not need to do the commutation,
and Ix01 must be set to 0. If this is the case, only one analog output is required for the motor, and it does
not matter what the settings of the commutation I-variables (Ix70-Ix83) are.
If PMAC is to perform the commutation for the motor, Ix01 must be set to 1. In this case, two analog
outputs are required for the motor, and Ix70-Ix83 must be set up to commutate the motor properly. Refer
to the Setting Up PMAC Commutation section in this manual.
Address I-Variables
Each motor has several address I-variables. These pointer variables contain the address in the PMAC
memory and I/O space of a register where PMAC will read or write data automatically. These variables
include Ix02, Ix03, Ix04, Ix05, Ix10, Ix25, Ix81, and Ix83. Because PMAC has a 16-bit address bus, it
takes 16 bits (four hexadecimal digits) to specify an address. However, the address I-variables are 24-bit
values, and the upper eight bits can be used to specify alternate modes for using the designated register.
If all of the upper bits are zero, the register is used in the default fashion. Refer to the individual I-
variable descriptions in the PMAC and PMAC2 Software Reference Manual, for details on the alternate
usage modes for each of these I-variables.