0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
TMCM-1270-TMCL

TMCM-1270-TMCL

  • 厂商:

    TRINAMIC

  • 封装:

    -

  • 描述:

    BOARDCONTROLSTEPPERMOTOR

  • 数据手册
  • 价格&库存
TMCM-1270-TMCL 数据手册
MODULE Module for Stepper TMCM-1270 TMCL™ Firmware Manual Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 The TMCM-1270 is a single axis controller/driver module for 2-phase bipolar stepper motors with coil currents of up to 1A RMS. The TMCM-1270 TMCL firmware allows to control the module using TMCL™ commands, supporting standalone operation as well as direct mode control, making use of the Trinamic TMC5160 motion controller and motor driver. Dynamic current control, and quiet, smooth and efficient operation are combined with StealthChop™, DcStep™, StallGuard2™ and CoolStep™ features. Features • • • • • • • • • • Single Axis Stepper motor control Supply voltage 24V DC TMCL™ Motion Contoller CAN SixPoint™ ramp motion controller StealthChop™ silent PWM mode SpreadCycle™ smart mixed decay StallGuard2™ load detection CoolStep™ automatic current scaling • DcStep™ Applications • Laboratory Automation • Manufacturing • Semiconductor Handling • Robotics • Factory Automation • CNC • Life Science • Biotechnology • Liquid Handling Simplified Block Diagram Input 4 REFL/REFR ENC_A/ENC_B /ENABLE TMCL™ Memory I2C CAN ARM Cortex-M0+TM microcontroller SPI Stepper Energy Efficient motor Driver + controller TMC262 driver +6V..+28V DC ©2020 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. Step Motor TMCM-1270 PD42-x-1270 TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 2 / 100 Contents 1 Features 1.1 StallGuard2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 CoolStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 SixPoint Motion Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6 6 7 2 First Steps with TMCL 2.1 Basic Setup . . . . . . . . . . . . . . . 2.2 Using the TMCL Direct Mode . . . . . 2.3 Changing Axis Parameters . . . . . . 2.4 Testing with a simple TMCL Program 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 8 8 9 TMCL and the TMCL-IDE — An Introduction 3.1 Binary Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Checksum Calculation . . . . . . . . . . . . . . . . . . . . . . . 3.2 Reply Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Standalone Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 TMCL Command Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 TMCL Commands by Subject . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 Motion Commands . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 Parameter Commands . . . . . . . . . . . . . . . . . . . . . . . 3.5.3 Branch Commands . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 I/O Port Commands . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.5 Calculation Commands . . . . . . . . . . . . . . . . . . . . . . . 3.5.6 Interrupt Processing Commands . . . . . . . . . . . . . . . . . 3.6 Detailed TMCL Command Descriptions . . . . . . . . . . . . . . . . . . 3.6.1 ROR (Rotate Right) . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.2 ROL (Rotate Left) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.3 MST (Motor Stop) . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.4 MVP (Move to Position) . . . . . . . . . . . . . . . . . . . . . . . 3.6.5 SAP (Set Axis Parameter) . . . . . . . . . . . . . . . . . . . . . . 3.6.6 GAP (Get Axis Parameter) . . . . . . . . . . . . . . . . . . . . . 3.6.7 SGP (Set Global Parameter) . . . . . . . . . . . . . . . . . . . . 3.6.8 GGP (Get Global Parameter) . . . . . . . . . . . . . . . . . . . . 3.6.9 STGP (Store Global Parameter) . . . . . . . . . . . . . . . . . . 3.6.10 RSGP (Restore Global Parameter) . . . . . . . . . . . . . . . . . 3.6.11 RFS (Reference Search) . . . . . . . . . . . . . . . . . . . . . . . 3.6.12 GIO (Get Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.13 CALC (Calculate) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.14 COMP (Compare) . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.15 JC (Jump conditional) . . . . . . . . . . . . . . . . . . . . . . . . 3.6.16 JA (Jump always) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.17 CSUB (Call Subroutine) . . . . . . . . . . . . . . . . . . . . . . . 3.6.18 RSUB (Return from Subroutine) . . . . . . . . . . . . . . . . . . 3.6.19 WAIT (Wait for an Event to occur) . . . . . . . . . . . . . . . . . 3.6.20 STOP (Stop TMCL Program Execution – End of TMCL Program) 3.6.21 SCO (Set Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . 3.6.22 GCO (Get Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . 3.6.23 CCO (Capture Coordinate) . . . . . . . . . . . . . . . . . . . . . 3.6.24 ACO (Accu to Coordinate) . . . . . . . . . . . . . . . . . . . . . . 3.6.25 CALCX (Calculate using the X Register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 12 13 13 14 15 16 16 16 17 17 18 18 21 21 22 23 24 27 28 29 30 31 32 33 35 37 39 40 42 43 44 45 47 48 49 51 52 53 . . . . . . . . . . . . . . . . . . . . . . . . ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 3.6.26 3.6.27 3.6.28 3.6.29 3.6.30 3.6.31 3.6.32 3.6.33 3.6.34 3.6.35 AAP (Accu to Axis Parameter) . . . . . . . . . . . . . . . . . . . . . . . . . AGP (Accu to Global Parameter) . . . . . . . . . . . . . . . . . . . . . . . . CLE (Clear Error Flags) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EI (Enable Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DI (Disable Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VECT (Define Interrupt Vector) . . . . . . . . . . . . . . . . . . . . . . . . . RETI (Return from Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . Customer specific Command Extensions (UF0. . . UF7 – User Functions) Request Target Position reached Event . . . . . . . . . . . . . . . . . . . . TMCL Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Axis Parameters 5 Global Parameters 5.1 Bank 0 . . . . . 5.2 Bank 1 . . . . . 5.3 Bank 2 . . . . . 5.4 Bank 3 . . . . . 6 7 3 / 100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 56 57 59 60 61 63 64 65 67 69 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 78 80 80 81 Hints and Tips 6.1 Reference Search . . . . . . . . . . . . 6.1.1 Mode 1 . . . . . . . . . . . . . 6.1.2 Mode 2 . . . . . . . . . . . . . 6.1.3 Mode 3 . . . . . . . . . . . . . 6.1.4 Mode 4 . . . . . . . . . . . . . 6.1.5 Mode 5 . . . . . . . . . . . . . 6.1.6 Mode 6 . . . . . . . . . . . . . 6.1.7 Mode 7 . . . . . . . . . . . . . 6.1.8 Mode 8 . . . . . . . . . . . . . 6.2 Using Encoders . . . . . . . . . . . . . 6.3 StallGuard2 . . . . . . . . . . . . . . . 6.4 CoolStep . . . . . . . . . . . . . . . . . 6.5 Velocity and Acceleration Calculation 6.6 SixPoint Ramp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 82 83 83 83 84 84 85 85 86 87 87 88 90 91 TMCL Programming Techniques and Structure 7.1 Initialization . . . . . . . . . . . . . . . . . . . . . 7.2 Main Loop . . . . . . . . . . . . . . . . . . . . . . 7.3 Using Symbolic Constants . . . . . . . . . . . . 7.4 Using Variables . . . . . . . . . . . . . . . . . . . 7.5 Using Subroutines . . . . . . . . . . . . . . . . . 7.6 Combining Direct Mode and Standalone Mode 7.7 Make the TMCL Program start automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 92 92 92 93 94 94 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figures Index 96 9 Tables Index 97 10 Supplemental Directives 10.1 Producer Information . . . . . . . . . . 10.2 Copyright . . . . . . . . . . . . . . . . . 10.3 Trademark Designations and Symbols 10.4 Target User . . . . . . . . . . . . . . . . 10.5 Disclaimer: Life Support Systems . . . 10.6 Disclaimer: Intended Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 98 98 98 98 98 98 TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 4 / 100 10.7 Collateral Documents & Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 11 Revision History 100 11.1 Firmware Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 11.2 Document Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 1 5 / 100 Features The TMCM-1270 is a single 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. The module has been designed for coil currents up to 1A RMS and 24V DC supply voltage. Three digital inputs can be configured as home and endstop switches or incremental encoder inputs. With its high energy efficiency from TRINAMIC’s CoolStep™ technology cost for power consumption is kept down. The TMCL firmware allows for both standalone and direct mode operation. Main characteristics • Motion controller & stepper motor driver: – Hardware motion profile calculation in real-time – On the fly alteration of motion parameters (e.g. position, velocity, acceleration) – High performance microcontroller for overall system control and communication protocol handling – Up to 256 microsteps per full step – High-efficient operation, low power dissipation – Dynamic current control – Integrated protection – StallGuard2™ feature for stall detection – CoolStep™ feature for reduced power consumption and heat dissipation – StealthChop™ feature for quiet operation and smooth motion – DcStep™ feature for load dependent speed control • Interfaces – CAN – Low-active enable pin – Three I/O modes: * Incremental Encoder and Home Switch * Home and Endstop Switches * One analog and two digital inputs Software TMCL: remote controlled operation alone or during step/direction mode. PC-based application development software TMCL-IDE available for free. Electrical data • Supply voltage: +6V and +24V nominal. • Motor current: up to 1A RMS / 1.41A peak (programmable). Please see also the separate Hardware Manual. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 1.1 6 / 100 StallGuard2 StallGuard2 is a high-precision sensorless load measurement using the back EMF of the coils. It can be used for stall detection as well as other uses at loads below those which stall the motor. The StallGuard2 measurement value changes linearly over a wide range of load, velocity, and current settings. At maximum motor load, the value reaches zero or is near zero. This is the most energy-efficient point of operation for the motor. stallGuard2 Load [Nm] Initial stallGuard2 (SG) value: 100% Max. load stallGuard2 (SG) value: 0 Maximum load reached. Motor close to stall. Motor stalls Figure 1: StallGuard2 Load Measurement as a Function of Load 1.2 CoolStep CoolStep is a load-adaptive automatic current scaling based on the load measurement via StallGuard2 adapting the required current to the load. Energy consumption can be reduced by as much as 75%. CoolStep allows substantial energy savings, especially for motors which see varying loads or operate at a high duty cycle. Because a stepper motor application needs to work with a torque reserve of 30% to 50%, even a constant-load application allows significant energy savings because CoolStep automatically enables torque reserve when required. Reducing power consumption keeps the ystem cooler, increases motor life, and allows cost reduction. 0,9 Efficiency with coolStep 0,8 Efficiency with 50v torque reserve 0,7 0,6 0,5 Efficiency 0,4 0,3 0,2 0,1 0 0 50 100 150 200 250 300 350 Velocity [RPM] Figure 2: Energy Efficiency Example with CoolStep ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 1.3 7 / 100 SixPoint Motion Controller TRINAMIC’s SixPoint motion controller is a new type of ramp generator which offers faster machine operation compared to the classical linear acceleration ramps. The SixPoint ramp generator allows adapting the acceleration ramps to the torque curves of a stepper motor. It uses two different acceleration settings for the acceleration phase and also tow different deceleration settings for the deceleration phase. Start and stop speeds greater than zero can also be used. Figure 3: Typical motion profile with TRINAMIC’s SixPoint motion controller A six point ramp begins using the start speed VSTART (which can also be zero). Then, the acceleration value A1 will be used to accelerate the motor to the speed V1. When the speed V1 has been reached, the motor will be further accelerated using the acceleration value A2 until it has reached the speed VMAX . The deceleration phase begins using the deceleration value D2. After reaching the speed V1 again the deceleration value D2 will be used to declerate to the stop speed VSTOP (which can also be zero). ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 2 8 / 100 First Steps with TMCL In this chapter you can find some hints for your first steps with the TMCM-1270 and TMCL. You may skip this chapter if you are already familiar with TMCL and the TMCL-IDE. Things that you will need • Your TMCM-1270 Module. • A CAN adapter. • A power supply (24V DC) for your TMCM-1270 module. • The TMCL-IDE 3.x already installed on your PC • A two-phase bipolar stepper motor. 2.1 Basic Setup First of all, you will need a PC with Windows (at least Windows 7) and the TMCL-IDE 3.x installed on it. If you do not have the TMCL-IDE installed on your PC then please download it from the TMCL-IDE product page of Trinamic’s website (http://www.trinamic.com) and install it on your PC. Please also ensure that your TMCM-1270 is properly connected to your power supply and that the stepper motor is properly connected to the module. Please see the TMCM-1270 hardware manual for instructions on how to do this. Do not connect or disconnect a stepper motor to or from the module while the module is powered! Then, please start up the TMCL-IDE. After that you can connect your TMCM-1270 via CAN and switch on the power supply for the module (while the TMCL-IDE is running on your PC). The module will be recognized by the TMCL-IDE, and necessary driver registrations in Windows will automatically done by the TMCL-IDE. 2.2 Using the TMCL Direct Mode At first try to use some TMCL commands in direct mode. In the TMCL-IDE a tree view showing the TMCM1270 and all tools available for it is displayed. Click on the Direct Mode entry of the tool tree. Now, the Direct Mode tool will pop up. In the Direct Mode tool you can choose a TMCL command, enter the necessary parameters and execute the command. For example, choose the command ROL (rotate left). Then choose the appropriate motor (motor 0 if your motor is connected to the motor 0 connector). Now, enter the desired speed. Try entering 51200 (pps) as the value and then click the Execute button. The motor will now run. Choose the MST (motor stop) command and click Execute again to stop the motor. 2.3 Changing Axis Parameters Next you can try changing some settings (also called axis parameters) using the SAP command in direct mode. Choose the SAP command. Then choose the parameter type and the motor number. Last, enter the desired value and click execute to execute the command which then changes the desired parameter. The following table points out the most important axis parameters. Please see chapter 4 for a complete list of all axis parameters. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 9 / 100 Most important axis parameters Number Axis Parameter Description Range [Units] Access 4 Maximum positioning speed The maximum speed used for positioning ramps. 0. . . 7999774 [pps] RW 5 Maximum acceleration Maximum acceleration in positioning ramps. Acceleration and deceleration value in velocity mode. 0. . . 7629278 [pps2 ] RW 6 Maximum current Motor current used when motor is running. The maximum value is 255 which means 100% of the maximum current of the module. The current can be adjusted in 32 steps: 0. . . 255 RW 0. . . 7 79. . . 87 160. . . 167 240. . . 247 8. . . 15 88. . . 95 168. . . 175 248. . . 255 16. . . 23 96. . . 103 176. . . 183 24. . . 31 104. . . 111 184. . . 191 32. . . 39 112. . . 119 192. . . 199 40. . . 47 120. . . 127 200. . . 207 48. . . 55 128. . . 135 208. . . 215 56. . . 63 136. . . 143 216. . . 223 64. . . 71 144. . . 151 224. . . 231 72. . . 79 152. . . 159 232. . . 239 The most important setting, as too high values can cause motor damage. 7 Standby current The current used when the motor is not running. The maximum value is 255 which means 100% of the maximum current of the module. This value should be as low as possible so that the motor can cool down when it is not moving. 0. . . 255 RW 179 VSense Sense resistor voltage: 0 – High sense resistor voltage 1 – Low sense resistor voltage This parameter pre-selects the current range. High sense resistor voltage selects the higher maximum current range. 0/1 RW Table 1: Most important Axis Parameters 2.4 Testing with a simple TMCL Program Now, test the TMCL stand alone mode with a simple TMCL program. To type in, assemble and download the program, you will need the TMCL creator. This is also a tool that can be found in the tool tree of the TMCL-IDE. Click the TMCL creator entry to open the TMCL creator. In the TMCL creator, type in the following little TMCL program: ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 1 3 5 ROL 0 , 51200 WAIT TICKS , 0 , 500 MST 0 ROR 0 , 51200 WAIT TICKS , 0 , 500 MST 0 10 / 100 // Rotate motor 0 with speed 10000 // Rotate motor 0 with 50000 7 9 11 13 15 SAP 4 , 0 , 51200 SAP 5 , 0 , 51200 Loop : MVP ABS , 0 , 512000 WAIT POS , 0 , 0 MVP ABS , 0 , -512000 WAIT POS , 0 , 0 JA Loop // Set max . Velocity // Set max . Acceleration // Move to Position 512000 // Wait until position reached // Move to Position -512000 // Wait until position reached // Infinite Loop After you have done that, take the following steps: 1. Click the Assemble icon (or choose Assemble from the TMCL menu) in the TMCL creator to assemble the program. 2. Click the Download icon (or choose Download from the TMCL menu) in the TMCL creator to donwload the program to the module. 3. Click the Run icon (or choose Run from the TMCL menu) in the TMCL creator to run the program on the module. Also try out the debugging functions in the TMCL creator: 1. Click on the Bug icon to start the debugger. 2. Click the Animate button to see the single steps of the program. 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. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 3 11 / 100 TMCL and the TMCL-IDE — An Introduction As with most TRINAMIC modules the software running on the microprocessor of the TMCM-1270 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. New versions can be downloaded free of charge from the TRINAMIC website (http://www.trinamic.com). The TMCM-1270 supports TMCL direct mode (binary commands). It also implements standalone TMCL program execution. This makes it possible to write TMCL programs using the TMCL-IDE and store them in the memory of the module. In direct mode the TMCL communication over RS-232, RS-485, CAN, and USB follows a strict master/slave relationship. That is, a host computer (e.g. PC/PLC) acting as the interface bus master will send a command to the TMCM-1270. 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 specified command. As soon as this step has been done, the module will send a reply back over the interface to the bus master. Only then should the master transfer the next command. Normally, the module will just switch to transmission and occupy the bus for a reply, otherwise it will stay in receive mode. It will not send any data over the interface without receiving a command first. This way, any collision on the bus will be avoided when there are more than two nodes connected to a single bus. 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 standalone on the module. For this purpose there are not only motion control commands but also commands to control the program structure (like conditional jumps, compare and calculating). Every command has a binary representation and a mnemonic. The binary format is used to send commands from the host to a module in direct mode, whereas the mnemonic format is used for easy usage of the commands when developing standalone TMCL applications using the TMCL-IDE (IDE means Integrated Development Environment). There is also a set of configuration variables for the axis and for global parameters which allow individual configuration of nearly every function of a module. This manual gives a detailed description of all TMCL commands and their usage. 3.1 Binary Command Format Every command has a mnemonic and a binary representation. When commands are sent from a host to a module, the binary format has to be used. Every command consists of a one-byte command field, a one-byte type field, a one-byte motor/bank field and a four-byte value field. So the binary representation of a command always has seven bytes. When a command is to be sent via RS-232, RS-485, RS-422 or USB interface, it has to be enclosed by an address byte at the beginning and a checksum byte at the end. In these cases it consists of nine bytes. The binary command format with RS-232, RS-485, RS-422 and USB is as follows: ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 12 / 100 TMCL Command Format Bytes Meaning 1 Module address 1 Command number 1 Type number 1 Motor or Bank number 4 Value (MSB first!) 1 Checksum Table 2: TMCL Command Format Info Note 3.1.1 The checksum is calculated by accumulating all the other bytes using an 8-bit addition. When using the CAN interface, leave out the address byte and the checksum byte. With CAN, the CAN-ID is used as the module address and the checksum is not needed because CAN bus uses hardware CRC checking. 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 which show how to do this: Checksum calculation in C: 1 unsigned char i , Checksum ; unsigned char Command [9]; 3 5 7 9 // Set the Command array to the desired command Checksum = Command [0]; for ( i =1; i run infinitely 7.3 Using Symbolic Constants To make your program better readable and understandable, symbolic constants should be taken for all important numerical values that are used in the program. The TMCL-IDE provides an include file with symbolic names for all important axis parameters and global parameters. Please consider the following example: 1 3 5 // Define some constants # include TMCLParam . tmc MaxSpeed = 50000 MaxAcc = 10000 Position0 = 0 Position1 = 500000 7 9 // Initialization SAP APMaxPositioningSpeed , Motor0 , MaxSpeed SAP APMaxAcceleration , Motor0 , MaxAcc 11 13 15 MainLoop : MVP ABS , Motor0 , Position1 WAIT POS , Motor0 , 0 MVP ABS , Motor0 , Position0 ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 17 93 / 100 WAIT POS , Motor0 , 0 JA MainLoop Have a look at the file TMCLParam.tmc provided with the TMCL-IDE. It contains symbolic constants that define all important parameter numbers. 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. 7.4 Using Variables The user variables can be used if variables are needed in your program. They can store temporary values. The commands SGP, GGP and AGP as well as STGP and RSGP are used to work with user variables: • SGP is used to set a variable to a constant value (e.g. during initialization phase). • GGP is used to read the contents of a user variable and to copy it to the accumulator register for further usage. • AGP can be used to copy the contents of the accumulator register to a user variable, e.g. to store the result of a calculation. • The STGP command stores the contents of a user varaible in the EEPROM. • The RSGP command copies the value stored in the EEPROM back to the user variable. • Global parameter 85 controls if user variables will be restored from the EEPROM automatically on startup (default setting) or not (user variables will then be initialized with 0 instead). Please see the following example: 1 3 5 7 9 11 MyVariable = 42 // Use a symbolic name for the user variable // ( This makes the program better readable and understandable .) SGP MyVariable , 2 , 1234 // Initialize the variable with the value 1234 ... ... GGP MyVariable , 2 // Copy contents of variable to accumulator register CALC MUL , 2 // Multiply accumulator register with two AGP MyVariable , 2 // Store contents of accumulator register to variable ... ... Furthermore, these variables can provide a powerful way of communication between a TMCL program running on a module and a host. The host can change a variable by issuing a direct mode SGP command (remember that while a TMCL program is running direct mode commands can still be executed, without interfering with the running program). If the TMCL program polls this variable regularly it can react on such changes of its contents. The host can also poll a variable using GGP in direct mode and see if it has been changed by the TMCL program. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 7.5 94 / 100 Using Subroutines The CSUB and RSUB commands provide a mechanism for using subroutines. The CSUB command branches to the given label. When an RSUB command is executed the control goes back to the command that follows the CSUB command that called the subroutine. This mechanism can also be nested. From a subroutine called by a CSUB command other subroutines can be called. In the current version of TMCL eight levels of nested subroutine calls are allowed. 7.6 Combining Direct Mode and Standalone Mode Direct mode and standalone mode can also be combined. 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). So, it is also possible to query e.g. the actual position of the motor in direct mode while a TMCL program is running. Communication between a program running in standalone mode and a host can be done using the TMCL user variables. The host can then change the value of a user variable (using a direct mode SGP command) which is regularly polled by the TMCL program (e.g. in its main loop) and so the TMCL program can react on such changes. Vice versa, a TMCL program can change a user variable that is polled by the host (using a direct mode GGP command). A TMCL program can be started by the host using the run command in direct mode. This way, also a set of TMCL routines can be defined that are called by a host. In this case it is recommended to place JA commands at the beginning of the TMCL program that jump to the specific routines. This assures that the entry addresses of the routines will not change even when the TMCL routines are changed (so when changing the TMCL routines the host program does not have to be changed). Example: 2 4 6 8 10 // Jump commands to the TMCL routines Func1 : JA Func1Start Func2 : JA Func2Start Func3 : JA Func3Start Func1Start : MVP ABS , 0 , 1000 WAIT POS , 0 , 0 MVP ABS , 0 , 0 WAIT POS , 0 , 0 STOP 12 14 16 Func2Start : ROL 0 , 500 WAIT TICKS , 0 , 100 MST 0 STOP 18 20 22 Func3Start : ROR 0 , 1000 WAIT TICKS , 0 , 700 MST 0 STOP ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 95 / 100 This example provides three very simple TMCL routines. They can be called from a host by issuing a run command with address 0 to call the first function, or a run command with address 1 to call the second function, or a run command with address 2 to call the third function. You can see the addresses of the TMCL labels (that are needed for the run commands) by using the ”Generate symbol file function” of the TMCL-IDE. 7.7 Make the TMCL Program start automatically For stand-alone operation the module has to start the TMCL program in its memory automatically after power-on. In order to achieve this, switch on the Autostart option of the module. This is controlled by global parameter #77. There are different ways to switch on the Autostart option: • Execute the command SGP 77, 0, 1 in direct mode (using the Direct Mode tool in the TMCL-IDE). • Use the Global Parameters tool in the TMCL-IDE to set global parameter #77 to 1. • 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"’. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 8 96 / 100 Figures Index 1 2 3 4 5 6 StallGuard2 Load Measurement as a Function of Load . . . . . . . . . . . . . 6 Energy Efficiency Example with CoolStep 6 Typical motion profile with TRINAMIC’s SixPoint motion controller . . . . . . . . 7 Reference Search Mode 1 . . . . . . . . 83 Reference Search Mode 2 . . . . . . . . 83 Reference Search Mode 3 . . . . . . . . 84 ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com 7 8 9 10 11 12 Reference Search Mode 4 . . . . Reference Search Mode 5 . . . . Reference Search Mode 6 . . . . Reference Search Mode 7 . . . . Reference Search Mode 8 . . . . CoolStep Adjustment Points and Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 85 85 86 86 . . . . 88 TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 9 97 / 100 Tables Index 1 2 3 4 5 6 7 8 9 10 11 12 13 Most important Axis Parameters . TMCL Command Format . . . . . . TMCL Reply Format . . . . . . . . . TMCL Status Codes . . . . . . . . . Overview of all TMCL Commands Motion Commands . . . . . . . . . Parameter Commands . . . . . . . Branch Commands . . . . . . . . . I/O Port Commands . . . . . . . . Calculation Commands . . . . . . Interrupt Processing Commands . Interrupt Vectors . . . . . . . . . . TMCL Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 12 13 13 16 16 17 17 17 18 18 19 68 ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com 14 All TMCM-1270 Axis Parameters . . . 15 Meaning of the Letters in the Access Column . . . . . . . . . . . . . . . . . . 16 All Global Parameters of the TMCM-1270 Module in Bank 0 . . . . 17 User Variables in Bank 2 . . . . . . . . 18 Interrupt Parameters in Bank 3 . . . . 19 Reference Search Modes . . . . . . . 20 CoolStep Adjustment Points and Thresholds . . . . . . . . . . . . . . . . 21 SixPoint Ramp Parameters . . . . . . 22 Firmware Revision . . . . . . . . . . . 23 Document Revision . . . . . . . . . . . . 77 . 78 . . . . 80 80 81 82 . 89 . 91 . 100 . 100 TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 10 98 / 100 Supplemental Directives 10.1 Producer Information 10.2 Copyright TRINAMIC owns the content of this user manual in its entirety, including but not limited to pictures, logos, trademarks, and resources. © Copyright 2020 TRINAMIC. All rights reserved. Electronically published by TRINAMIC, Germany. Redistributions of source or derived format (for example, Portable Document Format or Hypertext Markup Language) must retain the above copyright notice, and the complete Datasheet User Manual documentation of this product including associated Application Notes; and a reference to other available product-related documentation. 10.3 Trademark Designations and Symbols Trademark designations and symbols used in this documentation indicate that a product or feature is owned and registered as trademark and/or patent either by TRINAMIC or by other manufacturers, whose products are used or referred to in combination with TRINAMIC’s products and TRINAMIC’s product documentation. This TMCL™ Firmware Manual is a non-commercial publication that seeks to provide concise scientific and technical user information to the target user. Thus, trademark designations and symbols are only entered in the Short Spec of this document that introduces the product at a quick glance. The trademark designation /symbol is also entered when the product or feature name occurs for the first time in the document. All trademarks and brand names used are property of their respective owners. 10.4 Target User The documentation provided here, is for programmers and engineers only, who are equipped with the necessary skills and have been trained to work with this type of product. The Target User knows how to responsibly make use of this product without causing harm to himself or others, and without causing damage to systems or devices, in which the user incorporates the product. 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 specific written consent of TRINAMIC Motion Control GmbH & Co. KG. Life support systems are equipment intended to support or sustain life, and whose failure to perform, when properly used in accordance with instructions provided, can be reasonably expected to result in personal injury or death. Information given in this document is believed to be accurate and reliable. However, no responsibility is assumed for the consequences of its use nor for any infringement of patents or other rights of third parties which may result from its use. Specifications are subject to change without notice. 10.6 Disclaimer: Intended Use The data specified in this user manual is intended solely for the purpose of product description. No representations or warranties, either express or implied, of merchantability, fitness for a particular purpose ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 99 / 100 or of any other nature are made hereunder with respect to information/specification or the products to which information refers and no guarantee with respect to compliance to the intended use is given. 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 significant personal injury or death (safety-Critical Applications) without TRINAMIC’s specific written consent. TRINAMIC products are not designed nor intended for use in military or aerospace applications or environments or in automotive applications unless specifically designated for such use by TRINAMIC. TRINAMIC conveys no patent, copyright, mask work right or other trade mark right to this product. TRINAMIC assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. 10.7 Collateral Documents & Tools This product documentation is related and/or associated with additional tool kits, firmware and other items, as provided on the product page at: www.trinamic.com. ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com TMCM-1270 TMCL™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.03 • 2020-APR-16 11 100 / 100 Revision History 11.1 Firmware Revision Version Date Author Description V0.04 2016-JUL-12 BS Preliminary release. V0.09 2016-SEP-26 BS Complete axis parameter list. V1.00 2016-NOV-18 BS First release. V1.13 2018-JUN-28 OK Parameters #6 and #7 made compatible with all other modules. TMCL interrupt commands and parameters (bank 3) added. Parameter #254 removed (input mode switching no longer necessary). Table 22: Firmware Revision 11.2 Document Revision Version Date Author Description V0.8 2016-JUL-12 BS Exported from xml. V0.9 2016-SEP-26 BS First complete version. V1.00 2016-NOV-18 BS Changes of Firmeware V1.00 included. V1.01 2018-JUL-12 OK Changes of firmware V1.13 included. Sections about sixPoint ramp included. V1.02 2019-MAR-20 OK Missing encoder functions included. V1.03 2020-APR-16 OK Superfluous axis parameter #215 removed. Table 23: Document Revision ©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany Terms of delivery and rights to technical change reserved. Download newest version at www.trinamic.com Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Trinamic: TMCM-1270-TMCL
TMCM-1270-TMCL 价格&库存

很抱歉,暂时无法提供与“TMCM-1270-TMCL”相匹配的价格&库存,您可以联系我们找货

免费人工找货
TMCM-1270-TMCL

    库存:0