User manual

TMCM-1161 TMCL Firmware V1.19 Manual (Rev. 1.04 / 2012-NOV-19) 42
www.trinamic.com
3.5.21 RSUB (return from subroutine)
Return from a subroutine to the command after the CSUB command. This command is intended for use in
standalone mode only.
The host address and the reply are only used to take the instruction to the TMCL program memory
while the program loads down. This command cannot be used in direct mode.
Internal function: The TMCL program counter is set to the last value of the stack. The command will be
ignored if the stack is empty.
Related command: CSUB
Mnemonic: RSUB
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
24
(don't care)
(don't care)
(don't care)
Example: please see the CSUB example (section 3.5.20).
Binary format of RSUB:
Byte Index
0
2
3
4
5
6
7
Function
Target-
address
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$00
$00
$00
$00
$00
$00