Trinamic TMCM-1311 Скачать руководство пользователя страница 1

 

MODULE FOR

 STEPPER MOTORS

 

    

  

                                   MODULE

 

  

 

 

 
 
 
 
 

TRINAMIC Motion Control GmbH & Co. KG 

 

Hamburg, Germany 
 

www.trinamic.com 

 
 
 
 

  

Firmware Version V1.11 

TMCL™ FIRMWARE MANUAL 

 

+

 

TMCM-1311

 

 

 

 

 

 
 
 
 
 
 
 
 
 

 

+    

 
 

 

 

 

1-Axis Stepper 
Closed Loop Controller/Driver 
3.0

 

A / 48

 

Encoder Input 
18 GPIOs 
USB, CAN, RS485 
 
 
 
 

 

 

Содержание TMCM-1311

Страница 1: ...RS MODULE TRINAMIC Motion Control GmbH Co KG Hamburg Germany www trinamic com Firmware Version V1 11 TMCL FIRMWARE MANUAL TMCM 1311 1 Axis Stepper Closed Loop Controller Driver 3 0 A 48 V Encoder Input 18 GPIOs USB CAN RS485 ...

Страница 2: ... 20 5 4 I O Port Commands 20 5 5 Calculation Commands 21 5 6 Interrupt Commands 21 5 6 1 Interrupt Types 21 5 6 2 Interrupt Processing 21 5 6 3 Interrupt Vectors 22 5 6 4 Further Configuration of Interrupts 22 5 6 5 Using Interrupts in TMCL 22 5 6 6 ASCII Commands 23 5 7 Commands 24 5 7 1 ROR rotate right 24 5 7 2 ROL rotate left 25 5 7 3 MST motor stop 26 5 7 4 MVP move to position 27 5 7 5 SAP s...

Страница 3: ... 8 Closed Loop Operation Related Axis Parameter 80 8 1 General Closed Loop Axis Parameters 80 8 2 General Structure of the Closed Loop System 81 8 3 Setting Encoder Resolution and Motor Resolution 82 8 4 Positioning Mode 83 8 5 Position Maintenance and Standstill Mode 86 8 6 Velocity Mode 88 8 7 Torque Mode 89 8 8 Current Regulation 90 8 9 Field Weakening 94 8 10 Status and Feedback Information 95...

Страница 4: ...tion for open load operation Encoder Encoder input for incremental a b n TTL OC or diff Interfaces RS485 2 wire communication interface CAN 2 0B communication interface 4x DIP switch for CAN RS485 address setting or other settings USB 2 0 full speed 12Mbit s communication interface mini USB connector Encoder input incremental a b n TTL OC or diff Dedicated STOP_L STOP_R inputs Up to 8 multi purpos...

Страница 5: ...d can be used in several industrial demanding applications Benefits of Stepper Drive High torque without gearing No feedback loop oscillations High precision Precise velocity control Benefits of Servo Drive Reaction to any impact No position loss Torque control TMCM 1311 Figure 2 1 TMCM 1311 characteristics in closed loop mode THE TRINAMIC CLOSED LOOP MODE OPERATION prevents the motor from stall a...

Страница 6: ...e operation is desired 3 1 Connecting the TMCM 1311 1 Ref Sw S D IN Stepper Motor 1 Power Pin 1 GND Pin 2 VDRIVER Motor Pin 1 A1 Pin 2 A2 Pin 3 B1 Pin 4 B2 USB In Out 1 In Out 0 1 5 6 9 USB R S 4 8 5 CAN CAN Pin 2 CAN_L Pin 7 CAN_H Pin 3 GND RS485 Pin 2 RS485 Pin 7 RS485 Pin 3 GND CAN RS485 Converter e g USB 2 485 Converter e g USB 2 X Serial USB interface USB Encoder Pin 1 GND Pin 2 5V Pin 3 A Pi...

Страница 7: ... environment TMCL IDE With global parameter 88 interface selection the RS485 interface can be selected TMCL command for changing to the RS485 interface SGP 88 0 Pin Label Direction Description 1 2 RS485 Bi directional Differential RS485 bus signal inverting 3 GND Power GND Signal and system ground 4 5 6 7 RS485 Bi directional Differential RS485 bus signal non inverting 8 9 c USB interface For usin...

Страница 8: ...input Supply voltage for everything else apart from the stepper motor driver The on board voltage regulator generates the necessary voltages for the digital circuits from this supply The pin can be left unconnected In this case a diode between VDRIVER and VDIGITAL ensures the supply for the digital parts ATTENTION The diode has a current rating of 3A As VDIGTIAL is available at the I O connectors ...

Страница 9: ... the TMCM 1310 1311 GUI with a double click The following window will appear on the screen see Figure 3 2 The software detects your module and the related virtual com port for USB automatically if the file TMCM 1311 inf is installed correctly Now click Connect to connect the module and start the trace controller in case you like to work with graphs for velocity positioning or torque Figure 3 2 Wel...

Страница 10: ...rt tab Now choose closed loop mode or open loop mode operation Choose open loop mode or closed loop mode Click here to initialize the encoder Figure 3 4 Quickstart tab HOW TO INITIALIZE THE ENCODER Fill in the fullstep resolution of your motor and click Start encoder initialization The motor will rotate just one round to initialize the encoder If the encoder has been detected successfully the appr...

Страница 11: ... another program Open TMCL IDE by clicking TMCL exe Choose Setup and Options and thereafter the Connection tab 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 Please refer to the TMCL IDE Use...

Страница 12: ...es interface power supply COM port baud rate 3 Issue a command by choosing Instruction Type if necessary Motor and Value and click Execute to send it to the module Examples ROR rotate right motor 0 value 50000 Click Execute The motor is rotating now MST motor stop motor 0 Click Execute The motor stops now Top right of the TMCL Direct Mode window is the button Copy to editor Click here to copy the ...

Страница 13: ...king the Download icon 3 Click the Run icon The desired program will be executed 4 Click the Stop button to stop the program ROL 0 50000 Rotate motor 0 with speed 50000 WAIT TICKS 0 500 MST 0 ROR 0 50000 Rotate motor 0 with 50000 WAIT TICKS 0 500 MST 0 SAP 4 0 50000 Set max Velocity SAP 5 0 50000 Set max Acceleration Loop MVP ABS 0 100000 Move to Position 10000 WAIT POS 0 0 Wait until position rea...

Страница 14: ... parameter requires re calculation of the acceleration factor no 146 and the acceleration divisor no 137 which is done automatically See TMC 429 datasheet for calculation of physical units 1 33554431 pps s 6 Absolute max current CS Current Scale The maximum value is 255 This value means 100 of the maximum current of the module The current adjustment is within the range 0 255 and can be adjusted in...

Страница 15: ...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 ...

Страница 16: ...sum byte Command array 0 8 of byte Set the Command array to the desired command Calculate the Checksum Checksum Command 0 for i 1 to 7 do Checksum Checksum Command i Command 8 Checksum Now send the Command array 9 bytes to the module 4 2 Reply Format Every time a command has been sent to a module the module sends a reply The reply format for RS485 USB is as follows Bytes Meaning 1 Reply address 1 ...

Страница 17: ...on EEPROM locked 6 Command not available 4 3 Standalone Applications The module is equipped with a TMCL memory for storing TMCL applications You can use TMCL IDE for developing standalone TMCL applications You can download a program into the EEPROM and afterwards it will run on the module The TMCL IDE contains an editor and the TMCL assembler where the commands can be entered using their mnemonic ...

Страница 18: ...N These command lines would address the module with address 1 To address e g module 3 use address character C instead of A The last command line shown above will make the module return to binary mode 4 4 2 Format of a Reply After executing the command the module sends back a reply in ASCII format The reply consists of the address character of the host host address that can be set in the module the...

Страница 19: ...lt Bit 4 and Bit 5 determine how the characters that are entered are echoed back Normally both bits are set to zero In this case every character that is entered is echoed back when the module is addressed Character can also be erased using the backspace character press the backspace key in a terminal program When bit 4 is set and bit 5 is clear the characters that are entered are not echoed back i...

Страница 20: ...e used in direct mode and in standalone mode 5 3 Control Commands These commands are used to control the program flow loops conditions jumps etc It does not make sense to use them in direct mode They are intended for standalone mode only Mnemonic Command number Meaning JA 22 Jump always JC 21 Jump conditional COMP 20 Compare accumulator with constant value CSUB 23 Call subroutine RSUB 24 Return fr...

Страница 21: ...e TMCL program running on the module 5 6 Interrupt Commands Due to some customer requests interrupt processing has been introduced in the TMCL firmware for ARM based modules Mnemonic Command number Meaning EI 25 Enable interrupt DI 26 Disable interrupt VECT 37 Set interrupt vector RETI 38 Return from interrupt 5 6 1 Interrupt Types There are many different interrupts in TMCL like timer interrupts ...

Страница 22: ...7 9 for further information about that 5 6 5 Using Interrupts in TMCL To use an interrupt the following things have to be done Define an interrupt handling routine using the VECT command If necessary configure the interrupt using an SGP type 3 value command Enable the interrupt using an EI interrupt command Globally enable interrupts using an EI 255 command An interrupt handling routine must alway...

Страница 23: ...defines symbolic constants for all interrupt numbers which can be used in all interrupt commands The beginning of the program above 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 5 6 6 ASCII Commands Mnemonic Command number Meaning 139 Enter ASCII mode BIN Quit ASCII ...

Страница 24: ... of this value into rounds per minute etc please refer to chapter 6 1 also The range is 268 435 455 268 435 454 Internal function first velocity mode is selected Then the velocity value is transferred to axis parameter 2 target velocity Related commands ROL MST SAP GAP Mnemonic ROR 0 velocity Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 1 don t care motor 0 velocity 268 435 455 268 435...

Страница 25: ...so The range is 268 435 455 268 435 454 Internal function first velocity mode is selected Then the velocity value is transferred to axis parameter 2 target velocity Related commands ROR MST SAP GAP Mnemonic ROL 0 velocity Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 2 don t care motor 0 velocity 268 435 455 268 435 454 Motor number is always O as the module support just one axis Reply ...

Страница 26: ...P Mnemonic MST 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 3 don t care motor 0 don t care Motor number is always O as the module support just one axis Reply in direct mode STATUS VALUE 100 OK don t care Example Stop motor 0 Mnemonic MST 0 Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Operand By...

Страница 27: ...position in the range from 2 147 483 648 2 147 483 647 Starting a relative movement by means of an offset to the actual position In this case the new resulting position value must not exceed the above mentioned limits too Moving the motor to a previously stored coordinate refer to SCO for details Please note that the distance between the actual position and the new one should not be more than 2 14...

Страница 28: ... Move motor 0 from current position 1000 steps backward move relative 1000 Mnemonic MVP REL 0 1000 Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Operand Byte0 Value hex 01 04 01 00 ff ff fc 18 Example Move motor 0 to previously stored coordinate 8 Mnemonic MVP COORD 0 8 Binary Byte Index 0 1 2 3 4 5 6 7 Functi...

Страница 29: ...ate device Related commands GAP STAP RSAP AAP Mnemonic SAP parameter number 0 value Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 5 parameter number motor 0 value Motor number is always O as only one motor is involved Reply in direct mode STATUS VALUE 100 OK don t care For a table with parameters and values which can be used together with this command please refer to chapter 6 Example S...

Страница 30: ...s or ones for negative values Related commands SAP STAP AAP RSAP Mnemonic GAP parameter number 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 6 parameter number motor 0 don t care Motor number is always O as only one motor is involved Reply in direct mode STATUS VALUE 100 OK don t care For a table with parameters and values which can be used together with this command please refer to c...

Страница 31: ...er is always O as only one motor is involved 1 The value operand of this function has no effect Instead the currently used value e g selected by SAP is saved Reply in direct mode STATUS VALUE 100 OK don t care For a table with parameters and values which can be used together with this command please refer to chapter 6 The STAP command will not have any effect when the configuration EEPROM is locke...

Страница 32: ...s RAM location Relate commands SAP STAP GAP and AAP Mnemonic RSAP parameter number 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 8 parameter number motor 0 don t care Motor number is always O as only one motor is involved Reply structure in direct mode STATUS VALUE 100 OK don t care For a table with parameters and values which can be used together with this command please refer to cha...

Страница 33: ... of the processor The TMCL user variables will not be stored in the EEPROM automatically but this can be done by using STGP commands For a table with parameters and bank numbers which can be used together with this command please refer to chapter 10 Internal function the parameter format is converted The parameter is transferred to the correct position in the appropriate on board device Related co...

Страница 34: ...0 Internal function the parameter is read out of the correct position in the appropriate device The parameter format is converted Related commands SGP STGP RSGP AGP Mnemonic GGP parameter number bank number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 10 parameter number bank number don t care Reply in direct mode STATUS VALUE 100 OK don t care Example Get the serial address of the tar...

Страница 35: ...numbers which can be used together with this command please refer to chapter 10 Internal function the specified parameter is copied from its RAM location to the configuration EEPROM Related commands SGP GGP RSGP AGP Mnemonic STGP parameter number bank number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 11 parameter number bank number don t care Reply in direct mode STATUS VALUE 100 OK ...

Страница 36: ...bank numbers which can be used together with this command please refer to chapter 10 Internal function The specified parameter is copied from the configuration EEPROM memory to its RAM location Relate commands SGP STGP GGP and AGP Mnemonic RSGP parameter number bank number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 12 parameter number bank number don t care Reply structure in direct ...

Страница 37: ...checked Internal function the reference search is implemented as a state machine Interaction is possible during execution Related commands WAIT Mnemonic RFS START STOP STATUS 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 13 0 START start ref search 1 STOP abort ref search 2 STATUS get status motor 0 see below Motor number is always O as only one motor is involved Reply in direct mode ...

Страница 38: ...AIT Mnemonic SIO port number bank number value Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 14 port number bank number 2 value 0 1 Reply structure STATUS VALUE 100 OK don t care Example Set OUT_7 to high bank 2 output 7 Mnemonic SIO 7 2 1 Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Operand Byte0 ...

Страница 39: ...eewheeling diode 10 OUT3 OUT7 Output Open drain output max 1A Integrated freewheeling diode I O PORTS USED FOR SIO AND COMMAND I O Connector Pin I O port Command Range 0 7 OUT_0 SIO 0 2 n 1 0 0 8 OUT_1 SIO 1 2 n 1 0 0 9 OUT_2 SIO 2 2 n 1 0 0 10 OUT_3 SIO 3 2 n 1 0 1 7 OUT_4 SIO 4 2 n 1 0 1 8 OUT_5 SIO 5 2 n 1 0 1 9 OUT_6 SIO 6 2 n 1 0 1 10 OUT_7 SIO 7 2 n 1 0 ADDRESSING ALL OUTPUT LINES WITH ONE S...

Страница 40: ...d of the reply without affecting the accumulator The actual status of a digital output line can also be read Internal function the specified line is read Related commands SIO WAIT Mnemonic GIO port number bank number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 15 port number bank number don t care Reply in direct mode STATUS VALUE 100 OK status of the port Example Get the analogue val...

Страница 41: ...put 24V compatible 7 OUT0 OUT4 Output Open drain output max 100mA Integrated freewheeling diode 8 OUT1 OUT5 Output Open drain output max 100mA Integrated freewheeling diode 9 OUT2 OUT6 Output Open drain output max 100mA Integrated freewheeling diode 10 OUT3 OUT7 Output Open drain output max 1A Integrated freewheeling diode 5 7 15 1 I O Bank 0 Digital Inputs The ADIN lines can be read as digital or...

Страница 42: ...puts at the same time The digital states can be accessed in bank 0 FURTHER READ OUT COMMANDS I O port Command Supply voltage 1 10V GIO 8 1 Temperature C GIO 9 1 Coil current A mA GIO 10 1 Coil current B mA GIO 11 1 Input current mA GIO 12 1 5 7 15 3 I O Bank 2 States of Digital Outputs The states of the OUT lines that have been set by SIO commands can be read back using bank 2 I O Connector Pin I ...

Страница 43: ...TION NO TYPE operation MOT BANK VALUE 19 0 ADD add to accu 1 SUB subtract from accu 2 MUL multiply accu by 3 DIV divide accu by 4 MOD modulo divide by 5 AND logical and accu with 6 OR logical or accu with 7 XOR logical exor accu with 8 NOT logical invert accu 9 LOAD load operand to accu don t care operand Example Multiply accu by 5000 Mnemonic CALC MUL 5000 Binary Byte Index 0 1 2 3 4 5 6 7 Functi...

Страница 44: ...ording to the comparison result Related commands JC jump conditional GAP GGP GIO CALC CALCX Mnemonic COMP value Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 20 don t care don t care comparison value Example Jump to the address given by the label when the position of motor is greater than or equal to 1000 GAP 1 2 0 get axis parameter type no 1 actual position motor 0 value 0 don t care ...

Страница 45: ...ic JC condition label Binary representation INSTRUCTION NO TYPE condition MOT BANK VALUE 21 0 ZE zero 1 NZ not zero 2 EQ equal 3 NE not equal 4 GT greater 5 GE greater equal 6 LT lower 7 LE lower equal 8 ETO time out error don t care jump address Example Jump to address given by the label when the position of motor is greater than or equal to 1000 GAP 1 0 0 get axis parameter type no 1 actual posi...

Страница 46: ...JC WAIT CSUB Mnemonic JA Label Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 22 don t care don t care jump address Example An infinite loop in TMCL Loop MVP ABS 0 10000 WAIT POS 0 0 MVP ABS 0 0 WAIT POS 0 0 JA Loop Jump to the label Loop Binary format of JA Loop assuming that the label Loop is at address 20 Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor...

Страница 47: ... will be ignored if there is no more stack space left Related commands RSUB JA Mnemonic CSUB Label Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 23 don t care don t care subroutine address Example Call a subroutine Loop MVP ABS 0 10000 CSUB SubW Save program counter and jump to label SubW MVP ABS 0 0 JA Loop SubW WAIT POS 0 0 WAIT TICKS 0 50 RSUB Continue with the command following the ...

Страница 48: ...ack is empty Related command CSUB Mnemonic RSUB Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 24 don t care don t care don t care Example Call a subroutine Loop MVP ABS 0 10000 CSUB SubW Save program counter and jump to label SubW MVP ABS 0 0 JA Loop SubW WAIT POS 0 0 WAIT TICKS 0 50 RSUB Continue with the command following the CSUB command Binary format of RSUB Byte Index 0 1 2 3 4 5 6...

Страница 49: ...be specified by the ticks parameter The timeout flag ETO will be set after a timeout limit has been reached You can then use a JC ETO command to check for such errors or clear the error using the CLE command Internal function the TMCL program counter is held until the specified condition is met Related commands JC CLE Mnemonic WAIT condition 0 ticks Binary representation INSTRUCTION NO TYPE condit...

Страница 50: ...rect mode Internal function TMCL instruction fetching is stopped Related commands none Mnemonic STOP Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 28 don t care don t care don t care Example Mnemonic STOP Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Operand Byte0 Value hex 01 1c 00 00 00 00 00 00 ...

Страница 51: ...E MOT BANK VALUE 30 coordinate number 0 20 motor 0 position 2 147 483 648 2 147 483 647 Motor number is always O as only one motor is involved Reply in direct mode STATUS VALUE 100 OK don t care Example Set coordinate 1 of motor to 1000 Mnemonic SCO 1 0 1000 Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Operan...

Страница 52: ... representation INSTRUCTION NO TYPE MOT BANK VALUE 31 coordinate number 0 20 motor 0 don t care Motor number is always O as only one motor is involved Reply in direct mode STATUS VALUE 100 OK don t care Example Get motor value of coordinate 1 Mnemonic GCO 1 0 Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Operand Byte3 Operand Byte2 Operand Byte1 Opera...

Страница 53: ...inate number 0 is always stored in RAM only Internal function the selected 24 bit position values are written to the 20 by 3 bytes wide coordinate array Related commands SCO GCO MVP Mnemonic CCO coordinate number motor Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 32 coordinate number 0 20 motor 0 don t care Motor number is always O as only one motor is involved Reply in direct mode STA...

Страница 54: ... about storing coordinates refer to the SCO command Internal function the actual value of the accumulator is stored in the internal position array Related commands GCO CCO MVP COORD SCO Mnemonic ACO coordinate number 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 39 coordinate number 0 20 motor 0 don t care Motor number is always O as only one motor is involved Reply in direct mode STA...

Страница 55: ...RUCTION NO TYPE operation MOT BANK VALUE 33 0 ADD add X register to accu 1 SUB subtract X register from accu 2 MUL multiply accu by X register 3 DIV divide accu by X register 4 MOD modulo divide accu by x register 5 AND logical and accu with X register 6 OR logical or accu with X register 7 XOR logical exor accu with X register 8 NOT logical invert X register 9 LOAD load accu to X register 10 SWAP...

Страница 56: ...GAP SGP GGP GIO GCO CALC CALCX Mnemonic AAP parameter number 0 Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 34 parameter number motor 0 don t care Motor number is always O as only one motor is involved Reply in direct mode STATUS VALUE 100 OK don t care Example Positioning motor by a potentiometer connected to the analogue input 0 Start GIO 0 1 get value of analogue input line 0 CALC M...

Страница 57: ...ot be modified automatically by a standalone application For a table with parameters and bank numbers which can be used together with this command please refer to chapter 10 Related commands AAP SGP GGP SAP GAP GIO Mnemonic AGP parameter number bank number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 35 parameter number bank number don t care Reply in direct mode STATUS VALUE 100 OK do...

Страница 58: ...ar all error flags ETO clear the timeout flag EDV clear the deviation flag Related commands JC Mnemonic CLE flags where flags ALL ETO EDV EPO Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 36 0 ALL all flags 1 ETO timeout flag 3 EDV deviation flag don t care don t care Example Reset the timeout flag Mnemonic CLE ETO Binary Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Nu...

Страница 59: ...are label The following table shows all interrupt vectors that can be used Interrupt number Interrupt type 0 Timer 0 1 Timer 1 2 Timer 2 3 Target position reached 15 stallGuard2 21 Deviation 27 Left stop switch 28 Right stop switch 39 Input change 0 40 Input change 1 41 Input change 2 42 Input change 3 43 Input change 4 44 Input change 5 45 Input change 6 46 Input change 7 255 Global interrupts Ex...

Страница 60: ...ion reached 15 stallGuard2 21 Deviation 27 Left stop switch 28 Right stop switch 39 Input change 0 40 Input change 1 41 Input change 2 42 Input change 3 43 Input change 4 44 Input change 5 45 Input change 6 46 Input change 7 255 Global interrupts Examples Enable interrupts globally EI 255 Binary format of EI Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Oper...

Страница 61: ...tion reached 15 stallGuard2 21 Deviation 27 Left stop switch 28 Right stop switch 39 Input change 0 40 Input change 1 41 Input change 2 42 Input change 3 43 Input change 4 44 Input change 5 45 Input change 6 46 Input change 7 255 Global interrupts Examples Disable interrupts globally DI 255 Binary format of DI Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction Number Type Motor Bank Op...

Страница 62: ...saved registers A register X register flags are copied back Normal program execution continues Related commands EI DI VECT Mnemonic RETI Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 38 don t care don t care don t care Example Terminate interrupt handling and continue with normal program execution RETI Binary format of RETI Byte Index 0 1 2 3 4 5 6 7 Function Target address Instruction ...

Страница 63: ...for a customer specific programming Internal function Call user specific functions implemented in C by TRINAMIC Related commands none Mnemonic UF0 UF7 parameter number Binary representation INSTRUCTION NO TYPE MOT BANK VALUE 64 71 user defined user defined user defined Reply in direct mode Byte Index 0 1 2 3 4 5 6 7 Function Target address Target address Status Instruction Operand Byte3 Operand By...

Страница 64: ...YPE MOT BANK VALUE 138 don t care don t care 0 Motor number Reply in direct mode right after execution of this command Byte Index 0 1 2 3 4 5 6 7 Function Target address Target address Status Instruction Operand Byte3 Operand Byte2 Operand Byte1 Operand Byte0 Value hex 02 01 100 138 00 00 00 Motor bit mask Additional reply in direct mode after motors have reached their target positions Byte Index ...

Страница 65: ...at Motor Bank and Value are ignored 137 don t care Reset to factory defaults Reset all settings stored in the EEPROM to their factory defaults This command does not send back a reply Value must be 1234 FURTHER INFORMATION ABOUT COMMAND 136 Type set to 0 reply as a string Byte index Contents 1 Host Address 2 9 Version string 8 characters e g 1311V107 There is no checksum in this reply format Type s...

Страница 66: ... Basic parameters should be adjusted to motor application for proper module operation Parameters for the more experienced user please do not change unless you are absolutely sure Parameters for closed loop operation Number Axis Parameter Description Range Unit Acc 0 Target position The desired position in position mode see ramp mode no 138 2 147 483 648 2 147 483 647 µsteps encoder steps RW 1 Actu...

Страница 67: ... switch status The logical state of the left limit switch 0 1 R 12 Right limit switch disable If set deactivates the stop function of the right switch 0 1 RWE 13 Left limit switch disable Deactivates the stop function of the left switch resp reference switch if set 0 1 RWE 14 CL torque mode target current Target RMS current value for torque mode Positive and negative values define rotation directi...

Страница 68: ...to increasing the I t exceed counter 0 4294967295 RWE 27 I t sum Actual sum of the I t monitor 0 4294967295 R 28 I t exceed counter Counts how often an I t sum was higher than the I t limit 0 4294967295 RWE 29 Clear I t exceeded flag Clear the flag that indicates that the I t sum has exceeded the I t limit ignored W 108 CL field weakening minimum velocity Minimum motor speed at which the speed dep...

Страница 69: ...s RW 117 CL current scale upper error limit Position error from which on the current amplitude will be increased to its configured maximum parameter 114 This parameter must be higher than axis parameter 116 Default 255 encoder steps RW 118 CL current scale increment value Current scale increment value if the actual current scale factor is below the calculated current scale factor target value This...

Страница 70: ...value of the current scale factor 0 255 1 256 R 124 CL correction velocity proportional factor Proportional factor for on line live position lag compensation in positioning mode during a ramp movement For a very quick compensation while the drive is active choose a high the maximum value 0 65535 RW 125 CL max following error Maximum allowed following error during a ramp movement in positioning mod...

Страница 71: ... mode the closed loop system will be initialized Attention Wait for the closed loop init flag to be set to 1 after switching to closed loop mode see parameter 133 0 1 RW 130 Start Stop velocity Ramp generation for acceleration and deceleration begins ends with this start and stop velocity value When set to equal to the target speed no ramp is generated When set smaller than the target velocity als...

Страница 72: ...e A value of 20 typically provides good results Higher values provide higher stiffness For values greater than 25 a dampening factor 0 axis parameter 137 should be used as well to prevent from oscillations 10 50 Default 10 RW 137 CL standstill position error dampening factor When the target position is reached the velocity regulation is switched off and the system is in a standstill mode where the...

Страница 73: ...rivers 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 0 3 RW 163 Chopper mode Selection of the chopper mode 0 spread cycle 1 classic const off time 0 1 RW 164 Chopper hysteresis decrement Hysteresis decrement setting This setting determines the slope of the hysteresis during on time and during fast decay time 0 fast decrement 3 v...

Страница 74: ...rrent up step Sets the current increment step The current becomes incremented for each measured stallGuard2 value below the lower threshold see smartEnergy hysteresis start current increment step size Scaling 0 3 1 2 4 8 0 slow increment 3 fast increment fast reaction to rising load 1 3 RW 172 smartEnergy hysteresis start The lower threshold for the stallGuard2 value see smart Energy current up st...

Страница 75: ... 32 32 0 31 RW 181 Stop on stall Below this speed motor will not be stopped Above this speed motor will stop in case stallGuard2 load value reaches zero 0 327 679 999 pps RW 182 smartEnergy threshold speed Above this speed coolStep becomes enabled 0 327 679 999 pps RW 183 smartEnergy slow run current Sets the motor current which is used below the threshold speed 0 255 𝐼𝐼𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 4 2𝐴𝐴 2...

Страница 76: ...16 bit 4 Null channel polarity active high when set 4 8 16 RWE 202 Motor Resolution Motor fullstep resolution 0 400 Default 200 fullsteps RW 204 Freewheeling Time after which the power to the motor will be cut when its velocity has reached zero Parameter is not valid in closed loop mode 0 65535 0 never msec RWE 206 Actual load value Readout of the actual load value used for stall detection stallGu...

Страница 77: ...and closed loop mode 2 147 483 648 2 147 483 647 µsteps RWE 214 Power down delay Standstill period before the current is changed down to standby current The standard value is 200 value equates 2000msec 1 65535 10msec RWE 230 Gamma Actual field weakening value field weakening speed dependent Back EMF compensation The read out value can be useful to choose values for axis parameters 108 and 109 0 25...

Страница 78: ... ENABLE input is not used 3 Always use run current resp maximum current The ENABLE input is not used 4 Open loop mode automatic current switching like 2 but the ENABLE input is additionally used to switch the driver stage completely off or on Closed loop mode maximum current The ENABLE input can be used to switch the driver stage completely on off 5 Closed loop mode and open loop mode always use r...

Страница 79: ...module The current adjustment is within the range 0 255 and can be adjusted in 32 steps The most important motor setting since too high values might cause motor damage 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 173 ...

Страница 80: ... target position differ Trapezoidal speed ramps are provided When switching into this mode using MVP ABS REL COORD the motor will immediately start when there is a position difference 1 Velocity mode The motor will run continuously and the speed will be changed with constant maximum acceleration if the parameter target speed is changed 2 Torque mode In closed loop mode only the motor can be driven...

Страница 81: ...high In closed loop mode the ramp generator provides extended functionality to control position and velocity The torque control block is used to control commutation angle and current level Further it provides an option to compensate back EMF at higher speeds Current level control can be switched off but closed loop operation is still possible When using current level control the current amplitude ...

Страница 82: ... The default value is 200 as most stepper motors have 200 fullsteps with 1 8 each If your motor is different you need to adapt parameter 202 by simply configuring the number of fullsteps of the motor AXIS PARAMETERS RELATED TO ENCODER RESOLUTION AND MOTOR RESOLUTION Number Axis parameter Description Units Default Acc 201 Encoder mode Operation mode of the encoder 4 bit 2 Clear encoder on next null...

Страница 83: ...he target velocity and the actual target position cannot be reached during movement due to high load blue broken line in Figure 8 2 a maximum correction velocity axis parameter 126 can be defined to compensate the position error between virtual target position of the ramp generator axis parameter 233 and actual position of the drive according to encoder feedback encoder counter axis parameter 209 ...

Страница 84: ... POSITIONING MODE Number Axis parameter Description Units Default Acc 0 Target position The desired position in position mode see ramp mode no 138 2 147 483 648 2 147 483 647 encoder steps RW 1 Actual position The current position of the motor 2 147 483 648 2 147 483 647 encoder steps RW 2 Target speed The desired speed in velocity mode see ramp mode parameter 138 In position mode this parameter i...

Страница 85: ... and a lag occurs during movement the velocity will be increased to the maximum correction speed to compensate the position lag following error If set to 0 or smaller than target velocity the ramp profile will be simply extended if there is a lag between actual position and commanded position If greater than target velocity the position lag will be compensated on line live 0 327 679 999 pps RW 127...

Страница 86: ...t position using a defined ramp profile If the position error is inside the standstill position error limit only the torque control block is used to maintain the target position Position Error microsteps Figure 8 4 Principle and parameters for position maintenance POSITION ERROR INSIDE THE STANDSTILL POSITION ERROR LIMIT BLUE AREA If load is applied to the motor shaft in standstill mode the target...

Страница 87: ...ty regulation will be switched off and the system is in a special standstill mode In this mode the position is hold and maintained as long as the position error is within the range of the standstill error limit axis parameter 138 around the target position This parameter is a gain factor for the position error used for position maintenance in standstill mode A value of 20 typically provides good r...

Страница 88: ...amp up can be made using a defined acceleration phase by setting axis parameter 5 When the target velocity is reached measured via encoder interface the velocity_reached flag GAP 16 is set A velocity reached window can be defined using axis parameter 17 If the actual velocity is within this window the target velocity is considered as reached Number Axis parameter Description Units Default Acc 16 C...

Страница 89: ...IS PARAMETERS RELATED TO TORQUE MODE Number Axis parameter Description Units Default Acc 14 CL torque mode target current Target RMS current value for torque mode Positive and negative values define rotation direction Writing a target value to this parameter automatically switches to torque mode Reading provides the actual configured target current while in torque mode Reading while in other modes...

Страница 90: ...r GAP 123 position error GAP 14 45 90 135 0 I_SCALE_MIN SAP 113 45 90 135 I_SCALE_MAX SAP 114 X_TARGET SAP 0 Current Scaler Lower Error Limit SAP 116 Current Scaler Upper Error Limit SAP 117 Figure 8 5 Basic principle of position error dependent current amplitude regulation EXPLANATIONS RELATED TO FIGURE 8 5 Based on the position error with respect to the actual target position the current amplitu...

Страница 91: ...s value is added or subtracted from the actual value until the actual target current scale factor is reached Axis parameters 120 and 121 define a delay timer value Each time the current scale factor needs to be updated increased or decreased a timer is started with the respective delay value The next increment or decrement will only be done when the timer is zero If the parameters 120 and 121 are ...

Страница 92: ...ps RW 117 CL current scale upper error limit Position error from which on the current amplitude will be increased to its configured maximum parameter 114 This parameter must be higher than axis parameter 116 Default 255 encoder steps RW 118 CL current scale increment value Current scale increment value if the actual current scale factor is below the calculated current scale factor target value Thi...

Страница 93: ...nable 1 current scaling function on for closed loop 0 current scaling function off closed loop operation is still possible The current scaling functionality can be switched off if full specified current amplitude shall be used all the time When switched on the current scaling functionality adapts the current according to the configured profile This saves energy and keeps the motor cooler Default 1...

Страница 94: ...an be read out on the fly using axis parameter 230 This mechanism is also applied in positioning and torque mode when exceeding the configured corner velocities gamma Velocity 0 max phase angle correction of 90 field weakening Vmin SAP 108 field weakening Vmax SAP 109 Figure 8 8 Principle and parameters for field weakening in velocity mode AXIS PARAMETERS RELATED TO FIELD WEAKENING Number Axis par...

Страница 95: ...n loop mode or closed loop not initialized 1 closed loop is initialized and ready for use See also axis parameter 129 0 1 150 Motor current Actual motor current 𝐴𝐴𝐴𝐴1512 𝐴𝐴𝐴𝐴1522 mA 151 Current Phase A Actual peak current Phase A mA 152 Current Phase B Actual peak current Phase B mA 153 Supply Voltage Actual value of supply voltage 1 10 V 154 DC Current Actual DC current of the complete module mot...

Страница 96: ...lag is set 8 11 1 Example Program 1 To run example program 1 an encoder with 40000 increments per rotation has to be connected For positioning the commands MVP ABS and WAIT POS are used Initialize the parameters SAP 6 0 128 max current SAP 202 0 200 motor full steps SAP 210 0 40000 encoder steps SAP 4 0 398105 positioning speed SAP 5 0 3981070 acceleration SAP 126 0 1023950 correction speed SAP 12...

Страница 97: ...ing position reached interrupts SAP 6 0 128 set max motor current Start encoder detection and wait until ready SAP 132 0 1 Detect GAP 132 0 COMP 2 JC NE Detect Switch on closed loop and wait until ready SAP 129 0 1 Init GAP 133 0 JC ZE Init Let motor run using position reached interrupt VECT 3 PosReached1 EI 3 EI 255 MVP ABS 0 51200 Loop WAIT TICKS 0 1000 JA Loop PosReached1 VECT 3 PosReached2 MVP...

Страница 98: ...tch See the TMC 429 data sheet for the different switch modes The default has two switch modes the left switch as the reference switch the right switch as a limit stop switch 10 Right limit switch status The logical state of the right limit switch 11 Left limit switch status The logical state of the left limit switch in three switch mode 12 Right limit switch disable If set deactivates the stop fu...

Страница 99: ...imit switch positive limit switch SAP 193 0 4 negative limit switch Search right stop switch then search left stop switch from both sides Search left stop switch from both sides SAP 193 0 1 negative limit switch SAP 193 0 2 negative limit switch positive limit switch Search left stop switch only Search right stop switch then search left stop switch ...

Страница 100: ... home switch SAP 193 0 7 home switch SAP 193 0 8 home switch Search home switch in negative direction reverse the direction when left stop switch reached Search home switch in positive direction reverse the direction when right stop switch reached Search home switch in positive direction ignore end switches Search home switch in negative direction ignore end switches Figure 9 1 Reference search mo...

Страница 101: ...scription R GGP Parameter readable W SGP AGP Parameter writable E STGP RSGP Parameter stored permanently in EEPROM Number Global parameter Description Range Access 64 EEPROM magic Setting this parameter to a different value as E4 will cause re initialization of the axis and global parameters to factory defaults after the next power up This is useful in case of miss configuration 0 255 RWE 65 RS485...

Страница 102: ...81 TMCL code protection Protect a TMCL program against disassembling or overwriting 0 no protection 1 protection against disassembling 2 protection against overwriting 3 protection against disassembling and overwriting If you switch off the protection against disassembling the program will be erased first Changing this value from 1 or 3 to 0 or 2 the TMCL program will be wiped off 0 1 2 3 RWE 83 C...

Страница 103: ...e done using the SGP commands with parameter bank 3 SGP type 3 value The priority of an interrupt depends on its number Interrupts with a lower number have a higher priority The following table shows all interrupt parameters that can be set MEANING OF THE LETTERS IN COLUMN ACCESS Access type Related command s Description R GGP Parameter readable W SGP AGP Parameter writable E STGP RSGP Parameter s...

Страница 104: ...So most but not all standalone TMCL programs look like this Initialization SAP 4 0 500 define max positioning speed SAP 5 0 100 define max acceleration MainLoop do something in this example just running between two positions MVP ABS 0 5000 WAIT POS 0 0 MVP ABS 0 0 WAIT POS 0 0 JA MainLoop end of the main loop run infinitely 11 3 Using Symbolic Constants To make your program better readable and und...

Страница 105: ...34 GGP MyVariable 2 Copy the contents of the variable to the accumulator register CALC MUL 2 Multiply accumulator register with two AAP MyVariable 2 Store contents of the accumulator register to the 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 comman...

Страница 106: ... 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 EX...

Страница 107: ...fe and whose failure to perform when properly used in accordance with instructions provided can be reasonably expected to result in personal injury or death TRINAMIC Motion Control GmbH Co KG 2013 2014 Information given in this data sheet is believed to be accurate and reliable However neither responsibility is assumed for the consequences of its use nor for any infringement of patents or other ri...

Страница 108: ...n value in open loop mode can be changed now The USB interface reports the correct USB version now 13 2 Document Revision Version Date Author Description 1 00 2012 DEC 05 SD First version 1 10 2013 MAY 23 SK Closed Loop Section and Parameters updated including tables and figures Preliminary Version 1 11 2013 JUN 14 SK OK Additions changes for release version 1 12 2013 JUL 03 SD Axis parameters upd...

Страница 109: ...e V1 11 Manual Rev 1 17 2015 NOV 05 109 www trinamic com 1 17 2015 NOV 19 JP Description of global parameter 88 14 References TMCM 1311 TMCM 1311 Hardware Manual TMCL IDE TMCL IDE User Manual Please refer to www trinamic com ...

Отзывы: