Trinamic TMCM-3314 Firmware Manual

Trinamic TMCM-3314 Firmware Manual

Tmcl module for stepper
Table of Contents

Advertisement

Quick Links

Module for Stepper
TMCM-3314 TMCL
Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25
The TMCM-3314 is a three axes controller/driver module for 2-phase bipolar stepper motors with
separate differential encoder and separate home and stop switch inputs for each axis. Dynamic
current control, and quiet, smooth and e
Step™, StallGuard™ and CoolStep™ features. The module offers four analog or digital inputs as
well as four digital outputs in combination with a break chopper unit.
Applications
• Laboratory Automation
• Manufacturing
• Semiconductor Handling
Simpli ed Block Diagram
TMCM-3314
RS485
CAN
µC
USB
(ARM)
Inputs
Outputs
©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at:
www.trinamic.com
Read entire documentation.
Firmware Manual
cient operation are combined with StealthChop™, Dc-
• Robotics
• Factory Automation
• Test & Measurement
EEPROM
I2C
TMC4361
SPI
A/B/N Encoder
Features
• 3-Axes Stepper Motor Control
• TMCL
• Linear ramps, S-shaped ramps and
SixPoint ramps selectable
• Closed Loop Encoder Support
• CoolStep™
• DcStep™
• StallGuard2™
• StealthChop™
• Life Science
• Biotechnology
• Liquid Handling
DC
DC
3x
MOSFET
TMC2130
Driver
Stage
+5V
+5V
+5V
HOME, REFL, REFR
MODULE
18..53V
E

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMCM-3314 and is the answer not in the manual?

Questions and answers

Summary of Contents for Trinamic TMCM-3314

  • Page 1 Firmware Manual Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 The TMCM-3314 is a three axes controller/driver module for 2-phase bipolar stepper motors with separate differential encoder and separate home and stop switch inputs for each axis. Dynamic current control, and quiet, smooth and e cient operation are combined with StealthChop™, Dc-...
  • Page 2: Table Of Contents

    ........56 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 3 ..........127 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 4 ..........144 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 5: Features

    Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 1 Features The TMCM-3314 is a triple axis controller/driver module for 2-phase bipolar stepper motors with state of the art feature set. It is highly integrated, offers a convenient handling and can be used in many decentralized applications.
  • Page 6: Stallguard2

    Efficiency with 50v torque reserve Efficiency Velocity [RPM] Figure 2: Energy E ciency Example with CoolStep ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 7: First Steps With Tmcl

    Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 2 First Steps with TMCL In this chapter you can nd some hints for your rst steps with the TMCM-3314 and TMCL. You may skip this chapter if you are already familiar with TMCL and the TMCL-IDE.
  • Page 8: Testing With A Simple Tmcl Program

    TMCL-IDE. Click the TMCL creator entry to open the TMCL creator. In the TMCL creator, type in the following little TMCL program: After you have done that, take the following steps: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 9 3. You can at any time pause the program, set or reset breakpoints and resume program execution. 4. To end the debug mode click the Bug icon again. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 10: Tmcl And The Tmcl-Ide An Introduction

    That is, a host computer (e.g. PC/PLC) acting as the interface bus master will send a com- mand to the TMCM-3314. The TMCL interpreter on the module will then interpret this command, do the initialization of the motion controller, read inputs and write outputs or whatever is necessary according to the speci ed command.
  • Page 11: Checksum Calculation

    8-bit addition. Here are two examples which show how to do this: Checksum calculation in C: Checksum calculation in Delphi: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 12: Reply Format

    Wrong type Invalid value Con guration EEPROM locked Command not available Table 4: TMCL Status Codes ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 13: Standalone Applications

    They will be assembled automatically into their binary representations. Afterwards this code can be downloaded into the module to be executed there. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 14: Tmcl Command Overview

    Enable interrupt <interrupt number> Disable interrupt WAIT <condition>, <motor number>, Wait with further program execution <ticks> ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 15 Rotate left, velocity speci ed by accu- mulator RORA <motor number> Rotate right, velocity speci ed by ac- cumulator ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 16: Tmcl Commands By Subject

    These commands can also be used in direct mode and in standalone mode. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 17: Branch Commands

    I/O Port Commands Mnemonic Command number Meaning Set output Get input Table 9: I/O Port Commands ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 18: Calculation Commands

    Each of these interrupts has its own interrupt vector. Each interrupt vector is identi ed by its interrupt number. Please use the TMCL include le Interrupts.inc in ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 19 On return from an interrupt handling routine (RETI command), the context of the normal program will automatically be restored and the execution of the normal program will be continued. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 20 Interrupts.inc. This le de nes symbolic constants for all interrupt numbers which can be used in all interrupt commands. The beginning of the program above then looks as follows: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 21: New Tmcl Commands

    This can save some code, thus making a TMCL program shorter, faster and easier to understand. Please note that these commands are not available on TMCM-3314 modules with rmware versions before 1.11. So please make sure that at least rmware version 1.11 is installed before using them.
  • Page 22: Detailed Tmcl Command Descriptions

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 23: Rol (Rotate Left)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 24: Mst (Motor Stop)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 25: Mvp (Move To Position)

    100 - OK don’t care Example Move motor 0 to position 90000. Mnemonic: MVP ABS, 0, 90000 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 26 Value (Byte 0) Checksum Example Move motor 0 to stored coordinate #8. Mnemonic: MVP COORD, 0, 8 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 27 COORD, $47, 2. • Move motors #0 and #2 to coordinate #5 without interpolation: MVP COORD, $85, 5. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 28: Sap (Set Axis Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 29: Gap (Get Axis Parameter)

    3.6.6 GAP (Get Axis Parameter) Most motion / driver related parameters of the TMCM-3314 can be adjusted using e.g. the SAP command. With the GAP parameter they can be read out. In standalone mode the requested value is also transferred to the accumulator register for further processing purposes (such as conditional jumps).
  • Page 30: Sgp (Set Global Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 31: Ggp (Get Global Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 32: Stgp (Store Global Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 33: Rsgp (Restore Global Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 34: Rfs (Reference Search)

    Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 3.6.11 RFS (Reference Search) The TMCM-3314 has a built-in reference search algorithm. The reference search algorithm provides different refrence search modes. This command starts or stops the built-in reference search algorithm.
  • Page 35 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 36: Sio (Set Output)

    Bank 2 – Digital Outputs The following output lines can be set by the SIO commands) using bank 2. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 37 The value <x> can also be -1. In this case, the value will be taken from the accumulator register. The following program can be used to copy the states of the input lines to the output lines: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 38: Gio (Get Input)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 39 0. . . 65535 GIO 2, 1 0. . . 65535 GIO 3, 1 0. . . 65535 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 40 To query the state of the ENABLE input use GIO 10, 0. The return value will be 0 when enabled and 1 when not enabled. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 41: Calc (Calculate)

    100 - OK the operand (don’t care) Example Multiply accumulator by -5000. Mnemonic: CALC MUL, -5000 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 42 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 43: Comp (Compare)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 44: Jc (Jump Conditional)

    Jump to the address given by the label when the position of motor #0 is greater than or equal to 1000. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 45 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 46: Ja (Jump Always)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 47: Csub (Call Subroutine)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 48: Rsub (Return From Subroutine)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 49: Wait (Wait For An Event To Occur)

    4 RFS – reference search completed <motor number> 0 for no timeout Example one tick is 10 milliseconds ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 50 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 51: Stop (Stop Tmcl Program Execution - End Of Tmcl Program)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 52: Sco (Set Coordinate)

    • SCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> to the EEPROM. The coordinate number must be a value between 1 and 20. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 53: Gco (Get Coordinate)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 54 • GCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> from the EEPROM to the RAM. The coordinate number must be a value between 1 and 20. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 55: Cco (Capture Coordinate)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 56: Aco (Accu To Coordinate)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 57: Calcx (Calculate Using The X Register)

    Status Value 100 - OK don’t care Example Multiply accumulator and X register. Mnemonic: CALCX MUL ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 58 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 59: Aap (Accu To Axis Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 60: Agp (Accu To Global Parameter)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 61: Cle (Clear Error Flags)

    Reply in Direct Mode Status Value 100 - OK don’t care Example Reset the timeout ag. Mnemonic: CLE ETO ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 62 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 63: Ei (Enable Interrupt)

    The EI command enables an interrupt. It needs the interrupt number as parameter. Interrupt number 255 globally enables interrupt processing. This command is mainly intended for use in standalone mode. Please see table for a list of interrupts that can be used on the TMCM-3314 module. Related commands: DI, VECT, RETI.
  • Page 64: Di (Disable Interrupt)

    The DI command disables an interrupt. It needs the interrupt number as parameter. Interrupt number 255 globally disables interrupt processing. This command is mainly intended for use in standalone mode. Please see table for a list of interrupts that can be used on the TMCM-3314 module. Related commands: EI, VECT, RETI.
  • Page 65: Vect (De Ne Interrupt Vector)

    Interrupt vectors can also be re-de ned. This command is intended for use in standalone mode only. Please see table for a list of interrupts that can be used on the TMCM-3314 module. Related commands: EI, DI, RETI.
  • Page 66 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 67: Reti (Return From Interrupt)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 68: Calcvv (Calculate Using Two User Variables)

    (don’t care) Example Subtract user variable #42 from user variable #65. Mnemonic: CALCVV SUB, 65, 42 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 69 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 70: Calcva (Calculate Using A User Variable And The Accumulator Register)

    100 - OK the operand (don’t care) Example Subtract accumulator from user variable #27. Mnemonic: CALCVA SUB, 27 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 71 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 72: Calcav (Calculate Using The Accumulator Register And A User Variable)

    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 www.trinamic.com...
  • Page 73 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 74: Calcvx (Calculate Using A User Variable And The X Register)

    (don’t care) Example Subtract X register from user variable #27. Mnemonic: CALCVX SUB, 27 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 75 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 76: Calcxv (Calculate Using The X Register And A User Variable)

    (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 www.trinamic.com...
  • Page 77 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 78: Calcv (Calculate Using A User Variable And A Direct Value)

    (don’t care) Example Subtract 5000 from user variable #27. Mnemonic: CALCV SUB, 27, 5000 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 79 Target address Status Instruction Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 80: Rst (Restart)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 81: Djnz (Decrement And Jump If Not Zero)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 82: Call (Conditional Subroutine Call)

    10 EDV - deviation error 11 EPO - position error Example Call a subroutine if a condition is met: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 83 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 84: Mvpa (Move To Position Speci Ed By Accumulator Register)

    Example Move motor 0 to position speci ed by accumulator. Mnemonic: MVPA ABS, 0 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 85 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 86: Rola (Rotate Left Using The Accumulator Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 87: Rora (Rotate Right Using The Accumulator Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 88: Mvpxa (Move To Position Speci Ed By Accumulator Register And X Register)

    Example Move motor speci ed by X register to position speci ed by accumulator. Mnemonic: MVPXA ABS ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 89 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 90: Rolxa (Rotate Left Using The Accumulator Register And X Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 91: Rorxa (Rotate Right Using The Accumulator Register And X Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 92: Mstx (Motor Stop Using X Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 93: Sapx (Set Axis Parameter, Axis Speci Ed By X Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 94: Gapx (Get Axis Parameter, Axis Speci Ed By X Register)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 95: Aapx (Accu To Axis Parameter, Axis Speci Ed By X Register)

    Value 100 - OK don’t care Example Loop over all motors, positon them at different speeds: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 96 Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 97: Siv (Set Indexed Variable)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 98: Giv (Get Indexed Variable)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 99: Aiv (Accumulator To Indexed Variable)

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 100: Customer Speci C Command Extensions (Uf0

    3.6.56 Customer speci c Command Extensions (UF0. . . UF7 – User Functions) These commands are used for customer speci c extensions of TMCL. They will be implemented in C by Trinamic. Please contact the sales department of Trinamic Motion Control GmbH & Co KG if you need a customized TMCL rmware.
  • Page 101: Request Target Position Reached Event

    Instruction number Type Motor/Bank Value (Byte 3) Value (Byte 2) Value (Byte 1) Value (Byte 0) Checksum ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 102 Value (Byte 1) Value (Byte 0) Motor bit mask Checksum depends also on motor bit mask ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 103: Tmcl Control Commands

    0 (don’t care) address the speci ed memory loca- program memory tion location (special reply format). ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 104 Especially the commands 128, 129, 131, 136 and 255 are interesting for use in custom host applications. The other control commands are mainly being used by the TMCL-IDE. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 105: Axis Parameters

    Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 4 Axis Parameters Most motor controller features of the TMCM-3314 module are controlled by axis parameters. Axis parameters can be modi ed or read using SAP, GAP and AAP commands. This chapter describes all axis parameters that can be used on the TMCM-3314 module.
  • Page 106 Bow 4 Decreasing of the absolute deceleration value 0. . . for S-shaped ramps. 2147483647 [pps ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 107 Maximum commutation angle that can be used 0. . . 511 to compensate for an evaluated position devia- tion. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 108 Start position command: 0. . . 2 positioning last target position option actual position encoder position ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 109 Selection of the chopper mode: mode 0 – spread cycle 1 – classic constant off time ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 110 Hysteresis: ([AP 172] + 1) 32 Upper StallGuard threshold: ([AP 172]+[AP 170]+ 1) 32 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 111 0: chopper sync function chopSync off 1. . . 15: chopper synchronization ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 112 0 - User de ned PWM amplitude. The current settings do not have any in uence. 1 - Enable automatic current control. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 113 . . . 2147483647 position nel event. [µsteps] ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 114 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 115 Setting the group index to 0 (default) turns off this feature for the motor. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 116 Use axis parameter #210 to reverse the encoder counting direction. Table 15: All Axis Parameters of the TMCM-3314 Module ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 117: Global Parameters

    • Some con gurations of the interface (for example baud rates that are not supported by the PC) may leed to the fact that the module cannot be reached any more. In such a case please see the TMCM-3314 Hardware Manual on how to reset all parameters to factory default settings.
  • Page 118 ™ 118 / 144 TMCM-3314 TMCL Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25 All Global Parameters of the TMCM-3314 Module in Bank 0 Number Global Parameter Description Range [Units] Access 9600 Default 14400 19200 28800...
  • Page 119 1 - download mode TMCL program Contains the address of the currently exe- counter cuted TMCL command. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 120: Bank 1

    GAP, GGP and GIO commands. Table 17: All Global Parameters of the TMCM-3314 Module in Bank 0 5.2 Bank 1 The global parameter bank 1 is normally not available. It may be used for customer speci c extensions of the rmware.
  • Page 121 0=off, 1=low-high, 2=high-low, 3=both 0. . . 3 transition Table 19: Interrupt Parameters in Bank 3 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...
  • Page 122: Hints And Tips

    The drawings in the following subsections show how each reference search mode works. A linear stage with two end points and a moving slider is used as example. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 123: Mode 1

    Add 64 to the mode number (i.e. set axis parameter #193 to 67) to search the left end switch rst and then use the middle of the right end switch as the zero point. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 124: Mode 5

    Add 128 to the mode number (i.e. set axis parameter #193 to 133) to reverse the polarity of the home switch input. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 125: Mode 7

    Add 128 to the mode number (i.e. set axis parameter #193 to 135) to reverse the polarity of the home switch input. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 126 : reference search speed (axis parameter 194) : reference switch speed (axis parameter 195) Figure 10: Reference Search Mode 8 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 127: Using Encoders

    Axis parameter #212 controls this function. 6.3 Closed-Loop Operation Together with an external ABN encoder it is possible to operate each axis of the TMCM-3314 as a closed- loop stepper system. Before enabling this feature, some parameters have to be set. The following example TMCL program shows how to do this.
  • Page 128: Closed-Loop Parameters

    The closed-loop operation of the TMCM-3314 is based on Trinamic’s closed-loop hardware motion controller IC TMC4361. The 2-phase closed-loop control of the TMCM-3314 follows a different approach than PID control cascades to consider stepper motor driver characteristics. The ramp generator which assigns target and velocity is independent of the position control (commutation angle control) which is also independent of the current control.
  • Page 129: Load Angle Control

    Figure 12: Load Angle Control Parameter 6.3.3 Current Level Control Parallel to the load angle control the TMCM-3314 controls the motor current level (current vector ampli- tude) depending on the load angle to save energy during no or light load. Figure gives an overview of the current control parameters.
  • Page 130: Field Weakening

    6.3.4 Field Weakening With every stepper motor the TMCM-3314 will reach a velocity where it is not possible to maintain the target motor current due to the motor back EMF. Above this velocity load angle (SAP 111, default 90°) and current level control will reach their maximum.
  • Page 131: Position Catch Up

    If the target trapezoidal ramp cannot be maintained due to high load peaks the TMCM-3314 includes a special position catch-up mode to ensure that the position will still be reached in time if possible.
  • Page 132 Stall detection can for example be used for nding the reference point without the need for reference switches. A short routine written in TMCL is needed to use StallGuard for reference searching. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 133: Coolstep

    The lower threshold of the coolStep™ current can be adjusted up to I6/4. Refer to parameter 168. Figure 16: CoolStep Adjustment Points and Thresholds ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 134 The stan- dard value is 200 (which means 2000msec). Table 21: CoolStep Adjustment Points and Thresholds ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 135: Velocity And Acceleration Calculation

    When the unit mode (axis parameter #255) is set to 1 (which is also the default value), all velocity parameters on the TMCM-3314 are given in microsteps per second (also called pulse per second or pps). Acceleration and deceleration units are given in pps When axis parameter #255 is set to 0 the internal units of the ramp generators are directly used.
  • Page 136: Tmcl Programming Techniques And Structure

    The TMCL-IDE provides an include le with symbolic names for all important axis parameters and global parameters. Please consider the following example: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 137: Using Variables

    The host can also poll a variable using GGP in direct mode and see if it has been changed by the TMCL program. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 138: Using Subroutines

    TMCL routines are changed (so when changing the TMCL routines the host program does not have to be changed). Example: ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 139: Make The Tmcl Program Start Automatically

    • Use the Autostart entry in the TMCL menu of the TMCL Creator in the TMCL-IDE. Go to the Autostart entry in the TMCL menu and select "’On"’. ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved.
  • Page 140: Figures Index

    Thresholds ....133 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 141: Tables Index

    ... . 144 14 TMCL Control Commands ..104 ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at...
  • Page 142: Supplemental Directives

    10.5 Disclaimer: Life Support Systems TRINAMIC Motion Control GmbH & Co. KG does not authorize or warrant any of its products for use in life support systems, without the speci c written consent of TRINAMIC Motion Control GmbH & Co. KG.
  • Page 143: Collateral Documents & Tools

    In particular, this also applies to the stated possible applications or areas of applications of the product. TRINAMIC products are not designed for and must not be used in connection with any applications where the failure of such products would reasonably be expected to result in signi cant personal injury or death (safety-Critical Applications) without TRINAMIC’s speci c written consent.
  • Page 144: Revision History

    1.09 Description of axis parameter #123 added. 1.10 2019-JAN-25 Firmware V1.11 included. Table 23: Document Revision ©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com...

Table of Contents