User manual

TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 18
www.trinamic.com
4.6.4 MVP (move to position)
The motor will be instructed to move to a specified relative or absolute position. It uses the
acceleration/deceleration ramp and the positioning speed programmed into the unit. This command is non-
blocking (like all commands). A reply will be sent immediately after command interpretation. Further
commands may follow without waiting for the motor reaching its end position. The maximum velocity and
acceleration are defined by axis parameters #4 and #11.
TWO OPERATION TYPES ARE AVAILABLE:
- Moving to an absolute position in the range from -2147483648… +2147483647.
- Starting a relative movement by means of an offset to the actual position. In this case, the new
resulting position value must not exceed the above mentioned limits, too.
Internal function: A new position value is transferred to the axis parameter #0 target position.
Related commands: SAP, GAP, and MST
Mnemonic: MVP <ABS|REL>, 0, <position|offset value>
Binary representation:
COMMAND
TYPE
MOT/BANK
VALUE
4
0 ABS absolute
0
<position>
-2147483648…
+2147483647
1 REL relative
0
<offset>
-2147483648…
+2147483647
Reply in direct mode:
STATUS
COMMAND
VALUE
100 OK
4
don’t care
Example MVP ABS:
Move motor to (absolute) position 9000
Mnemonic: MVP ABS, 0, 9000
Binary:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$04
$00
$00
$00
$00
$23
$28
Example MVP REL:
Move motor from current position 1000 steps backward (move relative -1000)
Mnemonic: MVP REL, 0, -1000
Binary:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$00
$04
$01
$00
$ff
$ff
$fc
$18