
-
123
-
11-11-3.
Out
of
step
stepper
motor
detection
function
If
the
deflection
counter
value
controlled
by
the
motor
command
pulses
and
the
feed
back
pulses
from
an
encoder
on
a
stepper
motor
exceed
the
maximum
deflection
value,
the
LSI
will
declare
that
the
stepper
motor
is
out
of
step.
The
LSI
monitors
stepper
motor
operation
using
COUNTER3
(the
deflection
counter)
and
a
comparator.
The
process
which
takes
place
after
an
out
of
step
condition
is
detected
can
be
selected
from
the
table.
[Processing
method
to
use
when
the
comparator
conditions
are
satisfied].
For
this
function,
use
an
encoder
with
the
same
resolution
as
the
stepper
motor.
COUNTER3
(deflection)
can
be
cleared
by
writing
a
set
command
to
the
deflection
counter.
There
are
two
methods
for
inputting
a
feedback
signal:
Input
90
phase difference signals (1x, 2x, 4x) on
the
EA/EB
terminals,
input
two
sets
of
positive
and
negative
pulses.
If
both
EA
and
EB
signals
change
at
the
same
time,
the
LSI
will
treat
this
as
an
error
and
output
an
signal.
[Setting
example]
RENV4
=
00360000h:
Satisfy
the
conditions
of
Comparator
3
<
COUNTER3
(deflection)
Stop
immediately
when
the
conditions
are
satisfied.
RCMP3
=
32:
The
maximum
deflection
value
is
"32"
pulses.
RIRQ
=
00000400h:
Output
an
signal
when
the
conditions
for
Comparator
3
are
satisfied.
Specify
the
EA/EB
input
<Set
EIM0
to
1
(bits
20
&
21)
in
RENV2>
00:
90
phase difference, 1x
01:
90
phase difference, 2x
10:
90
phase difference, 4x
11:
2-pulse
mode
Specify
the
EA/EB
input
count
direction
<Set
EDIR
(bit
22)
in
RENV2>
0:
When
the
EA
phase
is
leading,
or
count
up
on
the
EA
rising
edge.
1:
When
the
EB
phase
is
leading,
or
count
up
on
the
EB
rising
edge
Read
the
EA/EB
input
error
<ESEE
(bit
16)
in
REST>
1:
An
EA/EB
input
error
has
occurred.
[RENV2]
(WRITE)
23
-
-
n
n
0
0
-
-
16
[RENV2]
(WRITE)
23
-
n
-
-
0
0
-
-
[REST]
(READ)
23
0
0
0
0
0
0
-
n
8
[Control
command]
22h
16
Counter
reset
command
<CUN3R:
Control
command>
Clear
COUNTER3
(deflection)
to
zero.