Controller/driver module up to 10a rms/12...48v dc can, rs232/rs485 optional, mechatronic device with 57 mm bldc servo motor up to 10a rms/12...48v dc can, rs232/rs485 optional incremental encoder hall sensors (18 pages)
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Table of Contents Features ................................... 4 Putting the TMCM-1311 into Operation ......................... 6 Connecting the TMCM-1311 ..........................6 Finding Optimum Settings with Parameterization Tool ................9 Using the TMCL-IDE to Develop Programs ....................11 3.3.1...
Page 3
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.24 SCO (set coordinate) ........................... 51 5.7.25 GCO (get coordinate) ..........................52 5.7.26 CCO (capture coordinate) .......................... 53 5.7.27 ACO (accu to coordinate) .......................... 54 5.7.28 CALCX (calculate using the X register) ....................55 5.7.29 AAP (accumulator to axis parameter) ....................
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Features The TMCM-1311 is a single axis stepper motor controller and driver standalone board with USB, CAN and RS485 interface. It supports motor currents up to 3A RMS and supply voltages up to 48V nominal. The module offers inputs for an incremental a/b/n (TTL, open-collector, and differential inputs) encoder.
Page 5
EATURES LOSED The TMCM-1311 is mainly designed to run 2-phase stepper motors in closed loop mode. It offers an automatic motor load adaption in positioning mode, velocity mode, and torque mode, which is based on encoder feedback and closed loop control software for analysis, error detection and error correction.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Putting the TMCM-1311 into Operation Here you can find basic information for putting your TMCM-1311 into operation. If you are already common with TRINAMICs modules you may skip this chapter. HE THINGS YOU NEED ...
Page 7
Differential RS485 bus signal (inverting) Power (GND) Signal and system ground RS485+ Bi-directional Differential RS485 bus signal (non-inverting) c) USB interface For using USB interface download and install the file TMCM-1311.inf (www.trinamic.com). Label Direction Description VBUS Power +5V supply from Host...
Page 8
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Connect the encoder (optional - for closed loop operation) Label Direction Description Power (GND) Signal and system ground Power +5V output for external circuit (supply output) Encoder channel A+ input Input...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 3.2 Finding Optimum Settings with Parameterization Tool Evaluating best parameter values for the TMCM-1311 with the TMCM-1310/1311-GUI software tool is quite easy. The TMCM-1310/1311-GUI is available on www.trinamic.com. After connecting the module as described in chapter 3.1, start the TMCM-1310/1311-GUI with a double click.
Page 10
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) UICKSTART Using the default values of the TMCM-1311, it is possible to proceed with a quickstart. This way, you can check how the module drives your specific stepper motor using these default values. Calibrate them after first tests to find optimum values.
Choose COM port and type with the parameters shown in Figure 3.6 (baud rate 9600). Click OK. USB interface If the file TMCM-1311.inf is installed correctly, the module will be identified automatically. Figure 3.6 Setup dialogue and connection tab of the TMCL-IDE.
Using TMCL Direct Mode Start TMCL Direct Mode. Direct Mode If the communication is established the TMCM-1311 will be detected automatically. If the module should not be detected, please check all points above (cables, interface, power supply, COM port, baud rate).
Download Click the Assemble icon to convert the TMCL program into binary code. Then download the program to the TMCM-1311 module by clicking the Download icon. Click the Run icon. The desired program will be executed. Click the Stop button to stop the program.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 3.4 Important Motor Settings There are some axis parameters which have to be adjusted right in the beginning after installing your module. Please set the upper limiting values for the speed (axis parameter 4), the acceleration (axis parameter 5), and the current (axis parameter 6).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) TMCL and the TMCL-IDE: Introduction The software running on the microprocessor of the TMCM-1311 consists of two parts, a boot loader and the firmware itself. Whereas the boot loader is installed during production and testing at TRINAMIC and remains untouched throughout the whole lifetime, the firmware can be updated by the user.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 4.1.1 Checksum Calculation As mentioned above, the checksum is calculated by adding up all bytes (including the module address byte) using 8-bit addition. Here are two examples to show how to do this: ...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 4.2.1 Status Codes The reply contains a status code. The status code can have one of the following values: Code Meaning Successfully executed, no error Command loaded into TMCL program EEPROM...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 4.4 The ASCII Interface There is also an ASCII interface that can be used to communicate with the module and to send some commands as text strings. ASCII NTERING AND LEAVING MODE ...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 4.4.4 Configuring the ASCII Interface The module can be configured so that it starts up either in binary mode or in ASCII mode. Global parameter 67 is used for this purpose (please see also chapter 10.1).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) TMCL Commands In this section a short overview of the TMCL commands is given. 5.1 Motion Commands These commands control the motion of the motor. They are the most important commands and can be used in direct mode or in standalone mode.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.5 Calculation Commands These commands are intended to be used for calculations within TMCL applications. Although they could also be used in direct mode it does not make much sense to do so.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.6.3 Interrupt Vectors: The following table shows all interrupt vectors that can be used. Interrupt number Interrupt type Timer 0 Timer 1 Timer 2 Target position reached stallGuard2 Deviation Left stop switch...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) SIO 0, 2, 0 //switch OUT0 low RETI //end of interrupt In this example the interrupt numbers are used directly. To make the program better readable use the provided include file Interrupts.inc. This file defines symbolic constants for all interrupt numbers which can be used in all interrupt commands.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7 Commands The module specific commands are explained in more detail on the following pages. They are listed according to their command number. 5.7.1 ROR (rotate right) With this command the motor will be instructed to rotate with a specified velocity in positive direction (increasing the position counter).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.2 ROL (rotate left) With this command the motor will be instructed to rotate with a specified velocity in positive direction (increasing the position counter). Like on all other TMCL modules, the motor will be accelerated or decelerated to the speed given with the command.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.3 MST (motor stop) The motor will be instructed to stop. Internal function: the axis parameter target velocity is set to zero. Related commands: ROL, ROR, SAP, GAP Mnemonic: MST 0 Binary representation: INSTRUCTION NO.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.4 MVP (move to position) The motor will be instructed to move to a specified relative or absolute position or a pre-programmed coordinate. It will use the acceleration/deceleration ramp and the positioning speed programmed into the unit.
Page 28
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Example: Move motor 0 to (absolute) position 90000 Mnemonic: MVP ABS, 0, 9000 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand address Number Bank Byte3 Byte2 Byte1...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.5 SAP (set axis parameter) With this command most of the motion control parameters can be specified. The settings will be stored in SRAM and therefore are volatile. That is, information will be lost after power off. Please use command STAP (store axis parameter) in order to store any setting permanently.
5.7.6 GAP (get axis parameter) Most parameters of the TMCM-1311 can be adjusted individually for the axis. With this 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 conditioned jumps). In direct mode the value read is only output in the value field of the reply (without affecting the accumulator).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.7 STAP (store axis parameter) An axis parameter previously set with a Set Axis Parameter command (SAP) will be stored permanent. Most parameters are automatically restored after power up. Internal function: an axis parameter value stored in SRAM will be transferred to EEPROM and loaded from EEPORM after next power up.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.8 RSAP (restore axis parameter) For all configuration-related axis parameters non-volatile memory locations are provided. By default, most parameters are automatically restored after power up. A single parameter that has been changed before can be reset by this instruction also.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.9 SGP (set global parameter) With this command most of the module specific parameters not directly related to motion control can be specified and the TMCL user variables can be changed. Global parameters are related to the host interface, peripherals or application specific variables.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.10 GGP (get global parameter) All global parameters can be read with this function. Global parameters are related to the host interface, peripherals or application specific variables. The different groups of these parameters are organized in banks to allow a larger total number for future products.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.11 STGP (store global parameter) This command is used to store TMCL user variables permanently in the EEPROM of the module. Some global parameters are located in RAM memory, so without storing modifications are lost at power down. This instruction enables enduring storing.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.12 RSGP (restore global parameter) With this command the contents of a TMCL user variable can be restored from the EEPROM. For all configuration-related axis parameters, non-volatile memory locations are provided. By default, most parameters are automatically restored after power up.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.13 RFS (reference search) The TMCM-1311 has a built-in reference search algorithm which can be used. The reference search algorithm provides switching point calibration and three switch modes. The status of the reference search can also be queried to see if it has already finished.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.14 SIO (set input / output) SIO sets the status of the general digital output either to low (0) or to high (1). Bank 2 is used for this purpose. Internal function: the passed value is transferred to the specified output line.
Page 39
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) VERVIEW OF CONNECTORS IN/OUT 0 IN/OUT 1 Direction Description Power (GND) Power Connected to V of Power connector DIGITAL (supply output) Dedicated analog input, AIN0 AIN4 Input input voltage range: 0… +10V, resolution: 12bit (0…...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.15 GIO (get input /output) With this command the status of the two available general purpose inputs of the module can be read out. The function reads a digital or analogue input port. Digital lines will read 0 and 1, while the ADC channels deliver their 12 bit result in the range of 0…...
Page 41
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) VERVIEW CONNECTORS connector 1 connector 0 Figure 5.2 I/O connectors VERVIEW OF CONNECTORS IN/OUT 0 IN/OUT 1 Direction Description Power (GND) Power Connected to V of Power connector DIGITAL (supply output)
Page 42
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) EADING ALL DIGITAL INPUTS WITH ONE COMMAND Set the type parameter to 255 and the bank parameter to 0. In this case the status of all digital input lines will be read to the lower eight bits of the accumulator.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.16 CALC (calculate) A value in the accumulator variable, previously read by a function such as GAP (get axis parameter) can be modified with this instruction. Nine different arithmetic functions can be chosen and one constant operand value must be specified.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.17 COMP (compare) The specified number is compared to the value in the accumulator register. The result of the comparison can for example be used by the conditional jump (JC) instruction.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.18 JC (jump conditional) The JC instruction enables a conditional jump to a fixed address in the TMCL program memory, if the specified condition is met. The conditions refer to the result of a preceding comparison. Please refer to COMP instruction for examples.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.19 JA (jump always) Jump to a fixed address in the TMCL program memory. This command is intended only for standalone operation. Internal function: the TMCL program counter is set to the passed value.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.20 CSUB (call subroutine) This function calls a subroutine in the TMCL program memory. This command is intended for standalone operation, only. Internal function: the actual TMCL program counter value is saved to an internal stack, afterwards overwritten with the passed value.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.21 RSUB (return from subroutine) Return from a subroutine to the command after the CSUB command. This command is intended for standalone operation only. Internal function: the TMCL program counter is set to the last value of the stack. The command will be ignored if the stack is empty.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.22 WAIT (wait for an event to occur) This instruction interrupts the execution of the TMCL program until the specified condition is met. This command is intended for standalone operation. only.
Page 50
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) The STOP command should be placed at the end of every standalone TMCL program. The STOP command is not to be used in direct mode. Internal function: TMCL instruction fetching is stopped.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.24 SCO (set coordinate) Up to 20 position values (coordinates) can be stored for every axis for use with the MVP COORD command. This command sets a coordinate to a specified value. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.25 GCO (get coordinate) This command makes possible to read out a previously stored coordinate. In standalone mode the requested value is copied to the accumulator register for further processing purposes such as conditioned jumps. In direct mode, the value is only output in the value field of the reply, without affecting the accumulator.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.26 CCO (capture coordinate) The actual position of the axis is copied to the selected coordinate variable. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.27 ACO (accu to coordinate) With the ACO command the actual value of the accumulator is copied to a selected coordinate of the motor. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.28 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.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.29 AAP (accumulator to axis parameter) The content of the accumulator register is transferred to the specified axis parameter. For practical usage, the accumulator has to be loaded e.g. by a preceding GAP instruction. The accumulator may have been modified by the CALC or CALCX (calculate) instruction.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.30 AGP (accumulator to global parameter) The content of the accumulator register is transferred to the specified global parameter. For practical usage, the accumulator has to be loaded e.g. by a preceding GAP instruction. The accumulator may have been modified by the CALC or CALCX (calculate) instruction.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.31 CLE (clear error flags) This command clears the internal error flags. The CLE command is intended for use in standalone mode, only. < > HE FOLLOWING ERROR FLAGS CAN BE CLEARED BY THIS COMMAND...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.32 VECT (set interrupt vector) The VECT command defines an interrupt vector. It needs an interrupt number and a label as parameter (like in JA, JC and CSUB commands). This label must be the entry point of the interrupt handling routine.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.33 EI (enable interrupt) The EI command enables an interrupt. It needs the interrupt number as parameter. Interrupt number 255 globally enables interrupts. Related command: DI, VECT, RETI Mnemonic: EI <interrupt number>...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.34 DI (disable interrupt) The DI command disables an interrupt. It needs the interrupt number as parameter. Interrupt number 255 globally disables interrupts. Related command: EI, VECT, RETI Mnemonic: DI <interrupt number>...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.35 RETI (return from interrupt) This command terminates the interrupt handling routine, and the normal program execution continues. At the end of an interrupt handling routine the RETI command must be executed.
5.7.36 Customer Specific TMCL Command Extension (user function) The user definable functions UF0… UF7 are predefined functions without topic for user specific purposes. A user function (UF) command uses three parameters. Please contact TRINAMIC for a customer specific programming. Internal function: Call user specific functions implemented in C by TRINAMIC.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.37 Request Target Position Reached Event This command is the only exception to the TMCL protocol, as it sends two replies: one immediately after the command has been executed (like all other commands also), and one additional reply that will be sent when the motor has reached its target position.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 5.7.39 Control Functions: Firmware Version and Reset to Factory Defaults There are several TMCL control functions, but for the user are only 136 and 137 interesting. Other control functions can be used with axis parameters.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Axis Parameters The following sections describe all axis parameters that can be used with the SAP, GAP, AAP, STAP and RSAP commands. Attention! Related to positioning, there are several parameters which have two unit specifications.
Page 67
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. 4.2 =< >× Absolute max. The maximum value is 255. This value means 0… 255 current 100% of the maximum current of the module.
Page 68
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Status word The status word contains 12 bits (bit 0… 11). They can be read out using command GAP 18. If a bit is set the specific event has occurred.
Page 69
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. CL current scale Maximum current scale factor for current Default = 255 maximum regulation. [1/256] 255 = 1 = 100% of maximum current 127 = 0.5 = 50% of maximum current …...
Page 70
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. CL current scale This parameter defines the delay between two Default = 1 decrement current scale factor decrements and thereby [ms] timeout controls the rate at which the current scale factor will be decreased, e.g., in order to...
Page 71
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Ramp mode Automatically set when using ROR, ROL, MVP 0/1/2 or SAP 14 commands. 0: Position mode. Steps are generated, when the parameters actual position and target position differ.
Page 72
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. CL position Window around the target position in which 0… 255 reached window the target position will be considered as being [encoder steps] reached. This value should be adjusted to the Default = 50 application and the resolution of the encoder.
Page 73
For low current drivers, a setting of 1 or 2 is good. For higher current applications like the TMCM-1311 a setting of 2 or 3 will be required. Chopper mode Selection of the chopper mode: 0 –...
Page 74
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. smartEnergy Sets the lower motor current limit for current minimum coolStep operation by scaling the CS (Current (SEIMIN) Scale, see axis parameter 6) value.
Page 75
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Slope control Determines the slope of the motor driver 0… 3 high side outputs. Set to 2 or 3 for this module or rather use the default value.
Page 76
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Referencing Similar to parameter no. 194, the speed for the 327.678.000… switch speed switching point calibration can be selected. +327.679.999 [pps] End switch This parameter provides the distance between 0…...
Page 77
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Encoder counter The value of an encoder register can be read [encoder steps] out or written. Encoder Resolution encoder absolute 0… 65535 resolution positions.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis Parameter Description Range [Unit] Acc. Step/Dir mode Please note, that there are differences using 0… 5 Step/Dir mode with open loop resp. closed loop. Turn OFF step/dir mode In open loop mode, use of the ENABLE input...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) stallGuard2 Related Parameters The module is equipped with a TMC262 motor driver chip. The TMC262 features load measurement that can be used for stall detection. stallGuard2 delivers a sensorless load measurement of the motor as well as a stall detection signal.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Closed-Loop Operation Related Axis Parameter The TMCM-1311 focuses on operating stepper motors in a closed loop using encoder feedback to prevent from motor stall, to adapt the current amplitude for saving energy and reducing heating, and for precise and fast positioning.
8.2 General Structure of the Closed Loop System The general structure of the closed loop system of the TMCM-1311 focuses on ease of use. Basically, the stepper motor will be controlled similar to open loop mode. Nevertheless, extended functionality is provided for control of position, velocity, and current amplitude.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.3 Setting Encoder Resolution and Motor Resolution Before starting closed loop operation, the resolution of the encoder and the motor must be configured properly. Therefore, set just two parameters: encoder resolution (axis parameter 210) and motor resolution (axis parameter 202).
8.4 Positioning Mode In positioning mode, a certain target position (SAP 0) is set by the user and the TMCM-1311 uses the ramp profile parameters for acceleration (SAP 5) and target velocity (SAP 4) to make a ramp movement to the target position.
Page 84
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) XAMPLE ERROR COMPENSATION Figure 8.3 Example: online error compensation In this example the target position has been reached in time though the load on the motor occasionally got too high. The closed loop error compensation had been able to make up leeway by executing dynamic error correction parameters.
Page 85
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis parameter Description Units / Default Acc. Target pos. Indicates that the actual position equals the reached target position. CL correction Proportional factor for on-line / live position 0… 5535...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.5 Position Maintenance and Standstill Mode When doing a ramp movement in positioning mode there are two parameters that can be used to configure the behavior for setting the target_reached flag: ...
Page 87
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) XIS PARAMETERS RELATED TO POSITIONING MAINTENANCE AND STANDSTILL MODE Number Axis parameter Description Units / Default Acc. Target pos. Indicates that the actual position equals the reached target position. CL position Window around the target position in which 0…...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis parameter Description Units / Default Acc. CL standstill When the target position is reached, the 0… +268.435.454 position error position maintenance by the ramp generator [µsteps] limit is switched off and the system is in a Default=255 standstill mode.
The current amplitude will not be regulated. The range of axis parameter 14 covers the maximum current range allowed by the TMCM-1311, which is up to 4200mA peak phase current. The moving direction is defined by the sign of axis parameter 14.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.8 Current Regulation This section explains the current amplitude regulation of the closed loop system. Basically, the self-acting current regulation is used to improve drive efficiency by adapting the current level to a value that is just sufficient enough to move the load with the desired speed.
Page 91
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) XPLANATIONS RELATED TO IGURE Figure 8.6 shows the two phase currents for phase A and B as XY-diagram on a scope using two current probes. They show the difference between current regulator enabled (left) and disabled (right). One complete circle represents a full electrical period of 360°.
Page 92
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis parameter Description Units / Default Acc. CL current scale Maximum current scale factor for current Default = 255 maximum regulation. [1/256] 255 = 1 = 100% of maximum current 127 = 0.5 = 50% of maximum current...
Page 93
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Axis parameter Description Units / Default Acc. CL current scale This parameter defines the delay between two Default = 1 decrement current scale factor decrements and thereby [ms] timeout controls the rate at which the current scale factor will be decreased, e.g., in order to...
Adjusting the field weakening parameters 108 and 109 allows for automatic motor back EMF compensation in case high velocities are needed. TRINAMIC recommends to start with default values and adjust the field weakening minimum and maximum velocities carefully. Actual gamma/field weakening values can be read out on the fly using axis parameter 230.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.10 Status and Feedback Information Some parameters can be read out, e.g., for visualization and feedback. XIS PARAMETERS FOR READOUT Number Axis parameter Description Units / Default Target pos. Indicates that the actual position equals the reached target position.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.11 Example Programs: Closed Loop Operation Both example programs show that it is necessary to set the maximum current first. Then, check (example 2) or set (example 1) the motor steps and the encoder steps before switching to closed loop operation. After setting axis parameter 126 to 1 for closed loop mode wait until the closed loop flag is set! 8.11.1...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 8.11.2 Example Program 2 In the second example program, the encoder resolution is detected automatically. Here, the motor will run increasing and decreasing the positioning counter while using position reached interrupts.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Reference Search The built-in reference search features switching point calibration and support of one or two reference switches. The internal operation is based on a state machine that can be started, stopped and monitored (instruction RFS, no.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 9.1.1 Reference Search Modes (Axis Parameter 193) SAP 193, 0, 1 negative limit switch Search left stop switch only. SAP 193, 0, 2 negative limit switch positive limit switch Search right stop switch, then search left stop switch.
Page 100
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) SAP 193, 0, 5 negative limit switch positive limit switch home switch Search home switch in negative direction, reverse the direction when left stop switch reached. SAP 193, 0, 6 negative limit switch...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 10 Global Parameters LOBAL PARAMETERS ARE GROUPED INTO BANKS bank 0 (global configuration of the module) bank 1 (user C variables) bank 2 (user TMCL variables) bank 3 (interrupt configuration) Please use SGP and GGP commands to write and read global parameters.
Page 102
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Number Global parameter Description Range Access CAN bit rate 20kBit/s 2… 8 50kBit/s 100kBit/s 125kBit/s 250kBit/s 500kBit/s 1000kBit/s Default CAN reply ID The CAN ID for replies from the board (default: 2) 0…...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 10.2 Bank 1 The global parameter bank 1 is normally not available. It may be used for customer specific extensions of the firmware. Together with user definable commands (see section 5.7.36) these variables form the interface between extensions of the firmware (written in C) and TMCL applications.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 11 TMCL Programming Techniques and Structure 11.1 Initialization The first task in a TMCL program (like in other programs also) is to initialize all parameters where different values than the default values are necessary. For this purpose, SAP and SGP commands are used.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) Using constants for other values makes it easier to change them when they are used more than once in a program. You can change the definition of the constant and do not have to change all occurrences of it in your program.
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 11.6 Mixing Direct Mode and Standalone Mode Direct mode and stand alone mode can also be mixed. When a TMCL program is being executed in standalone mode, direct mode commands are also processed (and they do not disturb the flow of the program running in standalone mode).
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 12 Life Support Policy TRINAMIC Motion Control GmbH & Co. KG does not authorize or warrant any of its products for use in life support systems, without the specific written consent of TRINAMIC Motion Control GmbH &...
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05) 13 Revision History 13.1 Firmware Revision Author Version Date Description 1.02 2012-SEP-27 First version 1.06beta 2013-MAY-23 Preliminary version 1.07 2014-JUNE-02 Release version 1.08 Not deployed 1.09 Not deployed 1.10 2013-OKT-10 ...
Need help?
Do you have a question about the TMCM-1311 and is the answer not in the manual?
Questions and answers