Trinamic PD57-1060 Firmware Manual

Trinamic PD57-1060 Firmware Manual

Pandrives tmcl mechatronic drives with stepper motor
Table of Contents

Advertisement

Quick Links

MECHATRONIC DRIVES WITH STEPPER MOTOR
V 1.04
TMCL™ FIRMWARE MANUAL
+
+
TRINAMIC Motion Control GmbH & Co. KG
Hamburg, Germany
www.trinamic.com
-1060
TMCM
+
-1060
PD57
-1060
PD60
1-axis stepper
controller / driver
2.8A RMS/ 12, 24 or 48V DC
USB (mini-USB), RS485, and CAN
step/dir interface
integrated sensOstep™ encoder
+
PANdrives

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PD57-1060 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Trinamic PD57-1060

  • Page 1 TMCL™ FIRMWARE MANUAL -1060 TMCM -1060 PD57 -1060 PD60 1-axis stepper controller / driver 2.8A RMS/ 12, 24 or 48V DC USB (mini-USB), RS485, and CAN step/dir interface integrated sensOstep™ encoder TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany www.trinamic.com...
  • Page 2: Table Of Contents

    5.7.26 CCO (capture coordinate) ........................... 72 5.7.27 ACO .................................. 73 5.7.28 CALCX (calculate using the X register) ....................74 5.7.29 AAP (accumulator to axis parameter) ....................75 5.7.30 AGP (accumulator to global parameter) ....................80 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 3 108 Velocity calculation ............................110 Using the RS485 interface ..........................111 Revision history ................................ 112 Firmware revision ............................112 Document revision ............................112 10 References................................... 113 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 4: Life Support Policy

    Specifications are subject to change without notice. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 5: Features

    Stand-alone operation or remote controlled operation  Program memory (non volatile) for up to 2048 TMCL™ commands  PC-based application development software TMCL-IDE available for free Please refer to separate Hardware Manual for further information. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 6: Overview

    PD57/60-1060 / TMCM-1060 TMCL™ Firmware Manual (V1.04 / 2011-AUG-29) 3 Overview As with most TRINAMIC modules the software running on the microprocessor of the TMCM-1060 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 normally untouched throughout the whole lifetime, the firmware can be updated by the user.
  • Page 7: Putting The Pd57/60-1060 Into Operation

    Do not connect or disconnect the motor while powered!  Do not exceed the maximum power supply of 51V DC.  Start with power supply OFF! 4.1 Starting up Serial communication GPIO Power Motor Figure 4.1: Overview connectors Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 8 Please note, that there is no protection against reverse polarity or voltages above the upper maximum limit. The power supply typically should be within a range of +9 to +51V. Pre- series boards are limited to +40V max. power supply. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 9 If this does not occur, switch power OFF and check your connections as well as the power supply. Start the TMCL-IDE software development environment The TMCL-IDE is available on the TechLibCD and on www.trinamic.com. Installing the TMCL-IDE:  Make sure the COM port you intend to use is not blocked by another program.
  • Page 10: Testing With A Simple Tmcl

    Click on icon Assemble to convert the TMCL™ into machine code. Then download the program to the TMCM-1060 module via the icon Download. Press icon Run. The desired program will be executed. Click Stop button to stop the program. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 11: Operating The Module In Direct Mode

    Attention: Please mind the chapter 3 (programming techniques) of the TMCL-IDE User Manual on www.trinamic.com. Here you will find information about creating general structures of TMCL-programs. In particular initialization, main loop, symbolic constants, variables, and subroutines are described there. Further you can learn how to mix direct mode and stand alone mode.
  • Page 12: Tmcl™ And Tmcl-Ide

    The Trinamic Motion Control Language [TMCL™] provides a set of structured motion control commands. Every motion control command can be given by a host computer or can be stored in an EEPROM on the TMCM-module to form programs that run stand-alone on the module.
  • Page 13: Reply Format

    When using CAN bus, the first byte (reply address) and the last byte (checksum) are left out.  Do not send the next command before you have received the reply! Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 14: Status Codes

    These commands control the motion of the motor. They are the most important commands and can be used in direct mode or in stand-alone mode. Command Mnemonic Meaning number Rotate left Rotate right Move to position Motor stop Reference search Store coordinate Capture coordinate Get coordinate Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 15: Parameter Commands

    Calculate using the accumulator and a constant value CALCX Calculate using the accumulator and the X register Copy accumulator to an axis parameter Copy accumulator to a global parameter Copy accu to coordinate Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 16: Interrupt Commands

    The following table shows all interrupt vectors that can be used. Interrupt number Interrupt type Timer 0 Timer 1 Timer 2 Target position reached stallGuard™ Deviation Left stop switch Right stop switch Input change 0 Input change 1 Global interrupts Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 17 The beginning of the above program then looks like the following: #include Interrupts.inc VECT TI_TIMER0, Timer0Irq SGP TI_TIMER0, 3, 1000 EI TI_TIMER0 EI TI_GLOBAL Please also take a look at the other example programs. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 18: Tmcl™ List Of Commands

    <parameter>, <motor number> Accumulator to axis parameter <parameter>, <bank number> Accumulator to global parameter VECT <interrupt number>, <label> Set interrupt vector RETI Return from interrupt <coordinate number>, <motor number> Accu to coordinate Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 19 This command does not send back a reply. 138 – reserved 139 – enter ASCII Enter ASCII command line (see don’t care don’t care don’t care mode chapter 5.6) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 20: The Ascii Interface

    BIN: This command quits ASCII mode and returns to binary TMCL™ mode.  RUN: This command can be used to start a TMCL™ program in memory.  STOP: Stops a running TMCL™ application. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 21: Configuring The Ascii Interface

    <CR> character has been sent. When bit 5 is set and bit 4 is clear there will be no echo, only the reply will be sent. This may be useful in RS485 systems. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 22: Commands

    Rotate right, velocity = 350 Mnemonic: ROR 0, 350 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 23: Rol (Rotate Left)

    Rotate left, velocity = 1200 Mnemonic: ROL 0, 1200 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 24: Mst (Motor Stop)

    Example: Stop motor Mnemonic: MST 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 25: Mvp (Move To Position)

    2 COORD – <coordinate number> coordinate 0… 20 *motor number is always O as only one motor is involved Reply in direct mode: STATUS VALUE 100 – OK don’t care Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 26 Byte2 Byte1 Byte0 Value (hex)  When moving to a coordinate, the coordinate has to be set properly in advance with the help of the SCO, CCO or ACO command. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 27: Sap (Set Axis Parameter)

    The limit for acceleration (and deceleration). 0… +268.435.454 acceleration Changing this parameter requires [pps/s] calculation of the acceleration factor (no. 146) and the acceleration divisor (no. 137), which is done automatically. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 28 It does not make sense to activate this parameter for internal use. Double step enable can be used with Step/Dir interface. 0 – double step off 1 – double step on Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 29: Pd57/60-1060 / Tmcm-1060 Tmcl™ Firmware Manual (V1.04 / 2011-Aug

    Sets the distance between the lower and the 0… 15 hysteresis upper threshold for stallGuard2™ reading. Above the upper threshold the motor current becomes decreased. Hysteresis: (smartEnergy hysteresis value + 1) * 32 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 30 Below this speed motor will not be stopped. 0… +268.435.454 Above this speed motor will stop in case [pps] stallGuard2™ load value reaches zero. smartEnergy Above this speed coolStep™ becomes 0… +268.435.454 threshold speed enabled. [pps] Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 31 (move motor using TMCL™ commands) step/direction mode (move motor via step/direction inputs) Hardware related parameters for the more experienced users. Do not change unless you are absolutely sure! Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 32 Set the absolute maximum current of motor to 200mA Mnemonic: SAP 6, 0, 200 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 33: Gap (Get Axis Parameter)

    The limit for acceleration (and deceleration). 0… +268.435.454 acceleration Changing this parameter requires [pps/s] calculation of the acceleration factor (no. 146) and the acceleration divisor (no. 137), which is done automatically. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 34 It does not make sense to activate this parameter for internal use. Double step enable can be used with Step/Dir interface. 0 – double step off 1 – double step on Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 35 Sets the distance between the lower and the 0… 15 hysteresis upper threshold for stallGuard2™ reading. Above the upper threshold the motor current becomes decreased. Hysteresis: (smartEnergy hysteresis value + 1) * 32 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 36 The value goes up to the CS value and down to the portion of CS as specified by SEIMIN. actual motor current scaling factor: 0 … 31: 1/32, 2/32, … 32/32 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 37 0… 65535 be cut when its velocity has reached zero. 0 = never [msec] actual load value Readout of the actual load value used for stall 0… 1023 detection (stallGuard2™). Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 38 Byte2 Byte1 Byte0 Value (hex) Reply: Byte Index Function Host- Target- Status Instruction Operand Operand Operand Operand Checksum address address Byte3 Byte2 Byte1 Byte0 Value (hex)  status=no error, position=711 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 39: Stap (Store Axis Parameter)

    The current limit two seconds after the motor has stopped. right limit switch 1=right stop switch disabled disable 0=right stop switch enabled left limit switch 1=left stop switch disabled disable 0=left stop switch enabled Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 40 Standstill period before the current is changed delay down to standby current. The standard value is 200 (value equates 2000msec). step/dir normal mode (move motor using TMCL™ commands) step/direction mode (move motor via step/direction inputs) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 41 Note: The STAP command will not have any effect when the configuration EEPROM is locked (refer to 7.1). In direct mode, the error code 5 (configuration EEPROM locked, see also section 5.2.1) will be returned in this case. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 42: Rsap (Restore Axis Parameter)

    1=left stop switch disabled disable 0=left stop switch enabled microstep full step resolution half step 4 microsteps 8 microsteps 16 microsteps 32 microsteps 64 microsteps 128 microsteps 256 microsteps Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 43 Restore the maximum current of motor Mnemonic: RSAP 6, 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 44: Sgp (Set Global Parameter)

    1 – start up in ASCII mode Bits 4 and 5: 00 – Echo back each character 01 – Echo back complete command 10 – Do not send echo, only send command reply Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 45 The global parameter bank 1 is normally not available, but can be used for customer specific extensions of the firmware. Global parameters of bank 2, which can be used for SGP: Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 46 Timer 2 period (ms) Time between two interrupts (ms) 0… 4.294.967.295 [ms] Input 0 edge type 0=off, 1=low-high, 2=high-low, 3=both 0… 3 Input 1 edge type 0=off, 1=low-high, 2=high-low, 3=both 0… 3 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 47 Set the serial address of the target device to 3 Mnemonic: SGP 66, 0, 3 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 48: Ggp (Get Global Parameter)

    Serial heartbeat for RS485 interface and USB interface. If [ms] this time limit is up and no further command is noticed the motor will be stopped. 0 – parameter is disabled Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 49 A 32 bit counter that gets incremented by one every millisecond. It can also be reset to any start value. random number Choose a random number. Read only! 0… 2147483 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 50 TMCL™ applications −2.147.483.648… +2.147.483.647 20… 55 general purpose variables #20… for use in TMCL™ applications −2.147.483.648… +2.147.483.647 56… 255 general purpose variables #56… for use in TMCL™ applications −2.147.483.648… +2.147.483.647 #255 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 51 Byte2 Byte1 Byte0 Value (hex) Reply: Byte Index Function Host- Target- Status Instruction Operand Operand Operand Operand Checksum address address Byte3 Byte2 Byte1 Byte0 Value (hex)  Status=no error, Value=1 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 52: Stgp (Store Global Parameter)

    TMCL™ applications general purpose variable #16 for use in TMCL™ applications general purpose variable #17 for use in TMCL™ applications general purpose variable #18 for use in TMCL™ applications Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 53 Store the user variable #42 Mnemonic: STGP 42, 2 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 54: Rsgp (Restore Global Parameter)

    TMCL™ applications general purpose variable #15 for use in TMCL™ applications general purpose variable #16 for use in TMCL™ applications general purpose variable #17 for use in TMCL™ applications Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 55 Restore the maximum current of motor Mnemonic: RSGP 6, 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 56: Rfs (Reference Search)

    Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) With this PANdrive it is possible to use stall detection instead of a reference search. Please see section 8.3 for details. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 57: Sio (Set Output)

    Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Serial communication GPIO Power Motor Figure 5.1: Connectors of TMCM-1060 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 58 Set both output pins high. Mnemonic: SIO 255, 2, 3 The following program will show the states of the input lines on the output lines: Loop: GIO 255, 0 SIO 255, 2,-1 JA Loop Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 59: Gio (Get Input/Output)

    Byte3 Byte2 Byte1 Byte0 Value (hex) Reply: Byte Index Function Host- Target- Status Instruction Operand Operand Operand Operand Checksum address address Byte3 Byte2 Byte1 Byte0 Value (hex)  value: 506 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 60 In this case the status of all digital input lines will be read to the lower eight bits of the accumulator. Use following program to represent the states of the input lines on the output lines: Loop: GIO 255, 0 SIO 255, 2,-1 JA Loop Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 61 The states of the OUT lines (that have been set by SIO commands) can be read back using bank 2. I/O port Command Range OUT_0 GIO 0, 2, <n> OUT_1 GIO 1, 2, <n> Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 62: Calc (Calculate)

    Multiply accu by -5000 Mnemonic: CALC MUL, -5000 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 63: Comp (Compare)

    //jump, type: 5 greater/equal, the label must be defined somewhere else in the program Binary format of the COMP 1000 command: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 64: Jc (Jump Conditional)

    Binary format of JC GE, Label when Label is at address 10: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 65: Ja (Jump Always)

    Binary format of JA Loop assuming that the label Loop is at address 20: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 66: Csub (Call Subroutine)

    Binary format of the CSUB SubW command assuming that the label SubW is at address 100: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 67: Rsub (Return From Subroutine)

    Example: please see the CSUB example (section 5.7.20). Binary format of RSUB: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 68: Wait (Wait For An Event To Occur)

    Wait for motor to reach its target position, without timeout Mnemonic: WAIT POS, 0, 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 69: Stop (Stop Tmcl™ Program Execution)

    Example: Mnemonic: STOP Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 70: Sco (Set Coordinate)

    (except coordinate number 0) from RAM to the EEPROM. 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. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 71: Gco (Get Coordinate)

    EEPROM to the RAM. 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. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 72: Cco (Capture Coordinate)

    Store current position of the axe to coordinate 3 Mnemonic: CCO 3, 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 73: Aco

    Copy the actual value of the accumulator to coordinate 1 of motor Mnemonic: ACO 1, 0 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 74: Calcx (Calculate Using The X Register)

    Example: Multiply accu by X-register Mnemonic: CALCX MUL Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 75: Aap (Accumulator To Axis Parameter)

    1 when target position = actual position home switch State of the home switch input right stop sw. State of the right stop switch input left stop sw. State of the left stop switch input Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 76 Hysteresis decrement setting. This setting hysteresis determines the slope of the hysteresis during decrement on time and during fast decay time. 0 – fast decrement 3 – very slow decrement Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 77 Scaling: 0… 3: 1, 2, 4, 8 0: slow increment 3: fast increment / fast reaction to rising load smartEnergy The lower threshold for the stallGuard2™ hysteresis start value (see smart Energy current up step). Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 78 Above this speed motor will stop in case stallGuard2™ load value reaches zero. smartEnergy Above this speed coolStep™ becomes threshold speed enabled. smartEnergy slow Sets the motor current which is used blow run current the threshold speed. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 79 // jump back to start Binary format of the AAP 0,0 command: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 80: Agp (Accumulator To Global Parameter)

    Serial heartbeat for RS485 interface and USB interface. If this time limit is up and no further command is noticed the motor will be stopped. 0 – parameter is disabled Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 81 1 – coordinates are always stored in the EEPROM only tick timer A 32 bit counter that gets incremented by one every millisecond. It can also be reset to any start value. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 82 Time between two interrupts (ms) Timer 2 period (ms) Time between two interrupts (ms) Input 0 edge type 0=off, 1=low-high, 2=high-low, 3=both Input 1 edge type 0=off, 1=low-high, 2=high-low, 3=both Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 83 Copy accumulator to TMCL™ user variable #3 Mnemonic: AGP 3, 2 Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 84: Cle (Clear Error Flags)

    Example: Reset the timeout flag Mnemonic: CLE ETO Binary: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 85: Vect (Set Interrupt Vector)

    Example: Define interrupt vector at target position 500 VECT 3, 500 Binary format of VECT: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 86: Ei (Enable Interrupt)

    Enable interrupt when target position reached EI, 3 Binary format of EI: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 87: Di (Disable Interrupt)

    Disable interrupt when target position reached DI, 3 Binary format of DI: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 88: Reti (Return From Interrupt)

    Example: Terminate interrupt handling and continue with normal program execution RETI Binary format of RETI: Byte Index Function Target- Instruction Type Motor/ Operand Operand Operand Operand Checksum address Number Bank Byte3 Byte2 Byte1 Byte0 Value (hex) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 89: Customer Specific Tmcl™ Command Extension (Uf0

    The user definable functions UF0…UF7 are predefined, functions without topic for user specific purposes. Contact TRINAMIC for the customer specific programming of these functions. Internal function: Call user specific functions implemented in C by TRINAMIC. Related commands: none Mnemonic: UF0… UF7 Binary representation: INSTRUCTION NO.
  • Page 90: Request Target Position Reached Event

    Additional reply in direct mode (after motors have reached their target positions): Byte Index Function Target- Target- Status Instruction Operand Operand Operand Operand Checksum address address Byte3 Byte2 Byte1 Byte0 Value (hex) Motor bit <checksum> mask Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 91: Bin (Return To Binary Mode)

    This command can only be used in ASCII mode. It quits the ASCII mode and returns to binary mode. Related Commands: none Mnemonic: BIN Binary representation: This command does not have a binary representation as it can only be used in ASCII mode. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 92: Tmcl™ Control Functions

    This command does not send back a reply. 138 – reserved 139 – enter ASCII Enter ASCII command line (see don’t care don’t care don’t care mode chapter 5.6) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 93 The version number is output in the value field of the reply in the following way: Byte index in value field Contents Version number, low byte Version number, high byte Type number, low byte (currently not used) Type number, high byte (currently not used) Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 94: Axis Parameters

    State of the left stop switch input right limit switch 1=right stop switch disabled disable 0=right stop switch enabled left limit switch 1=left stop switch disabled disable 0=left stop switch enabled Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 95 Decrement interval time is controlled by axis parameter 164. -3… -1 negative hysteresis end setting zero hysteresis end setting 1… 12 positive hysteresis end setting Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 96 In most cases it is expedient to set the filtered mode before using coolStep™. standard mode step loss detection. 0 – standard mode 1 – filtered mode Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 97 Above this speed coolStep™ becomes 0… +268.435.454 threshold speed enabled. [pps] smartEnergy Sets the motor current which is used blow 0… 255 slow run current the threshold speed. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 98 Please refer to the TMC262 Datasheet for more information. encoder position The value of an encoder register can be read [encoder steps] out or written. Encoder Prescaler for the encoder. See paragraph 0 prescaler Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 99 (move motor using TMCL™ commands) step/direction mode (move motor via step/direction inputs) Hardware related parameters for the more experienced users. Do not change unless you are absolutely sure Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 100: Global Parameters

    230400 baud 250000 baud Not supported by Windows! 500000 baud Not supported by Windows! 1000000 baud Not supported by Windows! serial address The module (target) address for RS-485. 0… 255 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 101 0 – coordinates are stored in the RAM only (but can be 0 or 1 copied explicitly between RAM and EEPROM) 1 – coordinates are always stored in the EEPROM only Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 102: Bank 1

    #7 general purpose use in TMCL™ applications −2.147.483.648… +2.147.483.647 variable #8 general purpose use in TMCL™ applications −2.147.483.648… +2.147.483.647 variable #9 general purpose use in TMCL™ applications −2.147.483.648… +2.147.483.647 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 103: Bank 3

    Timer 2 period (ms) Time between two interrupts (ms) 0… 4.294.967.295 [ms] Input 0 edge type 0=off, 1=low-high, 2=high-low, 3=both 0… 3 Input 1 edge type 0=off, 1=low-high, 2=high-low, 3=both 0… 3 Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 104: Hints And Tips

    Adding 128 to these values reverses the polarity of the home switch input. The next two pages show all possible modes of reference search according to the specific commands on top of each drawing. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 105 Search right stop switch, then search left stop switch from both sides. SAP 193, 0, 4 negative limit switch Search left stop switch from both sides. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 106 SAP 193, 0, 7 home switch Search home switch in positive direction, ignore end switches. SAP 193, 0, 8 home switch Search home switch in negative direction, ignore end switches. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 107: Changing The Prescaler Value Of An Encoder

    Clear encoder with next null channel event Add up both <p> values from these tables to get the required value for the SAP 210 command. The resulting prescaler is Value/512. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 108: Stallguard2

    In this chapter only basic axis parameters are mentioned which concern coolStep™ and stallGuard2™. The complete list of axis parameters in chapter 6 contains further parameters which offer more configuration possibilities. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 109 (see smartEnergy hysteresis start). smartEnergy current up step current increment step size: Scaling: 0… 3: 1, 2, 4, 8 0: slow increment 3: fast increment / fast reaction to rising load Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 110: Velocity Calculation

    0… +268.435.454 stopped. Above this speed motor will [pps] stop in case stallGuard2™ load value reaches zero. smartEnergy Above this speed coolStep™ will be 0… +268.435.454 threshold speed enabled. [pps] Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 111: Using The Rs485 Interface

    (global parameter #75) of the module to 15 (or more if needed) by issuing an SGP 75, 0, 15 command in direct mode. The parameter will automatically be stored in the configuration EEPROM. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 112: Revision History

    New pictures 1.02 2011-FEB-21 Value range of axis parameter 206 corrected 1.03 2011-MAR-14 Minor changes Unit of current parameters for TMCM-1060 module specified, 1.04 2011-AUG-29 velocity calculation formula added, minor changes Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...
  • Page 113: References

    PD57/60-1060 / TMCM-1060 TMCL™ Firmware Manual (V1.04 / 2011-AUG-29) 10 References [TMCM-1060 / PD57/60-1060] TMCM-1060 and PD57/60-1060 Hardware Manual [TMC262] TMC262 Datasheet [TMCL-IDE] TMCL-IDE User Manual [QSH5718] QSH5718 Manual [QSH6018] QSH6018 Manual Please refer to www.trinamic.com. Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG...

This manual is also suitable for:

Pd60-1060Tmcm-1060

Table of Contents