TMCL™ Firmware Manual - Trinamic
TMCL™ Firmware Manual - Trinamic
TMCL™ Firmware Manual - Trinamic
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PD-109-57 V2 TMCL <strong>Firmware</strong> <strong>Manual</strong> (V1.00/2010-FEB-18) 18<br />
6.4.5 Calculation commands<br />
These commands are intended to be used for calculations within TMCL applications. Although they could<br />
also be used in direct mode it does not make much sense to do so.<br />
Mnemonic Command<br />
number<br />
Meaning<br />
CALC 19 Calculate using the accumulator and a<br />
constant value<br />
CALCX 33 Calculate using the accumulator and the<br />
X register<br />
AAP 34 Copy accumulator to an axis parameter<br />
AGP 35 Copy accumulator to a global parameter<br />
For calculating purposes there is an accumulator (or accu or A register) and an X register. When executed in<br />
a TMCL program (in stand-alone mode), all TMCL commands that read a value store the result in the<br />
accumulator. The X register can be used as an additional memory when doing calculations. It can be loaded<br />
from the accumulator.<br />
When a command that reads a value is executed in direct mode the accumulator will not be affected. This<br />
means that while a TMCL program is running on the module (stand-alone mode), a host can still send<br />
commands like GAP, GGP or GIO to the module (e.g. to query the actual position of the motor) without<br />
affecting the flow of the TMCL program running on the module.<br />
Copyright © 2010, TRINAMIC Motion Control GmbH & Co. KG