TMCM-1021 TMCL
™
Firmware Manual • Firmware Version V1.42 | Document Revision V1.10 • 2018-JAN-09
20 / 109
in the accumulator. The X register can be used as an additional memory when doing calculations. It can be
loaded from the accumulator.
When a command that reads a value is executed in direct mode the accumulator will not be affected.
This means that while a TMCL program is running on the module (standalone mode), a host can still
send commands like GAP and GGP to the module (e.g. to query the actual position of the motor) without
affecting the flow of the TMCL program running on the module.
3.6.6
Interrupt Processing Commands
TMCL also contains functions for a simple way of interrupt processing. Using interrupts, many tasks can
be programmed in an easier way.
The following commands are use to define and handle interrupts:
Interrupt Processing Commands
Mnemonic
Command number
Meaning
EI
25
Enable interrupt
DI
26
Disable interrupt
VECT
37
Set interrupt vector
RETI
38
Return from interrupt
Table 11: Interrupt Processing Commands
3.6.6.1
Interrupt Types
There are many different interrupts in TMCL, like timer interrupts, stop switch interrupts, position reached
interrupts, and input pin change interrupts. Each of these interrupts has its own interrupt vector. Each
interrupt vector is identified by its interrupt number. Please use the TMCL include file Interrupts.inc in
order to have symbolic constants for the interrupt numbers. Table
show all interrupts that are available
on the TMCM-1021.
Interrupt Vectors
Interrupt number
Interrupt type
0
Timer 0
1
Timer 1
2
Timer 2
3
Target position reached 0
15
stallGuard axis 0
21
Deviation axis 0
27
Left stop switch 0
28
Right stop switch 0
39
Input change 0
40
Input change 1
41
Input change 2
42
Input change 3
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at