TMCM-3314 TMCL
™
Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25
41 / 144
3.6.14
CALC (Calculate)
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 be specified. The result is written back to the accumulator, for further processing like
comparisons or data transfer.
This command is mainly intended for use in standalone mode.
Related commands:
CALCX, COMP, AAP, AGP, GAP, GGP, GIO.
Mnemonic:
CALC <operation>, <operand>
Binary representation
Binary Representation
Instruction
Type
Motor/Bank
Value
19
0 ADD – add to accumulator
0 (don’t care)
<operand>
1 SUB – subtract from accumulator
2 MUL – multiply accumulator by
3 DIV – divide accumulator by
4 MOD – modulo divide accumulator by
5 AND – logical and accumulator with
6 OR – logical or accumulator with
7 XOR – logical exor accumulator with
8 NOT – logical invert accumulator
9 LOAD – load operand into accumulator
Reply in Direct Mode
Status
Value
100 - OK
the operand (don’t care)
Example
Multiply accumulator by -5000.
Mnemonic:
CALC MUL, -5000
©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at