PMAC uses a multiple-step process to work with its feedback and master position information, and with external time-base sources. The first step in the position conversion process is reading the hardware encoder counters with accessory cards for parallel input. At the start of each servo cycle, a servo interrupt signal is sent out to latch all of the registers. At this point, PMAC uses a software structure called the ``Encoder Conversion Table'' to 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.
The Encoder Conversion Table has two columns: one in the X memory space of the processor, and one in the Y memory space. The X-column holds the converted data, while the Y-column holds the addresses of the source registers, and the conversion methods used on the data in each of those source registers. Basically, the user sets up the table by writing to the Y-column, and PMAC uses the Y-column data to fill up the X-column each servo cycle.
There are two ways to setup Encoder conversion table - one is through the PMAC Executive program and other one is directly writing to the Y-column of the certain registers. Setup window from executive is shown on figure Fig. 4.1. ``Entry'' chooses which encoder to use. ``Entry address'' is the address where conversion information is stored. ``Processed Data Address'' is the address where result of the conversion is stored, in other words this is the address where the position from laser interferometer is stored. ``Conversion type'' chooses which conversion to use. Since we have parallel data and ACC-14D is represented as Y word the conversion to choose is ``Parallel pos from Y word with no filtering'' (one can also use ``Parallel pos from Y word with filtering''). After that choice is made ``Source Address'' is used to chose which ACC-14 card to use and which connector. ``Bits enabled mask'' is used to set up a bit mask. After choices are made on has to press ``Download Entry''.
Another way to set up Encoder Conversion Table is to directly write to a Y word. Figure Fig. 4.1 also shows terminal on which Y memory words are listed. Each Y word consists of 24 bits, bits 16-23 are used to set up a conversion method, and bits 0-15 to set up source address. Source addresses for ACC-14 are shown in Table 4.1.
Bits 16-23 of Y word define the conversion. ``Parallel pos for Y word'' is chosen with $2x where x defines whether we use shifted x=0 or unshifted x=8 format. For example, Y word for encoder 3 is $20FFE0.
Bit enable mask enables bit rollover and it is set by next Y word.
For example to set up encoder 3 with bit mask $FFFFFF one has to
write WHY:$20FFE0, $FFFFFF
in the PMAC terminal.
Most of this section is taken from Chapters 6 and 7 of PMAC_USER_MANUAL.pdf.
Holger Fleckenstein 2008-07-08