User's Manual

PMAC User Manual
76 Setting Up a Motor
The output value of the exponential filter is placed in the X register of the third line of the conversion
table entry. An operation that uses this value should address this third register; for example Ix05 for
position following, or the source address for a time-base conversion-table entry (to keep position lock in
time base, this filter must be executed before the time-base differentiation, not afterward).
Entry Format
Exponential Conversion
X-Words Y-Words
1. Intermediate data 1. Source and process: Bits 0-15: X-address of source
(usually a converted position register)
Bits 16-23: = $D0
2. Intermediate data 2. Maximum permitted change in output value; expressed in
LSBs per servo cycle
3. Filtered result: unshifted from source
register data
3. Exponential filter gain K where filter equation is:
Out(n) = Out(n-1) + (K/2
23
)*[In(n)-Out(n-1)]
Example:
Starting with the default encoder conversion table which occupies registers $0720 to $0729, to add a new
entry to the table that filters the handwheel encoder that is wired into Encoder 5 on PMAC, the filter must
have a time constant of eight servo cycles, and the maximum velocity of the output is to be 16 counts per
servo cycle.
In the default table, the 1/T interpolation result for Encoder 5 is placed in register X:$0724. This is the
source address for the exponential filter. Since the time constant of eight servo cycles is equal to
8,388,608 divided by filter gain K, then K is equal to 1,048,576. The units (LSBs) of the source register
are 1/32 count, so the maximum change value is 32*16, or 512 LSBs per servo cycle.
These values can be entered into the interactive menu of the PMAC Executive program (V3.0 or newer),
or they can be entered with a direct memory-write command:
WY:$072A,$D00724,512,1048576
Y:$072A is the starting location of the entry in PMAC memory; $D0 specifies the exponential filter; 512
(or $200) specifies the maximum output change rate; 1048576 (or $100000) specifies the filter gain. If
the filtered value were to be used as a master encoder, Ix05 would be set to $072C.
Setting up the Encoder Conversion Table
The encoder conversion table starts at address $720 (1824 decimal) in the PMAC memory. It can
continue through address $73F (1855 decimal). The active part of the table is ended by the first Y word
that is all zeros. The encoder table as shipped from the factory converts the eight incremental encoder
registers on the base PMAC board in locations $720 through $727 (1824 to 1831). Locations $728 and
$729 create time base information from the converted Encoder 4 register ($723). Y:$72A is zero, ending
the active part of the table.
Default Encoder Conversion Table
Address Y-Word Meaning
$720 (1824) $00C000 1/T conversion of Encoder 1
$721 (1825) $00C004 1/T conversion of Encoder 2
$722 (1826) $00C008 1/T conversion of Encoder 3
$723 (1827) $00C00C 1/T conversion of Encoder 4
$724 (1828) $00C010 1/T conversion of Encoder 5
$725 (1829) $00C014 1/T conversion of Encoder 6
$726 (1830) $00C018 1/T conversion of Encoder 7
$727 (1831) $00C01C 1/T conversion of Encoder 8
$728 (1832) $400723 Time-base from converted Enc. 4
$729 (1833) $000295 Time-base scale factor for above
$72A (1834) $000000 Signifies end-of-table