User's Manual

PMAC2 User Manual
60 Setting Up PMAC2 for Pulse-and-Direction Control
Encoder Decode Control: I9n0
I9n0 controls the source of the position feedback signal and how it is decoded. Values of 0 to 7 set up for
an external signal wired into PMAC, with the different values in this range determining how the signal is
decoded. One of these values should be used if you have a real feedback sensor; typically 3 or 7 for
'times-4' decode of a quadrature encoder signal.
A value of 8 selects the internally generated PFM signal, and automatically selects the pulse-and-direction
decode for the signal. Note that no external cable is required to feed back the PFM signal. If the pulse
train is modified externally to the PMAC2 to meet the limitations of a particular stepper drive, I9n0 must
be set to 0 or 4 to accept this external pulse-and-direction signal. If there has been no net inversion of the
direction signal, I9n0 will be set to 0. When using the Acc-8S stepper interface board, which does modify
the pulse train external to PMAC2 and feeds back the modified pulse train, I9n0 should be set to 0.
For an external feedback signal, the correct setting of I9n0 should cause the encoder counter to count up
in the direction you desire. It must also match the direction sense of the output; a positive command
value (for instance, with the O10 command) must cause the counter to count up, and a negative command
value (e.g. O-10) must cause the counter to count down. Invert the direction sense of the output with
I9n8, or by changing the wiring.
Parameters to Set Up Basic Motor Operation
Several motor I-variables must be set up properly to use the PFM signals properly. Most of these are
address registers. Typically motor 1 will use the circuits for axis interface 1, and so on, but this is not
absolutely required.
Activation and Mode: Ix00, Ix01
Ix00 must be 1 to activate the software for the motor, and Ix01 must be 0 to tell PMAC2 not to do the
commutation (the drive does the commutation in this mode).
Command Output Address: Ix02
Ix02 tells PMAC2 where to write the output command value for motor x. To use the PFM, the output
must be written to the C command register for the axis interface circuit of the proper number (the default
is to the A command register). The addresses of the C command registers for each of the eight main
channels and the two supplementary channels are shown in table 7-1.
Channel # Address Channel # Address
1 Y:$C004 5 Y:$C024
2 Y:$C00C 6 Y:$C02C
3 Y:$C014 7 Y:$C034
4 Y:$C01C 8 Y:$C03C
1* Y:$C094 2* Y:$C09C
Assuming that motor x uses axis interface channel x, the required values for Ix02 are:
Channel # Address Channel # Address
I102 $C004 I502 $C024
I202 $C00C I602 $C02C
I302 $C014 I702 $C034
I402 $C01C I802 $C03C
Encoder Conversion Table
The encoder conversion table does the initial processing of the real or simulated feedback registers. The
default conversion table in PMAC2 processes the eight main encoder channels, plus the two supplemental
encoder channels, with timer-based 1/T sub-count interpolation, in its first ten entries. These are the ideal
settings if real incremental encoder feedback is used.