![VELMEX VXM-3 User Manual Download Page 43](http://html1.mh-extra.com/html/velmex/vxm-3/vxm-3_user-manual_3923815043.webp)
4
Appendix E
Getting Motor Position When Moving
It
is
possible
to
read
motor
position
directly
while
motor
is
in
motion
using
the
;
DQG
<
commands.
At
high
motor
speeds
it
might
not
be
timely
or
accurate
enough
to
transfer
motor
position
over
the
serial
port
while
the
motor
is
in
motion.
Another
approach
is
to
use
an
external
trigger
to
tell
the
VXM
to
capture
motor
position(s)
for
later
retrieval
(after
motion
has
ended.)
The
Automatic Deceleration Capture
Every
time
the
motor
starts
to
decelerate
to
a
stop
the
motor
position
is
saved
for
later
retrieval
with
the
“
”
command.
One
use
of
this
feature
would
be
to
stop
the
motor
with
the
decelerate-to-a-stop
command
(”
”)
when
an
event
has
occurred.
Then
after
waiting
for
the
move
to
end,
(wait
for
“^”)
and
reading
the
position
where
deceleration
started.
D
D
D
(Asterisk)
Request
motor
position
when
the
last
deceleration
occurred.
This
position
can
be
from
a
normal
index
decelerating
to
a
stop,
or
an
interrupted
index
from
a
"
D
"
(Decelerate
to
a
stop)
command
or
Stop
input/button
(User
input
4.)
Below
is
what
the
host
would
receive
if
the
last
motor
indexing
started
it’s
deceleration
at
position
negative
14901.
-0014901
<cr>
!
The Triggered Position Capture
The
VXM
can
capture
motor
1
and
motor
2
position(s)
either
by
the
host
sending
a
“
!
”
or
from
a
pulse
on
input
4
(see
Appendix
C.)
Up
to
4
positions
will
be
recorded
(one
for
each
trigger
input.)
Then
after
waiting
for
the
move
to
end,
(wait
for
“^”)
the
positions
can
be
requested
with
t
KH
;
DQG
<
FRPPDQGV
Capture
motor
1
and
motor
2
positions
into
FIFO
buffer
(4
positions
maximum.)
8VHWKH;DQG<
commands
to
retrieve
buffer
data
after
move(s)
are
complete.
buffer
data
is
automatically
zeroed
at
the
start
of
every
run.
NOTE:
See
Also
X,
Y, setIx