User manual
TMCM-1180 and PD86-1180 TMCL Firmware V4.42 Manual (Rev. 1.08 / 2012-NOV-20) 46
www.trinamic.com
Global parameters of bank 2, which can be used for SGP:
Bank 2 contains general purpose 32 bit variables for the use in TMCL™ applications. They are located in RAM
and can be stored to EEPROM. After booting, their values are automatically restored to the RAM.
Number
Global parameter
Description
Range
0
general purpose variable #0
for use in TMCL™ applications
-2
31
… +2
31
1
general purpose variable #1
for use in TMCL™ applications
-2
31
… +2
31
2
general purpose variable #2
for use in TMCL™ applications
-2
31
… +2
31
3
general purpose variable #3
for use in TMCL™ applications
-2
31
… +2
31
4
general purpose variable #4
for use in TMCL™ applications
-2
31
… +2
31
5
general purpose variable #5
for use in TMCL™ applications
-2
31
… +2
31
6
general purpose variable #6
for use in TMCL™ applications
-2
31
… +2
31
7
general purpose variable #7
for use in TMCL™ applications
-2
31
… +2
31
8
general purpose variable #8
for use in TMCL™ applications
-2
31
… +2
31
9
general purpose variable #9
for use in TMCL™ applications
-2
31
… +2
31
10
general purpose variable #10
for use in TMCL™ applications
-2
31
… +2
31
11
general purpose variable #11
for use in TMCL™ applications
-2
31
… +2
31
12
general purpose variable #12
for use in TMCL™ applications
-2
31
… +2
31
13
general purpose variable #13
for use in TMCL™ applications
-2
31
… +2
31
14
general purpose variable #14
for use in TMCL™ applications
-2
31
… +2
31
15
general purpose variable #15
for use in TMCL™ applications
-2
31
… +2
31
16
general purpose variable #16
for use in TMCL™ applications
-2
31
… +2
31
17
general purpose variable #17
for use in TMCL™ applications
-2
31
… +2
31
18
general purpose variable #18
for use in TMCL™ applications
-2
31
… +2
31
19
general purpose variable #19
for use in TMCL™ applications
-2
31
… +2
31
20… 55
general purpose variables #20…
#55
for use in TMCL™ applications
-2
31
… +2
31
Global parameters of bank 3, which can be used for SGP:
Bank 3 contains interrupt parameters. Some interrupts need configuration (e.g. the timer interval of a timer
interrupt). This can be done using the SGP commands with parameter bank 3 (SGP <type>, 3, <value>). The
priority of an interrupt depends on its number. Interrupts with a lower number have a higher priority.
The following table shows all interrupt parameters that can be set.
Number
Global parameter
Description
Range
0
Timer 0 period (ms)
Time between two interrupts (ms)
32 bit unsigned
[ms]
1
Timer 1 period (ms)
Time between two interrupts (ms)
32 bit unsigned
[ms]
2
Timer 2 period (ms)
Time between two interrupts (ms)
32 bit unsigned
[ms]
39
Input 0 edge type
0=off, 1=low-high, 2=high-low, 3=both
0… 3
40
Input 1 edge type
0=off, 1=low-high, 2=high-low, 3=both
0… 3
Example:
Set the serial address of the target device to 3
Mnemonic: SGP 66, 0, 3
Binary:
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
$09
$42
$00
$00
$00
$00
$03
$4f