TMCM-6212 TMCL
™
Firmware Manual • Firmware Version V1.11 | Document Revision V1.07 • 2019-JAN-25
78 / 140
3.6.38
CALCXV (Calculate using the X Register and a User Variable)
The CALCXV instruction modifies the X 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, CALCVA, CALCVX, CALCVV.
Mnemonic:
CALCXV <operation>, <var>
Binary representation
Binary Representation
Instruction
Type
Motor/Bank
Value
44
0 ADD – add <var> to X register
0 <var> (0. . . 255)
0 (don’t care)
1 SUB – subtract <var> from X register
2 MUL – multiply X register with <var>
3 DIV – divide X register by <var>
4 MOD – modulo divide X register by <var>
5 AND – logical and X register with <var>
6 OR – logical or X register with <var>
7 XOR – logical exor X register with <var>
8 NOT – copy logical inverted <var> to X register
9 LOAD – copy <var> to X register
10 SWAP – swap contents of <var> and X register
11 COMP – compare X register with <var>
Reply in Direct Mode
Status
Value
100 - OK
the operand (don’t care)
Example
Subtract user variable #27 from X register.
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