MODULE ModuleforStepper TMCM-1240TMCL FirmwareManual FirmwareVersionV1.45 DocumentRevisionV1.022018-DEC-03 TheTMCM-1240isasingleaxiscontroller/drivermodulefor2-phasebipolarsteppermotors.The TMCM-1240TMCLrmwareallowstocontrolthemoduleusingTMCLcommands, supporting standaloneoperationaswellasdirectmodecontrol,makinguseoftheTrinamicTMC5160motion controllerandmotordriver.Dynamiccurrentcontrol,andquiet,smoothandecientoperation arecombinedwithstealthChop,dcStep,stallGuardandcoolStepfeatures. Features SingleAxisSteppermotorcontrol Supplyvoltage24VDC TMCL USBinterface RS485interface CANinterface Step/Directioninputs Additionalinputsandoutputs coolStep stallGuard2 stealthChop sensOstepencoder External(AB)encoderinterface Applications LaboratoryAutomation Robotics LifeScience Manufacturing FactoryAutomation Biotechnology SemiconductorHandling Test&Measurement LiquidHandling SimpliedBlockDiagram TMCM1240 EEPROM SPI Step USB MOSFET SPI Driver ARM RS485 TM CortexM3 Stage Motion Energy Efficient microcontroller CAN Controller Motor Driver B 6 TMC262 I/Os PreDriver STOP L/R, S/D, Encoder sensOstep SPI Encoder 10 30V DC +3V3 DC/DC +5V 2018TRINAMICMotionControlGmbH&Co.KG,Hamburg,Germany Termsofdeliveryandrightstotechnicalchangereserved. Downloadnewestversionat:www.trinamic.com Readentiredocumentation. 2/132 TMCM-1240TMCL FirmwareManualFirmwareVersionV1.45 DocumentRevisionV1.022018-DEC-03 Contents 1 Features 5 1.1 stallGuard2 . 6 1.2 coolStep 6 1.3 sixPointMotionController 7 2 FirstStepswithTMCL 8 2.1 BasicSetup . 8 2.2 UsingtheTMCLDirectMode 8 2.3 ChangingAxisParameters 8 2.4 TestingwithasimpleTMCLProgram 9 3 TMCLandtheTMCL-IDEAnIntroduction 11 3.1 BinaryCommandFormat 11 3.1.1 ChecksumCalculation 12 3.2 ReplyFormat . 13 3.2.1 StatusCodes . 13 3.3 StandaloneApplications . 14 3.4 TMCLCommandOverview . 15 3.5 TMCLCommandsbySubject 17 3.5.1 MotionCommands 17 3.5.2 ParameterCommands 17 3.5.3 BranchCommands 18 3.5.4 I/OPortCommands . 18 3.5.5 CalculationCommands . 18 3.5.6 InterruptProcessingCommands 19 3.5.7 NewTMCLCommands 21 3.6 DetailedTMCLCommandDescriptions 23 3.6.1 ROR(RotateRight) 23 3.6.2 ROL(RotateLeft) . 24 3.6.3 MST(MotorStop) . 25 3.6.4 MVP(MovetoPosition) . 26 3.6.5 SAP(SetAxisParameter) 29 3.6.6 GAP(GetAxisParameter) 30 3.6.7 SGP(SetGlobalParameter) . 31 3.6.8 GGP(GetGlobalParameter) 32 3.6.9 STGP(StoreGlobalParameter) . 33 3.6.10RSGP(RestoreGlobalParameter) . 34 3.6.11RFS(ReferenceSearch) 35 3.6.12SIO(SetOutput) 37 3.6.13GIO(GetInput) 39 3.6.14CALC(Calculate) 42 3.6.15COMP(Compare) . 44 3.6.16JC(Jumpconditional) . 45 3.6.17JA(Jumpalways) . 47 3.6.18CSUB(CallSubroutine) 48 3.6.19RSUB(ReturnfromSubroutine) 49 3.6.20WAIT(WaitforanEventtooccur) 50 3.6.21STOP(StopTMCLProgramExecution EndofTMCLProgram) 52 3.6.22SCO(SetCoordinate) . 53 3.6.23GCO(GetCoordinate) 54 3.6.24CCO(CaptureCoordinate) 56 3.6.25ACO(AccutoCoordinate) 57 2018TRINAMICMotionControlGmbH&Co.KG,Hamburg,Germany Termsofdeliveryandrightstotechnicalchangereserved. Downloadnewestversionatwww.trinamic.com