Техническая Спецификация для Trinamic 11-0011 TMCM-171 BLDC Output For 3-phase BLDC Motors 11-0011
Модели
11-0011
TMCL Reference Manual
30
Trinamic Motion Control GmbH & Co KG
Sternstraße 67
D – 20357 Hamburg, Germany
http://www.trinamic.com
3.16 CALC – Calculate
Description: A value in the accumulator variable, previously read by a function such as GAP (get axis parameter),
can be modified with this instruction. Nine different arithmetic functions can be chosen and one constant operand
value must (in most cases) be specified. The result is written back to the accumulator, for further processing like
comparisons or data transfer.
Related commands: CALCX, COMP, JC, AAP, AGP, GAP, GGP, GIO
Mnemonic: CALC <op>, <value>
can be modified with this instruction. Nine different arithmetic functions can be chosen and one constant operand
value must (in most cases) be specified. The result is written back to the accumulator, for further processing like
comparisons or data transfer.
Related commands: CALCX, COMP, JC, AAP, AGP, GAP, GGP, GIO
Mnemonic: CALC <op>, <value>
where <op> is ADD, SUB, MUL, DIV, MOD, AND, OR, XOR, NOT or LOAD
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
19
0 ADD – add to accu
1 SUB – subtract from accu
2 MUL – multiply accu by
3 DIV – divide accu by
4 MOD – modulo divide by
5 AND – logical and accu with
6 OR – logical or accu with
7 XOR – logical exor accu with
8 NOT – logical invert accu
9 LOAD – load operand to accu
1 SUB – subtract from accu
2 MUL – multiply accu by
3 DIV – divide accu by
4 MOD – modulo divide by
5 AND – logical and accu with
6 OR – logical or accu with
7 XOR – logical exor accu with
8 NOT – logical invert accu
9 LOAD – load operand to accu
(don't care)
<operand>
Example: multiply accu by –5000
Mnemonic: CALC MUL, -5000
Binary:
Byte Index
0
1
2
3
4
5
6
7
8
Function
Target-
address
address
Instruction
Number
Number
Type
Motor/
Bank
Bank
Operand
Byte3
Byte3
Operand
Byte2
Byte2
Operand
Byte1
Byte1
Operand
Byte0
Byte0
Checksum
Value (hex)
$01
$13
$02
$00
$FF
$FF
$EC
$78
$78