User manual

TMCM-1180 and PD86-1180 TMCL Firmware V4.42 Manual (Rev. 1.08 / 2012-NOV-20) 84
www.trinamic.com
5.7.34 DI (disable interrupt)
The DI command disables an interrupt. It needs the interrupt number as parameter. Interrupt number 255
globally disables interrupts.
Related command: EI, VECT, RETI
Mnemonic: DI <interrupt number>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
26
<interrupt number>
(don't care)
(don't care)
The following table shows all interrupt vectors that can be used:
Interrupt number
Interrupt type
0
Timer 0
1
Timer 1
2
Timer 2
3
Target position reached
15
stallGuard™
21
Deviation
27
Left stop switch
28
Right stop switch
39
Input change 0
40
Input change 1
255
Global interrupts
Examples:
Disable interrupts globally
DI, 255
Binary format of DI:
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
$1A
$FF
$00
$00
$00
$00
$00
$1A
Disable interrupt when target position reached
DI, 3
Binary format of DI:
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
$1A
$03
$00
$00
$00
$00
$00
$1E