TMCM-1211 TMCL
™
Firmware Manual • Firmware Version V1.10 | Document Revision V1.00 • 2018-OCT-02
77 / 133
3.6.39
CALCVX (Calculate using a User Variable and the X Register)
The CALCVX instruction directly modifies a user variable using an arithmetical operation and the contents
of the X register. 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, CALCXV, CALCVV.
Mnemonic:
CALCVX <operation>, <var>
Binary representation
Binary Representation
Instruction
Type
Motor/Bank
Value
43
0 ADD – add X register to <var>
0 <var> (0. . . 255)
0 (don’t care)
1 SUB – subtract X register from <var>
2 MUL – multiply <var> with X register
3 DIV – divide <var> by X register
4 MOD – modulo divide <var> by X register
5 AND – logical and <var> with X register
6 OR – logical or <var> with X register
7 XOR – logical exor <var> with X register
8 NOT – copy logical inverted X register to <var>
9 LOAD – copy X register to <var>
10 SWAP – swap contents of <var> and X register
11 COMP – compare <var> with X register
Reply in Direct Mode
Status
Value
100 - OK
the operand (don’t care)
Example
Subtract X register from user variable #27.
Mnemonic:
CALCVX SUB, 27
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at