User manual

TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 37
www.trinamic.com
4.6.23 AGP (accumulator to global parameter)
The content of the accumulator register is transferred to the specified global parameter. For practical use,
the accumulator has to be loaded e.g. by a preceding GAP instruction. The accumulator may have been
modified by the CALC or CALCX (calculate) instruction.
- Note that the global parameters in bank 0 are mostly EEPROM-only and thus should not be modified
automatically by a standalone application.
- See chapter 6 for a complete list of global parameters.
Related commands: AAP, SGP, GGP, SAP, GAP
Mnemonic: AGP <parameter number>, <bank number>
Binary representation:
COMMAND
TYPE
MOT/BANK
VALUE
35
<parameter number>
<bank number>
don’t care
Reply in direct mode:
STATUS
VALUE
100 OK
don’t care
Example:
Copy accumulator to TMCL user variable #3
Mnemonic: AGP 3, 2
Binary:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$23
$03
$02
$00
$00
$00
$00
4.6.24 Customer Specific TMCL Command Extension (user functions 0… 7)
The user definable functions UF0… UF7 are predefined functions without topic for user specific purposes. A
user function UF command uses three parameters. Please contact TRINAMIC for a customer specific
programming.
Internal function: Call user specific functions implemented in C by TRINAMIC.
Related commands: none
Mnemonic: UF0 UF7 <parameter number>
Binary representation:
COMMAND
TYPE
MOT/BANK
VALUE
64… 71
user defined
user defined
user defined
Reply in direct mode:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Target-
address
Status
Instructio
n
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$02
$01
user
defined
64… 71
user
defined
user
defined
user
defined
user
defined