User`s manual
XP8000 Series (PLCBus
TM
)
Z-World 530-757-3737 16
The Stepper Motor Controller
Z-World’s stepper motor controller (XP8800) is a special pur-
pose expansion board. This document will use the abbreviation
SMC to refer to the stepper motor controller.
PCL-AK
PAL
PAL
Control Reg.
Quadrature Decoder & Counter
PLCBus connectors
H1
X1
U2 U3 U4 U5 U6
RN1
RN
J1
H2
H4
H3
H5
D1 D2
R1
R2
R3
RN3
RN4
D3 D4 D5 D6
U9
H6
U1
(U7)
Motor
Driver
Screw Terminals
U8
The SMC controls a single axis of motion. You can address up
to 16 SMCs on a single PLCBus. The virtue of the SMC is that
you can offload motor control operations, leaving your master
controller free to perform other tasks.
The motor driver (UCN5804) is capable of driving 1A per phase
and motor voltages up to 35V. The driver automatically gener-
ates the sequencing for 1-phase, 2-phase, and half-step opera-
tions. The SMC includes a 16-bit quadrature decoder/counter
(HCTL-2016) which can count at speeds up to 3 MHz.
System Description
The SMC board has three major components
1 PCL-AK pulse generator
2 UCN5804 motor driver
3 HCTL-2016 quadrature decoder / counter
Many of the SMC features are found in the programmable
PCL-AK pulse generator—the “brain” of the SMC.
• Continuous (i.e., manual), preset (i.e., counted), or origin-
seeking modes of operation.
• Switching between high- and low-speed operation, with or
without acceleration and deceleration.
• “Bidirectional” pulse output modes.
• Sensing of origin, end-limit, and slow-down signals.
• Interrupt generation.
• 13-bit (8191) step rate resolution. 18-bit (256K) counter.
• User-definable output speed range, up to 3 MHz.
• Single-phase, dual-phase, and half-step modes.
• 16-bit quadrature decoder / counter.
• Watchdog safety feature.
The SMC board has a control register (U3) and control logic
(U2, U4). You can choose to use or disregard some of the SMC
components. For example, you can replace the motor driver
with one of your own. The SMC can be used solely as a quadra-
ture counter by ignoring the PCL-AK and the motor driver. It
can even be used as a timer by ignoring or disabling its outputs.
Quadrature
Decoder / Counter
B
Control
(U2, U3, U4)
Watchdog
A
ORG SD– EL–
SD+ EL+
PCL-AK
Pulse Generator
interrupt request
data
Motor
Driver
A
Phase
Output
B
C
D
Expansion
Header
Pulse & Dir
Reset
data
8
8
Reset
PLC
Bus
8
control
byte
from external
quadrature encoder
2
2
mode:
1-phase
2-phase
half-step
from external sensors
SD: “slow down”
EL: “end limit”
ORG: origin
+ Positive direction
– Negative direction
PCL-AK
Pulse output from the PCL-AK is bidirectional. The /PULSE sig-
nal steps a motor. The PDIR signal specifies the direction of ro-
tation (1 means + direction, 0 means – direction).
The PCL-AK can sense external signals (such as “slow down,”
“end limit,” and “origin”) and can accelerate and decelerate
betwen high and low speed settings and can generate interrupt
requests on several conditions, such as end-of-operation. It can
stop immediately or decelerate to a stop. The PCL-AK can gen-
erate thousands of different pulse rates.
It has three basic modes of operation:
continuous mode The PCL-AK continues to generate pulses until
told to stop or an external signal occurs.
preset mode The PCL-AK generates pulses until its counter
(preset) reaches 0 or an external signal occurs.
origin mode The
PCL-AK generates pulses until an “origin”
pulse occurs.
This diagram shows the programmer’s view of the PCL-AK.
command &
data in
status and data
out
address
WR RD CS Reset
ORG
EL–
EL+
clock
SD–
SD+
INT
PDIR
PULSE
8
2
FL
FH
CTR
RD
MUL
ADR
Control
Registers
PCL
-
AK
Reg. Bits Meaning
CTR 18 Down-counter, which gives the number of pulses to
generate. This register is readable.
FL 13 Low speed register. The PCL-AK can operate at this
frequency or ramp to amd from this frequency.
FH 13 High speed register. The PCL-AK can operate at this
frequency or ramp to and from this frequency.
ADR 10 Acceleration / deceleration rate register.
RD 16 Ramp-down point register. The ramp-down point is the
number of pulses before end-of-count at which the
PCL-AK will start ramping down from high speed to
low speed. The register is readable.
MUL 10 Multiplier register. This register interacts with FL and
FH to give various pulse rates.