EasyManua.ls Logo

VELMEX VXM-1 - Getting Motor Position When Moving

VELMEX VXM-1
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
45
44
Getting Motor Position When Moving
Appendix E
It is possible to read motor position directly while motor is in motion using the “X” and “Y
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 “D” command. One use of this feature would be to stop the motor with
the decelerate-to-a-stop command (”D”) when an event has occurred. Then after waiting
for the move to end, (wait for “^”) and reading the position where deceleration started.
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 the “x” and “y” commands.
! Capture motor 1 and motor 2 positions into FIFO buffer (4 positions maximum.)
Use the “x” and “y” commands to retrieve buffer data after move(s) are complete.
NOTE: buffer data is automatically zeroed at the start of every run.
x Request captured motor 1 positions from FIFO buffer (all 4 positions.)
NOTE: buffer data is automatically zeroed at the start of every run.
+0000521
+0000919
+0001149
+0000000
Example:
This example shows the values the VXM returned when the “!” was sent at
positions 521,919, and 1149 while motor 1 was indexing.
y Request captured motor 2 positions from FIFO buffer (all 4 positions.)
NOTE: buffer data is automatically zeroed at the start of every run.
-0002004
+0000000
+0000000
+0000000
Example:
This example shows the values the VXM returned when the “!” was sent at
position negative 2004 while motor 2 was indexing.
See Also
X, Y, setIx