TMCM-6212 TMCL
™
Firmware Manual • Firmware Version V1.11 | Document Revision V1.07 • 2019-JAN-25
74 / 140
3.6.36
CALCAV (Calculate using the Accumulator Register and a User Variable)
The CALCAV instruction modifies the accumulator register using an arithmetical operation and the contents
of a user variable. The parameters of this command are the arithmetic function and the index of a user
variable (0. . . 255).
This command is mainly intended for use in standalone mode.
Related commands:
CALCV, CALCAV, CALCVX, CALCXV, CALCVV.
Mnemonic:
CALCAV <operation>, <var>
Binary representation
Binary Representation
Instruction
Type
Motor/Bank
Value
42
0 ADD – add <var> to accumulator
0 <var> (0. . . 255)
0 (don’t care)
1 SUB – subtract <var> from accumulator
2 MUL – multiply accumulator with <var>
3 DIV – divide accumulator by <var>
4 MOD – modulo divide accumulator by <var>
5 AND – logical and accumulator with <var>
6 OR – logical or accumulator with <var>
7 XOR – logical exor accumulator with <var>
8 NOT – copy logical inverted <var> to accumulator
9 LOAD – copy <var> to accumulator
10 SWAP – swap contents of <var> and accumulator
11 COMP – compare accumulator with <var>
Reply in Direct Mode
Status
Value
100 - OK
the operand (don’t care)
Example
Subtract user variable #27 from accumulator.
Mnemonic:
CALCXV SUB, 27
©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at