Trinamic 11-0011 TMCM-171 BLDC Output For 3-phase BLDC Motors 11-0011 数据表
产品代码
11-0011
TMCL Reference Manual
32
Trinamic Motion Control GmbH & Co KG
Sternstraße 67
D – 20357 Hamburg, Germany
http://www.trinamic.com
3.18 JC – Jump Conditional
Description: A conditional jump to a fixed address in the TMCL-program memory, if the specified condition is met.
The conditions refer to the result of a preceding comparison, e.g. by the COMP instruction. For stand-alone
operation only.
Internal function: the TMCL program counter is set to the passed value if the arithmetic status flags are in the
appropriate state(s).
Related commands: JA, COMP, WAIT, CLE
Mnemonic: JC <condition>, <label>
The conditions refer to the result of a preceding comparison, e.g. by the COMP instruction. For stand-alone
operation only.
Internal function: the TMCL program counter is set to the passed value if the arithmetic status flags are in the
appropriate state(s).
Related commands: JA, COMP, WAIT, CLE
Mnemonic: JC <condition>, <label>
where <condition>=ZE|NZ|EQ|NE|GT|GE|LT|LE|ETO|EAL|EDV|EPO
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
21
0 ZE - zero
1 NZ - not zero
2 EQ - equal
3 NE - not equal
4 GT - greater
5 GE - greater/equal
6 LT - lower
7 LE - lower/equal
8 ETO - time out error
9 EAL – external alarm
10 EDV – deviation error
11 EPO – position error
12 ESD – shutdown error
1 NZ - not zero
2 EQ - equal
3 NE - not equal
4 GT - greater
5 GE - greater/equal
6 LT - lower
7 LE - lower/equal
8 ETO - time out error
9 EAL – external alarm
10 EDV – deviation error
11 EPO – position error
12 ESD – shutdown error
(don't care)
<jump address>
EDV and EPO: TMCM-100 only.
EAL and ESD: not available with TMCM-300.
Example: Jump to address given by the label when the position of motor #2 is greater than or equal to 1000.
GAP 1, 2, 0
EAL and ESD: not available with TMCM-300.
Example: Jump to address given by the label when the position of motor #2 is greater than or equal to 1000.
GAP 1, 2, 0
//get axis parameter, type: no. 1 (actual position), motor: 2, value:0 (don't care)
COMP 1000
//compare actual value to 1000
JC GE, Label
//jump, type: 5 greater/equal
...
...
Label: ROL 0, 1000
Binary format of “JC GE, Label” when Label is at address 10:
...
Label: ROL 0, 1000
Binary format of “JC GE, Label” when Label is at address 10:
Byte Index
0
1
2
3
4
5
6
7
8
Function
Target-
address
address
Instruction
Number
Number
Type
Motor/
Bank
Bank
Operand
Byte3
Byte3
Operand
Byte2
Byte2
Operand
Byte1
Byte1
Operand
Byte0
Byte0
Checksum
Value (hex)
$01
$15
$05
$00
$00
$00
$00
$0a
$25
Note that the host address and the reply is only used to transfer this instruction to the TMCL program memory.
See the host-only control functions for details. It is not possible to use this command in direct mode.