![Trinamic PD57-1060 Скачать руководство пользователя страница 85](http://html1.mh-extra.com/html/trinamic/pd57-1060/pd57-1060_firmware-manual_1163104085.webp)
PD57/60-1060 / TMCM-1060 TMCL™ Firmware Manual (V1.04 / 2011-AUG-29)
85
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
5.7.32
VECT (set interrupt vector)
The VECT command defines an interrupt vector. It needs an interrupt number and a label as parameter (like
in JA, JC and CSUB commands).
This label must be the entry point of the interrupt handling routine.
Related commands:
EI, DI, RETI
Mnemonic:
VECT <interrupt number>, <label>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
37
<interrupt number>
don’t care
<label>
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
stallGuard2™
21
Deviation
27
Left stop switch
28
Right stop switch
39
Input change 0
40
Input change 1
Example:
Define interrupt vector at target position 500
VECT 3, 500
Binary format of VECT:
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
$25
$03
$00
$00
$00
$01
$F4
$1E