User manual
TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 36
www.trinamic.com
4.6.22 AAP (accumulator to axis parameter)
The content of the accumulator register is transferred to the specified axis 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.
Related commands: AGP, SAP, GAP, SGP, GGP, CALC, CALCX
Mnemonic: AAP <parameter number>, 0
Binary representation:
COMMAND
TYPE
MOT/BANK
VALUE
34
<parameter number>
0
<don't care>
Reply in direct mode:
STATUS
VALUE
100 – OK
don’t care
See chapter 5 for a complete list of axis parameters.
Example:
Positioning a motor by a potentiometer connected to analogue input #0:
Start: GIO 0, 1 // get value of analogue input line 0
CALC MUL, 4 // multiply by 4
AAP 0, 0 // transfer result to target position of motor 0
JA Start // jump back to start
Binary format of the AAP 0, 0 command:
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
$22
$00
$00
$00
$00
$00
$00