User Manual

TMCM-3230 TMCL
Firmware Manual Firmware Version V1.07 | Document Revision V1.05 2017-OCT-10
55 / 103
3.6.26 CALCX (Calculate using the X Register)
This instruction is very similar to CALC, but the second operand comes from the X register. The X register
can be loaded with the LOAD or the SWAP type of this instruction. 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: CALC, COMP, JC, AAP, AGP, GAP, GGP, GIO.
Mnemonic: CALCX <operation>
Binary Representation
Instruction Type Motor/Bank Value
33 0 ADD add X register to accumulator 0 (dont care) 0 (dont care)
1 SUB subtract X register from accumulator
2 MUL multiply accumulator by X register
3 DIV divide accumulator by X register
4 MOD modulo divide accumulator by X register
5 AND logical and accumulator with X register
6 OR logical or accumulator with X register
7 XOR logical exor accumulator with X register
8 NOT logical invert X register
9 LOAD copy accumulator to X register
10 SWAP swap accumulator and X register
Reply in Direct Mode
Status Value
100 - OK dont care
Example
Multiply accumulator and X register.
Mnemonic: CALCX MUL
©2017 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com