User's Manual

Turbo PMAC User Manual
Motor Compensation Tables and Constants 135
SETTING UP THE ENCODER CONVERSION TABLE
Turbo PMAC uses a two-step process to work with its feedback and master position information for the
servo algorithm, to provide maximum power and flexibility. (Note that the commutation algorithms
generally use raw feedback registers unprocessed by the conversion table.) For most Turbo PMAC users
with quadrature encoder feedback, this process can be virtually transparent, with no need to worry about
the details. However, some users will need to understand this conversion process in some detail to make
the changes necessary to use other types of feedback, to optimize their system, or to perform special
functions. This section is for those users.
The first stage in the position processing uses the hardware registers such as encoder counters with
associated timers, A/D registers, or accessory cards for parallel input. These work continually without
direct software intervention (although they can be configured through software) with data typically
latched on the servo interrupt. This stage is covered in the Hardware Reference manual for the particular
device and the Setting up Feedback section of this manual. Beyond this point, the process is software-
controlled.
Most controllers use the raw data in the hardware registers directly for feedback or master position data.
However, Turbo PMAC has an intermediate step using a software structure called the Encoder
Conversion Table to pre-process the information in the latched registers. This table tells PMAC what
registers to process, and how to process them; it also holds the intermediate processed data.
Ix03: Position Loop Feedback Address
Ix04: Velocity Loop Feedback Address
Ix05: Master Position Address
Ix93: Time Base Source Address
To Servo
Algorithms
Address
Encoder Conversion
Table
Data
Address
Data
PMAC Hardware
Registers
Conversion Instructions:
Process & Address
Processed
Feedback Data
RAM
Raw
Feedback
Data
Encoder Counters
& Timers
,
Latches
,
ADC's
Servo Address
I-Variables
Feedback
Data Signals
PMAC Encoder Conversion Table Principle
This pre-processing step is necessary, or at least advantageous for several reasons:
There are several pieces of raw data that need to be combined into one resulting position number, as
with the counter and timers for “1/T” encoder interpolation.
There is some checking for special conditions (such as rollover or sudden changes indicative of noise,
which needs to be done to ensure robust data.
Mathematical processing of the raw data, such as addition, subtraction, differentiation, or integration,
needs to be done to get the resulting value.
The raw data just needs to be transferred and shifted for the servo algorithm to use.
While the primary purpose of the table is to produce processed (converted) values for feedback and
master position data for the servo algorithms to use, other uses are possible. The table’s guaranteed
execution at the beginning of each servo cycle, and its many tools for processing data, permit other uses
as well.