TMCM-142 TMCL
TM
Firmware Manual (V1.06 / 2014-JUN-24)
69
Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG
6.7.19
JA (jump always)
Jump to a fixed address in the TMCL
TM
program memory. This command is intended for stand-alone
operation only.
Note that the host address and the reply is only used to transfer this instruction to the TMCL
TM
program
memory. This command cannot be used in direct mode.
Internal function:
the TMCL
TM
program counter is set to the passed value.
Related commands:
JC, WAIT, CSUB
Mnemonic:
JA <Label>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
22
(don't care)
(don't care)
<jump address>
Example:
An infinite loop in TMCL
TM
Loop:
MVP ABS, 0, 10000
WAIT POS, 0, 0
MVP ABS, 0, 0
WAIT POS, 0, 0
JA Loop
//Jump to the label “Loop”
Binary format of “JA Loop” assuming that the label “Loop” is at address 20:
Byte Index
0
1
2
3
4
5
6
7
8
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Checksum
Value (hex)
$01
$16
$00
$00
$00
$00
$00
$14
$2b