Trinamic TMCM-1111 StepRocker Module Owner's Manual


Add to my manuals
141 Pages

advertisement

Trinamic TMCM-1111 StepRocker Module Owner's Manual | Manualzz

Module for Stepper MODULE

TMCM-1111 StepRocker TMCL

Firmware Manual

Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16

The TMCM-1111 StepRocker is a single axis controller/driver module for 2-phase bipolar stepper motors. The TMCL firmware allows to control the module using TMCL™ commands, supporting standalone operation as well as direct mode control, making use of the Trinamic TMC4361 motion controller and the TMC262 motor driver. Dynamic current control, and quiet, smooth and efficient operation are combined with closed-loop operation as well as StallGuard2™ and CoolStep™ features.

Features

• Single Axis Stepper motor control

• Supply voltage 24V DC

• TMCL™

• USB interface

• RS485 interface

• CAN interface (optional)

• CoolStep™

• StallGuard2™

• Encoder interface (Closed loop operation possible)

Applications

• Laboratory Automation

• Manufacturing

• Robotics

Simplified Block Diagram

• Factory Automation

• Test & Measurement

• Technology evaluation

• First experiences with stepper motors

• Hobby applications

©2022 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.

TMCM-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 2 / 141

Contents

1 Features

5

1.1 StallGuard2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

1.2 CoolStep

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

2 First Steps with TMCL

7

2.1 Basic Setup

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.2 Using the TMCL Direct Mode

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.3 Changing Axis Parameters

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.4 Testing with a simple TMCL Program

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3 TMCL and the TMCL-IDE — An Introduction

10

3.1 Binary Command Format

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1.1

Checksum Calculation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2 Reply Format

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2.1

Status Codes

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3 Standalone Applications

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.4 TMCL Command Overview

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.5 TMCL Commands by Subject

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.5.1

Motion Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.5.2

Parameter Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.5.3

Branch Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.5.4

I/O Port Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.5.5

Calculation Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.5.6

Interrupt Processing Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.5.7

New TMCL Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.6 Detailed TMCL Command Descriptions

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.6.1

ROR (Rotate Right)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.6.2

ROL (Rotate Left)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.6.3

MST (Motor Stop)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.6.4

MVP (Move to Position)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.6.5

SAP (Set Axis Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.6.6

GAP (Get Axis Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.6.7

SGP (Set Global Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.6.8

GGP (Get Global Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.6.9

STGP (Store Global Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.6.10 RSGP (Restore Global Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.6.11 RFS (Reference Search)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.6.12 SIO (Set Output)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.6.13 GIO (Get Input)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.6.14 CALC (Calculate)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.6.15 COMP (Compare)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3.6.16 JC (Jump conditional)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3.6.17 JA (Jump always)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

3.6.18 CSUB (Call Subroutine)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

3.6.19 RSUB (Return from Subroutine)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

3.6.20 WAIT (Wait for an Event to occur)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

3.6.21 STOP (Stop TMCL Program Execution – End of TMCL Program)

. . . . . . . . . . . . . 51

3.6.22 SCO (Set Coordinate)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

3.6.23 GCO (Get Coordinate)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

3.6.24 CCO (Capture Coordinate)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3.6.25 ACO (Accu to Coordinate)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

3.6.26 CALCX (Calculate using the X Register)

. . . . . . . . . . . . . . . . . . . . . . . . . . . 57

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 3 / 141

3.6.27 AAP (Accu to Axis Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.6.28 AGP (Accu to Global Parameter)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

3.6.29 CLE (Clear Error Flags)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

3.6.30 EI (Enable Interrupt)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

3.6.31 DI (Disable Interrupt)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

3.6.32 VECT (Define Interrupt Vector)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

3.6.33 RETI (Return from Interrupt)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

3.6.34 CALCVV (Calculate using two User Variables)

. . . . . . . . . . . . . . . . . . . . . . . . 68

3.6.35 CALCVA (Calculate using a User Variable and the Accumulator Register)

. . . . . . . 70

3.6.36 CALCAV (Calculate using the Accumulator Register and a User Variable)

. . . . . . . 72

3.6.37 CALCVX (Calculate using a User Variable and the X Register)

. . . . . . . . . . . . . . 74

3.6.38 CALCXV (Calculate using the X Register and a User Variable)

. . . . . . . . . . . . . . 76

3.6.39 CALCV (Calculate using a User Variable and a Direct Value)

. . . . . . . . . . . . . . . 78

3.6.40 RST (Restart)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

3.6.41 DJNZ (Decrement and Jump if not Zero)

. . . . . . . . . . . . . . . . . . . . . . . . . . . 81

3.6.42 CALL (Conditional Subroutine Call)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

3.6.43 MVPA (Move to Position specified by Accumulator Register)

. . . . . . . . . . . . . . . 84

3.6.44 ROLA (Rotate Left using the Accumulator Register)

. . . . . . . . . . . . . . . . . . . . 86

3.6.45 RORA (Rotate Right using the Accumulator Register)

. . . . . . . . . . . . . . . . . . . 87

3.6.46 SIV (Set Indexed Variable)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

3.6.47 GIV (Get Indexed Variable)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

3.6.48 AIV (Accumulator to Indexed Variable)

. . . . . . . . . . . . . . . . . . . . . . . . . . . 90

3.6.49 Customer specific Command Extensions (UF0. . . UF7 – User Functions)

. . . . . . . . 91

3.6.50 Request Target Position reached Event

. . . . . . . . . . . . . . . . . . . . . . . . . . . 92

3.6.51 TMCL Control Commands

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4 Axis Parameters

96

5 Global Parameters

108

5.1 Bank 0

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

5.2 Bank 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

5.3 Bank 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

5.4 Bank 3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

6 Module Specific Hints

113

6.1 General Purpose Inputs and Outputs

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7 Hints and Tips

114

7.1 Reference Search

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.1.1

Mode 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.1.2

Mode 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.1.3

Mode 3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.1.4

Mode 4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.1.5

Mode 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.1.6

Mode 6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.1.7

Mode 7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.1.8

Mode 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.1.9

Mode 9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.1.10 Mode 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.2 Using Encoders

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.3 Closed-Loop Operation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.3.1

Closed-Loop Parameters

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.3.2

Load Angle Control

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.3.3

Current Level Control

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.3.4

Field Weakening

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 4 / 141

7.3.5

Position Catch up

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.4 PID Operation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.4.1

PID Parameters

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.4.2

PID Modes

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.4.3

PID Example

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.5 StallGuard2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.6 CoolStep

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.7 Velocity and Acceleration Calculation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.8 Secondary Serial Address

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.9 Secondary CAN Address

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

8 TMCL Programming Techniques and Structure

132

8.1 Initialization

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

8.2 Main Loop

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

8.3 Using Symbolic Constants

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

8.4 Using Variables

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

8.5 Using Subroutines

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

8.6 Combining Direct Mode and Standalone Mode

. . . . . . . . . . . . . . . . . . . . . . . . . . . 134

8.7 Make the TMCL Program start automatically

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

9 Figures Index

136

10 Tables Index

137

11 Supplemental Directives

138

11.1 Producer Information

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.2 Copyright

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.3 Trademark Designations and Symbols

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.4 Target User

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.5 Disclaimer: Life Support Systems

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.6 Disclaimer: Intended Use

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11.7 Collateral Documents & Tools

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

12 Revision History

140

12.1 Firmware Revision

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

12.2 Document Revision

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 5 / 141

1 Features

The TMCM-1111 StepRocker 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 2.8A RMS and

24V DC supply voltage. It is also equipped with end switch inputs as well as some general purpose digital inputs and outputs and one analogue input. An encoder input for ABN encoders also makes closed-loop operation possible. 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.

– Closed-loop operation possible.

• Interfaces

– USB interface.

– RS485 bus.

– CAN bus.

– Additional digital inputs and outputs.

– One analogue input.

– End switch inputs.

– Step/direction input and output.

Software

TMCL: remote controlled operation via USB, RS485 or CAN interface and/or stand-alone operation via

TMCL programming. PC-based application development software TMCL-IDE available for free.

Electrical data

• Supply voltage: +12V and +24V nominal (10. . . 27V DC supply range).

• Motor current: up to 2.8A RMS / 3.9A peak (programmable).

Please see also the separate Hardware Manual.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 6 / 141

1.1 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%. Cool-

Step 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

0,8

Efficiency with coolStep

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

Velocity [RPM]

250 300 350

Figure 2: Energy Efficiency Example with CoolStep

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 7 / 141

2 First Steps with TMCL

In this chapter you can find some hints for your first steps with the TMCM-1111 StepRocker 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-1111 StepRocker module.

• A USB cable.

• A power supply (24V DC) for your TMCM-1111 StepRocker 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-1111 StepRocker is properly connected to your power supply and that the stepper motor is properly connected to the module. Please see the TMCM-1111 StepRocker 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-1111 StepRocker via USB 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 TMCM-

1111 StepRocker 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.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 8 / 141

4

5

6

7

Maximum positioning speed

Maximum acceleration

Maximum current

Standby current

Most important axis parameters

Number Axis Parameter Description

The maximum speed used for positioning ramps.

Maximum acceleration in positioning ramps. Acceleration and deceleration value in velocity mode.

Motor current used when motor is running. The maximum value is 255 which means 100% of the maximum current of the module.

The most important setting, as too high values can cause motor damage.

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. Please see also parameter 214.

Range

[Units]

0. . .

16777215

[pps]

0. . .

2147483647

[pps 2 ]

0. . . 255

0. . . 255

Access

RW

RW

RW

RW

Table 1: Most important Axis Parameters

2.4 Testing with a simple TMCL Program

9

11

13

15

7

1

3

5

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:

// Rotate motor 0 with speed 10000 ROL 0, 51200

WAIT TICKS , 0, 500

MST 0

ROR 0, 51200

WAIT TICKS , 0, 500

MST 0

// Rotate motor 0 with 50000

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.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 9 / 141

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.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 10 / 141

3 TMCL and the TMCL-IDE — An Introduction

As with most TRINAMIC modules the software running on the microprocessor of the TMCM-1111 StepRocker 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-1111 StepRocker 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-1111 StepRocker. 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:

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 11 / 141

4

1

1

1

1

1

TMCL Command Format

Bytes Meaning

Module address

Command number

Type number

Motor or Bank number

Value (MSB first!)

Checksum

Table 2: TMCL Command Format

Info

Note

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.

3.1.1 Checksum Calculation

As mentioned above, the checksum is calculated by adding up all bytes (including the module address byte) using 8-bit addition. Here are two examples which show how to do this:

5

7

3

1

Checksum calculation in C: unsigned char i, Checksum ; unsigned char Command [9];

// Set the Command array to the desired command

Checksum = Command [0]; for (i =1; i <8; i ++)

Checksum += Command [i];

9

Command [8]= Checksum ; // insert checksum as last byte of the command

// Now , send it to the module

8

10

6

4

2

Checksum calculation in Delphi: var i, Checksum : 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

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 12 / 141

3.2 Reply Format

Every time a command has been sent to a module, the module sends a reply. The reply format with RS-

232, RS-485, RS-422 and USB is as follows:

4

1

1

1

1

1

TMCL Reply Format

Bytes Meaning

Reply address

Module address

Status (e.g. 100 means no error)

Command number

Value (MSB first!)

Checksum

Table 3: TMCL Reply Format

Info

Note

The checksum is also calculated by adding up all the other bytes using an 8-bit addition. Do not send the next command before having received the reply!

When using CAN interface, the reply does not contain an address byte and a checksum byte. With CAN, the CAN-ID is used as the reply address and the checksum is not needed because the CAN bus uses hardware CRC checking.

3.2.1 Status Codes

The reply contains a status code. The status code can have one of the following values:

4

5

6

TMCL Status Codes

Code Meaning

100 Successfully executed, no error

2

3

101

1

Command loaded into TMCL program EEPROM

Wrong checksum

Invalid command

Wrong type

Invalid value

Configuration EEPROM locked

Command not available

Table 4: TMCL Status Codes

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 13 / 141

3.3 Standalone Applications

The module is equipped with a TMCL memory for storing TMCL applications. You can use the 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 format. They will be assembled automatically into their binary representations. Afterwards this code can be downloaded into the module to be executed there.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 14 / 141

3.4 TMCL Command Overview

This section gives a short overview of all TMCL commands.

COMP

JC

JA

CSUB

RSUB

EI

DI

WAIT

Overview of all TMCL Commands

Command Number Parameter Description

ROR

ROL

1

2

<motor number>, <velocity>

<motor number>, <velocity>

Rotate right with specified velocity

Rotate left with specified velocity

MST

MVP

SAP

GAP

3

4

5

6

<motor number>

ABS|REL|COORD, <motor number>,

<position|offset>

<parameter>, <motor number>,

<value>

<parameter>, <motor number>

Stop motor movement

Move to position (absolute or relative)

Set axis parameter (motion control specific settings)

Get axis parameter (read out motion control specific settings)

SGP

GGP

STGP

RSGP

RFS

9

10

11

12

13

<parameter>,

<value>

<bank number>,

<parameter>, <bank number>

<parameter>, <bank number>

<parameter>, <bank number>

Set global parameter (module specific settings e.g. communication settings or TMCL user variables)

Get global parameter (read out module specific settings e.g. communication settings or TMCL user variables)

Store global parameter (TMCL user variables only)

Restore global parameter (TMCL user variables only)

Reference search

SIO

GIO

CALC

14

15

19

<START|STOP|STATUS>, number>

<motor

<port number>, <bank number>,

<value>

<port number>, <bank number>

<operation>, <value>

Set digital output to specified value

Get value of analog/digital input

Aithmetical operation between accumulator and direct value

Compare accumulator with value

23

24

25

26

27

20

21

22

<value>

<condition>, <jump address>

<jump address>

<subroutine address>

<interrupt number>

<interrupt number>

<condition>,

<ticks>

<motor number>,

Jump conditional

Jump absolute

Call subroutine

Return from subroutine

Enable interrupt

Disable interrupt

Wait with further program execution

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 15 / 141

AAP

AGP

CLE

VECT

RETI

ACO

Command Number Parameter

STOP 28

SCO 30

GCO 31

<coordinate number>, <motor number>, <position>

<coordinate number>, <motor number>

CCO

CALCX

32

33

<coordinate number>, <motor number>

<operation>

CALCVV

CALCVA

CALCAV

CALCVX

CALCXV

CALCV

MVPA

RST

DJNZ

ROLA

RORA

SIV

GIV

34

35

36

37

38

39

40

41

42

43

44

45

46

48

49

50

51

55

56

Description

Stop program execution

Set coordinate

Get coordinate

Capture coordinate

<parameter>, <motor number>

<parameter>, <bank number>

<flag>

<interrupt number>, <address>

<value>

Arithmetical operation between accumulator and X-register

Accumulator to axis parameter

Accumulator to global parameter

Clear an error flag

Define interrupt vector

Return from interrupt

Accu to coordinate <coordinate number>, <motor number>

<operation>, <user variable 1>, <user variable 2>

<operation>, <user variable>

<operation>, <user variable>

<operation>, <user variable>

<operation>, <user variable>

<operation>, <value> Arithmetical operation between user variable and direct value

ABS|REL|COORD, <motor number> Move to position specified by accumulator

<jump address>

Arithmetical operation between user variable and X register

Arithmetical operation between X register and user variable

<user variable>, <jump address>

<motor number>

Restart the program from the given address

Decrement and jump if not zero

Rotate left, velocity specified by accumulator

<motor number>

Arithmetical operation between two user variables

Arithmetical operation between user variable and accumulator

Arithmetical operation between accumulator and user variable

Rotate right, velocity specified by accumulator

Set indexed variable

Get indexed variable

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 16 / 141

Command Number Parameter

AIV 57

Description

Accumulator to indexed variable

Table 5: Overview of all TMCL Commands

3.5 TMCL Commands by Subject

3.5.1 Motion Commands

These commands control the motion of the motor. They are the most important commands and can be used in direct mode or in standalone mode.

Motion Commands

Mnemonic Command number Meaning

ROL 2 Rotate left

ROR 1 Rotate right

MVP

MST

SCO

CCO

GCO

4

3

30

32

31

Move to position

Motor stop

Store coordinate

Capture coordinate

Get coordinate

Table 6: Motion Commands

3.5.2 Parameter Commands

These commands are used to set, read and store axis parameters or global parameters. Axis parameters can be set independently for each axis, whereas global parameters control the behavior of the module itself. These commands can also be used in direct mode and in standalone mode.

Parameter Commands

Mnemonic Command number Meaning

SAP 5 Set axis parameter

GAP

SGP

GGP

STGP

RSGP

6

9

10

11

12

Get axis parameter

Set global parameter

Get global parameter

Store global parameter

Restore global parameter

Table 7: Parameter Commands

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 17 / 141

3.5.3 Branch Commands

These commands are used to control the program flow (loops, conditions, jumps etc.). Using them in direct mode does not make sense. They are intended for standalone mode only.

JA

JC

Branch Commands

Mnemonic Command number Meaning

22

21

Jump always

Jump conditional

COMP

CSUB

RSUB

WAIT

STOP

20

23

24

27

28

Compare accumulator with constant value

Call subroutine

Return from subroutine

Wait for a specified event

End of a TMCL program

Table 8: Branch Commands

3.5.4 I/O Port Commands

These commands control the external I/O ports and can be used in direct mode as well as in standalone mode.

I/O Port Commands

Mnemonic Command number Meaning

SIO

GIO

14

15

Set output

Get input

Table 9: I/O Port Commands

3.5.5 Calculation Commands

These commands are intended to be used for calculations within TMCL applications. Although they could also be used in direct mode it does not make much sense to do so.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 18 / 141

Calculation Commands

Mnemonic Command number Meaning

CALC

CALCX

19

33

Calculate using the accumulator and a constant value

Calculate using the accumulator and the X register

AAP

AGP

ACO

34

35

39

Copy accumulator to an axis parameter

Copy accumulator to a global parameter

Copy accu to coordinate

Table 10: Calculation Commands

For calculating purposes there is an accumulator (also called accu or A register) and an X register. When executed in a TMCL program (in standalone mode), all TMCL commands that read a value store the result in the accumulator. The X register can be used as an additional memory when doing calculations. It can be loaded from the accumulator.

When a command that reads a value is executed in direct mode the accumulator will not be affected. This means that while a TMCL program is running on the module (standalone mode), a host can still send commands like GAP and GGP to the module (e.g. to query the actual position of the motor) without affecting the flow of the TMCL program running on the module.

Please see also chapter

3.5.7

for more calculation commands.

3.5.6 Interrupt Processing Commands

TMCL also contains functions for a simple way of interrupt processing. Using interrupts, many tasks can be programmed in an easier way.

The following commands are use to define and handle interrupts:

Interrupt Processing Commands

Mnemonic Command number Meaning

EI 25 Enable interrupt

DI

VECT

RETI

26

37

38

Disable interrupt

Set interrupt vector

Return from interrupt

Table 11: Interrupt Processing Commands

3.5.6.1 Interrupt Types

There are many different interrupts in TMCL, like timer interrupts, stop switch interrupts, position reached interrupts, and input pin change interrupts. Each of these interrupts has its own interrupt vector. Each interrupt vector is identified by its interrupt number. Please use the TMCL include file Interrupts.inc in order to have symbolic constants for the interrupt numbers. Table

12

show all interrupts that are available on the TMCM-1111 StepRocker.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 19 / 141

41

42

43

44

255

27

28

39

40

2

3

15

21

0

1

Interrupt Vectors

Interrupt number Interrupt type

Timer 0

Timer 1

Timer 2

Target position reached 0

StallGuard axis 0

Deviation axis 0

Left stop switch 0

Right stop switch 0

Input change 0

Input change 1

Input change 2

Input change 3

Input change 4

Input change 5

Global interrupts

Table 12: Interrupt Vectors

3.5.6.2 Interrupt Processing

When an interrupt occurs and this interrupt is enabled and a valid interrupt vector has been defined for that interrupt, the normal TMCL program flow will be interrupted and the interrupt handling routine will be called. Before an interrupt handling routine gets called, the context of the normal program (i.e.

accumulator register, X register, flags) will be saved automatically.

There is no interrupt nesting, i.e. all other interrupts are disabled while an interrupt handling routine is being executed.

On return from an interrupt handling routine (RETI command), the context of the normal program will automatically be restored and the execution of the normal program will be continued.

3.5.6.3 Further Configuration of Interrupts

Some interrupts need further configuration (e.g. the timer interval of a timer interrupt). This can be done using SGP commands with parameter bank 3 (SGP <type> , 3, <value>). Please refer to the SGP command

(chapter

3.6.7

) for further information about that.

3.5.6.4 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.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 20 / 141

• An interrupt handling routine must always end with a RETI command.

• Do not allow the normal program flow to run into an interrupt handling routine.

7

9

11

5

1

3

The following example shows the use of a timer interrupt:

VECT 0, Timer0Irq // define the interrupt vector

SGP 0, 3, 1000

EI 0

EI 255

// configure the interrupt : set its period to 1000 ms

// enable this interrupt

// globally switch on interrupt processing

// Main program : toggles output 3, using a WAIT command for the delay

Loop :

SIO 3, 2, 1

WAIT TICKS , 0, 50

SIO 3, 2, 0

WAIT TICKS , 0, 50

JA Loop

13

15

17

19

21

// Here is the interrupt handling routine

Timer0Irq :

GIO 0, 2

JC NZ , Out0Off

SIO 0, 2, 1

RETI

Out0Off :

SIO 0, 2, 0

RETI

// check if OUT0 is high

// jump if not

// switch OUT0 high

// end of interrupt

// switch OUT0 low

// end of interrupt

2

4

In the example above, the interrupt numbers are being used directly. To make the program better readable use the provided include file Interrupts.inc. This file defines symbolic constants for all interrupt numbers which can be used in all interrupt commands. The beginning of the program above then looks as follows:

# include Interrupts . inc

VECT TI_TIMER0 , Timer0Irq

SGP TI_TIMER0 , 3, 1000

EI TI_TIMER0

EI TI_GLOBAL

3.5.7 New TMCL Commands

In order to make several operations easier, the following new commands have been introduced from firmware version 1.11 on. Using these new commands many taks can be programmed in an easier way.

This can save some code, thus making a TMCL program shorter, faster and easier to understand.

Please note that these commands are not available on TMCM-1111 StepRocker modules with firmware versions before 1.11. So please make sure that at least firmware version 1.11 is installed before using them.

New TMCL Commands

Mnemonic Command number Meaning

CALCVV

CALCVA

40

41

Calculate using two user variables

Calculate using a user variable and the accumulator

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 21 / 141

CALL

ROLA

RORA

SIV

GIV

AIV

Mnemonic Command number Meaning

CALCAV 42 Calculate using the accumulator and a user variable

CALCVX

CALCXV

43

44

Calculate using a user variable and the X register

Calculate using the X register and a user variable

CALCV

MVPA

RST

DJNZ

45

46

48

49

Calculate using a user variable and a direct value

Move to position specified by accumulator

Restart the program

Decrement and jump if not zero

80

50

51

55

56

57

Conditional subroutine call

Rotate left using the accumulator

Rotate right using the accumulator

Set indexed variable

Get indexed variable

Accu to indexed variable

Table 13: New TMCL Commands

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 22 / 141

3.6 Detailed TMCL Command Descriptions

The module specific commands are explained in more detail on the following pages. They are listed according to their command number.

3.6.1 ROR (Rotate Right)

The motor is instructed to rotate with a specified velocity in right direction (increasing the position counter).

The velocity is given in microsteps per second (pulse per second [pps]).

Internal function: Velocity mode is selected. Then, the velocity value is transferred to the target velocity

(axis parameter #2).

Related commands: ROL, MST, SAP, GAP.

Mnemonic: ROR

< axis

>

,

< velocity

>

Binary Representation

Instruction Type Motor/Bank Value

1 0 0 -2147483648. . . 2147583647

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Rotate right motor 0, velocity 51200.

Mnemonic: ROR 0, 51200.

Binary Form of ROR 0, 51200

Field Value

Target address 01 h

Instruction number 01 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

C8 h

00 h

CA h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 23 / 141

3.6.2 ROL (Rotate Left)

The motor is instructed to rotate with a specified velocity in left direction (decreasing the position counter).

The velocity is given in microsteps per second (pulse per second [pps]).

Internal function: Velocity mode is selected. Then, the velocity value is transferred to the target velocity

(axis parameter #2).

Related commands: ROR, MST, SAP, GAP.

Mnemonic: ROL

< axis

>

,

< velocity

>

Binary Representation

Instruction Type Motor/Bank Value

2 0 0 -2147483648. . . 2147583647

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Rotate left motor 0, velocity 51200.

Mnemonic: ROL 0, 51200.

Binary Form of ROL 0, 51200

Field Value

Target address 01 h

Instruction number 02 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

C8 h

00 h

CB h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 24 / 141

3.6.3 MST (Motor Stop)

The MST command stops the motor using a soft stop.

Internal function: The velocity mode is selected. Then, the target velocity (axis parameter #2) is set to zero.

Related commands: ROR, ROL, SAP, GAP.

Mnemonic: MST < axis >

Binary Representation

Instruction Type Motor/Bank Value

3 0 0 0

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Stop motor 0.

Mnemonic: MST 0.

Binary Form of MST 0

Field Value

Target address 01 h

Instruction number 03 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

04 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 25 / 141

3.6.4 MVP (Move to Position)

With this command the motor will be instructed to move to a specified relative or absolute position. It will use the acceleration/deceleration ramp and the positioning speed programmed into the unit. This command is non-blocking - that is, a reply will be sent immediately after command interpretation and initialization of the motion controller. Further commands may follow without waiting for the motor reaching its end position. The maximum velocity and acceleration as well as other ramp parameters are defined by the appropriate axis parameters. For a list of these parameters please refer to section

4 .

The range of the MVP command is 32 bit signed (-2147483648. .. 2147483647). Positioning can be interrupted using MST, ROL or ROR commands.

Three operation types are available:

• Moving to an absolute position in the range from -2147483648. . . 2147483647 ( − 2 31 ...

2 31 − 1

).

• 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).

Note The distance between the actual position and the new position must not be more than 2147483647 ( 2 31 − 1 ) microsteps . Otherwise the motor will run in the opposite direction in order to take the shorter distance (caused by 32 bit overflow).

Internal function: Position mode is selected and the new position value is transferred to axis parameter

#0 (target position).

Related commands: SAP, GAP, SCO, GCO, CCO, ACO, MST.

Mnemonic: MVP

<

ABS|REL|COORD

>

,

< axis

>

,

< position|offset|coordinate

>

Binary Representation

Instruction Type

0 – ABS – absolute

4 1 – REL – relative

Motor/Bank Value

0

0

2 – COORD – coordinate 0.. . 255

<

<

< position offset

>

> coordinate number (0..20)

>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Move motor 0 to position 90000.

Mnemonic: MVP ABS, 0, 90000

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 26 / 141

Binary Form of MVP ABS, 0, 90000

Field Value

Target address 01 h

Instruction number 04 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

01 h

5F h

90 h

F5 h

Example

Move motor 0 from current position 10000 steps backward.

Mnemonic: MVP REL, 0, -10000

Binary Form of MVP REL, 0, -10000

Field Value

Target address 01 h

Instruction number 04 h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

FF h

FF h

D8 h

F0 h

CC h

Example

Move motor 0 to stored coordinate #8.

Mnemonic: MVP COORD, 0, 8

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 27 / 141

Binary Form of MVP COORD, 0, 8

Field Value

Target address 01 h

Instruction number 04 h

Type

Motor/Bank

02 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

08 h

0F h

Note Before moving to a stored coordinate, the coordinate has to be set using an SCO,

CCO or ACO command.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 28 / 141

3.6.5 SAP (Set Axis Parameter)

With this command most of the motion control parameters of the module can be specified. The settings will be stored in SRAM and therefore are volatile. That is, information will be lost after power off.

Info

For a table with parameters and values which can be used together with this command please refer to section

4 .

Internal function: The specified value is written to the axis parameter specified by the parameter number.

Related commands: GAP, AAP.

Mnemonic: SAP <parameter number>, <axis>, <value>

Binary representation

Binary Representation

Instruction Type

5 see chapter

4

Motor/Bank Value

0 <value>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example Set the maximum positioning speed for motor 0 to 51200 pps.

Mnemonic: SAP 4, 0, 51200.

Binary Form of SAP 4, 0, 51200

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 05 h

Type 04 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

C8 h

00 h

D2 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 29 / 141

3.6.6 GAP (Get Axis Parameter)

Most motion / driver related parameters of the TMCM-1111 StepRocker can be adjusted using e.g. the SAP command. With the GAP parameter they can be read out. In standalone mode the requested value is also transferred to the accumulator register for further processing purposes (such as conditional jumps). In direct mode the value read is only output in the value field of the reply, without affecting the accumulator.

Info

For a table with parameters and values that can be used together with this command please refer to section

4 .

Internal function: The specified value gets copied to the accumulator.

Related commands: SAP, AAP.

Mnemonic: GAP <parameter number>, <axis>

Binary Representation

Instruction Type Motor/Bank Value

6 see chapter

4

0 <value>

Reply in Direct Mode

Status Value

100 - OK value read by this command

Example

Get the actual position of motor 0.

Mnemonic: GAP 1, 0.

Binary Form of GAP 1, 0

Field Value

Target address 01 h

Instruction number 06 h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

08 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 30 / 141

3.6.7 SGP (Set Global Parameter)

With this command most of the module specific parameters not directly related to motion control can be specified and the TMCL user variables can be changed. Global parameters are related to the host interface, peripherals or application specific variables. The different groups of these parameters are organized in banks to allow a larger total number for future products. Currently, bank 0 is used for global parameters, and bank 2 is used for user variables. Bank 3 is used for interrupt configuration.

All module settings in bank 0 will automatically be stored in non-volatile memory (EEPROM).

Info

For a table with parameters and values which can be used together with this command please refer to section

5 .

Internal function: The specified value will be copied to the global parameter specified by the type and bank number. Most parameters of bank 0 will automatically be stored in non-volatile memory.

Related commands: GGP, AGP.

Mnemonic: SGP <parameter number>, <bank>, <value>

Binary Representation

Instruction Type

9 see chapter

5

Motor/Bank Value

0/2/3 <value>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Set the serial address of the device to 3.

Mnemonic: SGP 66, 0, 3.

Binary Form of SGP 66, 0, 3

Field Value

Target address 01 h

Instruction number 09 h

Type

Motor/Bank

42 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

03 h

4F h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 31 / 141

3.6.8 GGP (Get Global Parameter)

All global parameters can be read with this function. Global parameters are related to the host interface, peripherals or application specific variables. The different groups of these parameters are organized in banks to allow a larger total number for future products. Currently, bank 0 is used for global parameters, and bank 2 is used for user variables. Bank 3 is used for interrupt configuration.

Info

For a table with parameters and values which can be used together with this command please refer to section

5 .

Internal function: The global parameter specified by the type and bank number will be copied to the accumulator register.

Related commands: SGP, AGP.

Mnemonic: GGP <parameter number>, <bank>

Binary Representation

Instruction Type Motor/Bank Value

10 see chapter

5

0/2/3 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK value read by this command

Example

Get the serial address of the device.

Mnemonic: GGP 66, 0.

Binary Form of GGP 66, 0

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 0A h

Type 42 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

4D h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 32 / 141

3.6.9 STGP (Store Global Parameter)

This command is used to store TMCL global parameters permanently in the EEPROM of the module. This command is mainly needed to store the TMCL user variables (located in bank 2) in the EEPROM of the module, as most other global parameters (located in bank 0) are stored automatically when being modified.

The contents of the user variables can either be automatically or manually restored at power on.

Info

For a table with parameters and values which can be used together with this command please refer to section

5.3

.

Internal function: The global parameter specified by the type and bank number will be stored in the

EEPROM.

Related commands: SGP, AGP, GGP, RSGP.

Mnemonic: STGP <parameter number>, <bank>

Binary Representation

Instruction Type

11 see chapter

5.3

Motor/Bank Value

2 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK 0 (don’t care)

Example

Store user variable #42.

Mnemonic: STGP 42, 2.

Binary Form of STGP 42, 2

Field Value

Target address 01 h

Instruction number 0B h

Type

Motor/Bank

2A h

02 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

38 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 33 / 141

3.6.10 RSGP (Restore Global Parameter)

With this command the contents of a TMCL user variable can be restored from the EEPROM. By default, all user variables are automatically restored after power up. A user variable that has been changed before can be reset to the stored value by this instruction.

Info

For a table with parameters and values which can be used together with this command please refer to section

5.3

.

Internal function: The global parameter specified by the type and bank number will be restored from the EEPROM.

Related commands: SGP, AGP, GGP, STGP.

Mnemonic: RSGP <parameter number>, <bank>

Instruction Type

Binary Representation

Motor/Bank Value

12 see chapter

5.3

2 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK 0 (don’t care)

Example

Restore user variable #42.

Mnemonic: RSGP 42, 2.

Binary Form of RSGP 42, 2

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 0C h

Type 2A h

Motor/Bank 02 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

39 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 34 / 141

3.6.11 RFS (Reference Search)

The TMCM-1111 StepRocker has a built-in reference search algorithm. The reference search algorithm provides different refrence search modes. This command starts or stops the built-in reference search algorithm. The status of the reference search can also be queried to see if it already has finished. (In a

TMCL program it mostly is better to use the WAIT RFS command to wait for the end of a reference search.)

Please see the appropriate parameters in the axis parameter table to configure the reference search algorithm to meet your needs (please see chapter

4 ).

Internal function: The internal reference search state machine is started or stoped, or its state is queried.

Related commands: SAP, GAP, WAIT.

Mnemonic: RFS <START|STOP|STATUS>, <motor>

Binary Representation

Instruction Type

0 START — start reference search

13 1 STOP — stop reference search

2 STATUS — get status

Motor/Bank Value

0 0 (don’t care)

Reply in Direct Mode (RFS START or RFS STOP)

Status Value

100 - OK 0 (don’t care)

Status

100 - OK

Reply in Direct Mode (RFS STATUS)

Value

0 no ref. search active other values reference search active

Example

Start reference search of motor 0.

Mnemonic: RFS START, 0.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 35 / 141

Binary Form of RFS START

Field Value

Target address 01 h

Instruction number 0D h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

0E h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 36 / 141

3.6.12 SIO (Set Output)

This command sets the states of the general purpose digital outputs.

Internal function: The state of the output line specified by the type parameter is set according to the value passed to this command.

Related commands: GIO.

Mnemonic: SIO <port number>, <bank number>, <value>

Binary Representation

Instruction Type

14

Motor/Bank Value

<port number> <bank number> (2) 0/1

Reply in Direct Mode

Status Value

100 - OK 0 (don’t care)

Example

Set output 0 (bank 2) to high.

Mnemonic: SIO 0, 2, 1.

Binary Form of SIO 0, 2, 1

Field Value

Target address 01 h

Instruction number 0E h

Type

Motor/Bank

00 h

02 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

01 h

12 h

Bank 2 – Digital Outputs

The following output lines can be set by the SIO commands) using bank 2.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 37 / 141

Port

Digital Outputs in Bank 2

Command Range

OpenDrain1 SIO 0, 2, <value> 0/1

OpenDrain2 SIO 1, 2, <value> 0/1

PWMU0

PWMU1

PWMU2

PWMD0

PWMD1

PWMD2

SIO 2, 2, <value> 0/1

SIO 3, 2, <value> 0/1

SIO 4, 2, <value> 0/1

SIO 5, 2, <value> 0/1

SIO 6, 2, <value> 0/1

SIO 7, 2, <value> 0/1

1

3

Special case : SIO 255, 2, <x> can be used to change all general purpose digital output lines simultaneously.

The value <x> will then be interpreted as a bit vector where each of the lower eight bits represents one of the digital outputs. So the range for <x> is 0. . . 255. The value <x> can also be -1. In this case, the value will be taken from the accumulator register. The following program can be used to copy the states of the input lines to the output lines:

Loop :

GIO 255 , 0

SIO 255 , 2, -1

JA Loop

Pull-up Resistor Control

The SIO command can also be used to program the pull-up resistors of the general purpose inputs. Each of the pull-up resistors can seperately be switched off or on. For this purpose, use the command SIO 0, 0,

<x> where the value <x> is a bit vector. The following table shows the meaning of the different bits:

3

4

1

2

5

Pull-up Resistor Control

Bit Value Input

0 1 PWMU0

2

4

8

16

32

PWMU1

PWMU2

PWMD0

PWMD1

PWMD2

A bit that is set switches on the corresponding pull-up resistor. So for example SIO 0, 0, 0 turns off all pull-up resistors, and SIO 0, 0, 63 turns on all pull-up-resistors. All pull-up resistors are on by default.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 38 / 141

3.6.13 GIO (Get Input)

With this command the status of the available general purpose outputs of the module can be read. The function reads a digital or an analog input port. Digital lines will read as 0 or 1, while the ADC channels deliver their 16 bit result in the range of 0. . . 65535. In standalone mode the requested value is copied to the accumulator register for further processing purposes such as conditional jumps. In direct mode the value is only output in the value field of the reply, without affecting the accumulator. The actual status of a digital output line can also be read.

Internal function: The state of the i/o line specified by the type parameter and the bank parameter is read.

Related commands: SIO.

Mnemonic: GIO <port number>, <bank number>

Instruction Type

15

Binary Representation

Motor/Bank Value

<port number> <bank number> (0/1/2) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK status of the port

Example

Get the value of ADC channel 0.

Mnemonic: GIO 0, 1.

Binary Form of GIO 0, 1

Field Value

Target address 01 h

Instruction number 0F h

Type

Motor/Bank

00 h

01 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

11 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 39 / 141

Reply (Status=no error, Value=302)

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

0F h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

01 h

2E h

A5 h

Bank 0 – Digital Inputs

The analog input lines can be read as digital or analog inputs at the same time. The digital input states can be accessed in bank 0.

Port

Digital Inputs in Bank 0

Command Range

AIN0 GIO 0, 0

PWMD0 GIO 1, 0

0/1

0/1

PWMD1 GIO 2, 0

PWMD2 GIO 3, 0

PWMU0 GIO 4, 0

PWMU1 GIO 5, 0

PWMU2 GIO 6, 0

0/1

0/1

0/1

0/1

0/1

Special case: GIO 255, 0 reads all general purpose inputs simulataneously and puts the result into the lower eight bits of the accumulator register.

Bank 1 – Analog Inputs

The analog input lines can be read back as digital or analog inputs at the same time. The analog values can be accessed in bank 1.

Analog Inputs in Bank 1

Port Command Range

AIN0 GIO 0, 1 0. . . 65535

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 40 / 141

Bank 2 – States of the Digital Outputs

The states of the output lines (that have been set by SIO commands) can be read back using bank 2.

Port

Digital Outputs in Bank 2

Command Range

OpenDrain1 GIO 0, 2

OpenDrain2 GIO 1, 2

0/1

0/1

PWMU0

PWMU1

PWMU2

PWMD0

PWMD1

PWMD2

GIO 2, 2

GIO 3, 2

GIO 4, 2

GIO 5, 2

GIO 6, 2

GIO 7, 2

0/1

0/1

0/1

0/1

0/1

0/1

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 41 / 141

3.6.14 CALC (Calculate)

A value in the accumulator variable, previously read by a function such as GAP (get axis parameter) can be modified with this instruction. Nine different arithmetic functions can be chosen and one constant operand value must be specified. The result is written back to the accumulator, for further processing like comparisons or data transfer.

This command is mainly intended for use in standalone mode.

Related commands: CALCX, COMP, AAP, AGP, GAP, GGP, GIO.

Mnemonic: CALC <operation>, <operand>

Binary representation

Binary Representation

Instruction Type

19 0 ADD – add to accumulator

1 SUB – subtract from accumulator

2 MUL – multiply accumulator by

3 DIV – divide accumulator by

4 MOD – modulo divide accumulator by

5 AND – logical and accumulator with

6 OR – logical or accumulator with

7 XOR – logical exor accumulator with

8 NOT – logical invert accumulator

9 LOAD – load operand into accumulator

Motor/Bank Value

0 (don’t care) <operand>

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Multiply accumulator by -5000.

Mnemonic: CALC MUL, -5000

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 42 / 141

Binary Form of CALC MUL, -5000

Field Value

Target address 01 h

Instruction number 13 h

Type

Motor/Bank

02 h

00 h

Value (Byte 3)

Value (Byte 2)

FF h

FF h

Value (Byte 1)

Value (Byte 0)

Checksum

EC h

78 h

78 h

Reply (Status=no error, value=-5000:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

13 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

FF h

FF h

EC h

78 h

DC h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 43 / 141

3.6.15 COMP (Compare)

The specified number is compared to the value in the accumulator register. The result of the comparison can for example be used by the conditional jump (JC) instruction.

This command is intended for use in standalone operation only.

Internal function: The accumulator register is compared with the sepcified value. The internal arithmetic status flags are set according to the result of the comparison. These can then control e.g. a conditional jump.

Related commands: JC, GAP, GGP, GIO, CALC, CALCX.

Mnemonic: COMP <operand>

Binary Representation

Instruction Type

20

Motor/Bank Value

0 (don’t care) 0 (don’t care) <operand>

2

Example

Jump to the address given by the label when the position of motor #0 is greater than or equal to 1000.

GAP 1, 0 // get actual position of motor 0

COMP 1000

JC GE , Label

// compare actual value with 1000

// jump to Lable if greter or equal to 1000

Binary Form of COMP 1000

Field Value

Target address 01 h

Instruction number 14 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

03 h

E8 h

00 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 44 / 141

3.6.16 JC (Jump conditional)

The JC instruction enables a conditional jump to a fixed address in the TMCL program memory, if the specified condition is met. The conditions refer to the result of a preceding comparison. Please refer to

COMP instruction for examples.

This command is intended for standalone operation only.

Internal function: The TMCL program counter is set to the value passed to this command if the status flags are in the appropriate states.

Related commands: JA, COMP, WAIT, CLE.

Mnemonic: JC <condition>, <label>

Instruction Type

21 0 ZE - zero

Binary Representation

Motor/Bank Value

0 (don’t care) <jump address>

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

9 EAL - external alarm

10 EDV - deviation error

11 EPO - position error

1

3

5

Example

Jump to the address given by the label when the position of motor #0 is greater than or equal to 1000.

GAP 1, 0 // get actual position of motor 0

COMP 1000 // compare actual value with 1000

JC GE , Label // jump to Lable if greter or equal to 1000

...

Label : ROL 0, 1000

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 45 / 141

Binary form of JC GE, Label assuming Label at address 10

Field Value

Target address 01 h

Instruction number 15 h

Type 05 h

Motor/Bank

Value (Byte 3)

00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

0A h

25 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 46 / 141

3.6.17 JA (Jump always)

Jump to a fixed address in the TMCL program memory.

This command is intended for standalone operation only.

Internal function: The TMCL program counter is set to the value passed to this command.

Related commands: JC, WAIT, CSUB.

Mnemonic: JA <label>

Binary Representation

Instruction Type

22

Motor/Bank Value

0 (don’t care) 0 (don’t care) <jump address>

1

3

5

Example

An infinite loop in TMCL:

Loop :

MVP ABS , 0, 51200

WAIT POS , 0, 0

MVP ABS , 0, 0

WAIT POS , 0, 0

JA Loop

Binary form of the JA Loop command when the label Loop is at address 10:

Binary Form of JA Loop (assuming Loop at address 10)

Field Value

Target address 01 h

Instruction number 16 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

0A h

21 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 47 / 141

3.6.18 CSUB (Call Subroutine)

This function calls a subroutine in the TMCL program memory.

It is intended for standalone operation only.

Internal function: the actual TMCL program counter value is saved to an internal stack, afterwards overwritten with the passed value. The number of entries in the internal stack is limited to 8. This also limits nesting of subroutine calls to 8. The command will be ignored if there is no more stack space left.

Related commands: RSUB, JA.

Mnemonic: CSUB <label>

Binary Representation

Instruction Type

23

Motor/Bank Value

0 (don’t care) 0 (don’t care) <subroutine address>

2

4

6

Example

Call a subroutine:

Loop :

MVP ABS , 0, 10000

CSUB SubW // Save program counter and jump to label SubW

MVP ABS , 0, 0

CSUB SubW

JA Loop

// Save program counter and jump to label SubW

8

10

SubW :

WAIT POS , 0, 0

WAIT TICKS , 0, 50

RSUB // Continue with the command following the CSUB command

Binary form of CSUB SubW

(assuming SubW at address

100)

Field Value

Target address

Instruction number 17 h

Type 00 h

Motor/Bank

Value (Byte 3)

00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

00 h

00 h

64 h

Checksum

01 h

7C h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 48 / 141

3.6.19 RSUB (Return from Subroutine)

Return from a subroutine to the command after the CSUB command.

This command is intended for use in standalone mode only.

Internal function: the TMCL program counter is set to the last value saved on the stack. The command will be ignored if the stack is empty.

Related commands: CSUB.

Mnemonic: RSUB

Binary Representation

Instruction Type

24

Motor/Bank Value

0 (don’t care) 0 (don’t care) 0 (don’t care)

Example

Please see the CSUB example (section

3.6.18

).

Binary form:

Binary Form of RSUB

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 18 h

Type 00 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

19 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 49 / 141

3.6.20 WAIT (Wait for an Event to occur)

This instruction interrupts the execution of the TMCL program until the specified condition is met.

This command is intended for standalone operation only.

There are five different wait conditions that can be used:

• TICKS: Wait until the number of timer ticks specified by the <ticks> parameter has been reached.

• POS: Wait until the target position of the motor specified by the <motor> parameter has been reached. An optional timeout value (0 for no timeout) must be specified by the <ticks> parameter.

• REFSW: Wait until the reference switch of the motor specified by the <motor> parameter has been triggered. An optional timeout value (0 for no timeout) must be specified by the <ticks> parameter.

• LIMSW: Wait until a limit switch of the motor specified by the <motor> parameter has been triggered.

An optional timeout value (0 for no timeout) must be specified by the <ticks> parameter.

• RFS: Wait until the reference search of the motor specified by the <motor> field has been reached.

An optional timeout value (0 for no timeout) must be specified by the <ticks> parameter.

Special case for the <ticks> parameter: When this parameter is set to -1 the contents of the accumulator register will be taken for this value. So for example WAIT TICKS, 0, -1 will wait as long as specified by the value store in the accumulator.

The accumulator must not contain a negative value when using this option.

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 will be held at the address of this WAIT command until the condition is met or the timeout has expired.

Related commands: JC, CLE.

Mnemonic: WAIT <condition>, <motor number>, <ticks>

Instruction Type

27

Binary Representation

Motor/Bank Value

0 TICKS – timer ticks

1 POS – target position reached

2 REFSW – reference switch

0 (don’t care) <no. of ticks to wait1>

<motor number> <no. of ticks for timeout1>

0 for no timeout

<motor number> <no. of ticks for timeout1>

0 for no timeout

<motor number> <no. of ticks for timeout1> 3 LIMSW – limit switch

0 for no timeout

4 RFS – reference search completed <motor number> <no. of ticks for timeout1>

0 for no timeout

Example

1 one tick is 10 milliseconds

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 50 / 141

Wait for motor 0 to reach its target position, without timeout.

Mnemonic: WAIT POS, 0, 0

Binary Form of WAIT POS, 0, 0

Field Value

Target address 01 h

Instruction number 1B h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

1D h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 51 / 141

3.6.21 STOP (Stop TMCL Program Execution – End of TMCL Program)

This command stops the execution of a TMCL program.

It is intended for use in standalone operation only.

Internal function: Execution of a TMCL program in standalone mode will be stopped.

Related commands: none.

Mnemonic: STOP

Binary Representation

Instruction Type

28

Motor/Bank Value

0 (don’t care) 0 (don’t care) 0 (don’t care)

Example

Mnemonic: STOP

Binary Form of STOP

Field Value

Target address 01 h

Instruction number 1C h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

1D h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 52 / 141

3.6.22 SCO (Set Coordinate)

Up to 20 position values (coordinates) can be stored for every axis for use with the MVP COORD command. This command sets a coordinate to a specified value. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).

Note Coordinate #0 is always stored in RAM only.

Internal function: the passed value is stored in the internal position array.

Related commands: GCO, CCO, ACO, MVP COORD.

Mnemonic: SCO <coordinate number>, <motor number>, <position>

Binary Representation

Instruction Type

30

Motor/Bank Value

<coordinate number> <motor number> <position>

0. . . 20 0 − 2 31 . . .

2 31 − 1

Example

Set coordinate #1 of motor #0 to 1000.

Mnemonic: SCO 1, 0, 1000

Binary Form of SCO 1, 0, 1000

Field Value

Target address 01 h

Instruction number 1E h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

03 h

E8 h

0B h

Two special functions of this command have been introduced that make it possible to copy all coordinates or one selected coordinate to the EEPROM. These functions can be accessed using the following special forms of the SCO command:

• SCO 0, 255, 0 copies all coordinates (except coordinate number 0) from RAM to the EEPROM.

• SCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> to the

EEPROM. The coordinate number must be a value between 1 and 20.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 53 / 141

3.6.23 GCO (Get Coordinate)

Using this command previously stored coordinate can be read back. In standalone mode the requested value is copied to the accumulator register for further processing purposes such as conditional jumps.

In direct mode, the value is only output in the value field of the reply, without affecting the accumulator.

Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the

EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).

Note Coordinate #0 is always stored in RAM only.

Internal function: the desired value is read out of the internal coordinate array, copied to the accumulator register and – in direct mode – returned in the value field of the reply.

Related commands: SCO, CCO, ACO, MVP COORD.

Mnemonic: GCO <coordinate number>, <motor number>

Binary Representation

Instruction Type

31

Motor/Bank Value

<coordinate number> <motor number> 0 (don’t care)

0. . . 20 0

Reply in Direct Mode

Status Value

100 - OK value read by this command

Example

Get coordinate #1 of motor #0.

Mnemonic: GCO 1, 0

Binary Form of GCO 1, 0

Field Value

Target address 01 h

Instruction number 1F h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

21 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 54 / 141

Two special functions of this command have been introduced that make it possible to copy all coordinates or one selected coordinate from the EEPROM to the RAM.

These functions can be accessed using the following special forms of the GCO command:

• GCO 0, 255, 0 copies all coordinates (except coordinate number 0) from the EEPROM to the RAM.

• GCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> from the

EEPROM to the RAM. The coordinate number must be a value between 1 and 20.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 55 / 141

3.6.24 CCO (Capture Coordinate)

This command copies the actual position of the axis to the selected coordinate variable. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only). Please see the SCO and

GCO commands on how to copy coordinates between RAM and EEPROM.

Note Coordinate #0 is always stored in RAM only.

Internal function: the actual position of the selected motor is copied to selected coordinate array entry.

Related commands: SCO, GCO, ACO, MVP COORD.

Mnemonic: CCO <coordinate number>, <motor number>

Binary Representation

Instruction Type

32

Motor/Bank Value

<coordinate number> <motor number> 0 (don’t care)

0. . . 20 0

Status

Reply in Direct Mode

Value

100 - OK value read by this command

Example

Store current position of motor #0 to coordinate array entry #3.

Mnemonic: CCO 3, 0

Binary Form of CCO 3, 0

Field Value

Target address 01 h

Instruction number 20 h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

22 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 56 / 141

3.6.25 ACO (Accu to Coordinate)

With the ACO command the actual value of the accumulator is copied to a selected coordinate of the motor. Depending on the global parameter 84, the coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the default setting the coordinates are stored in RAM only).

Note Coordinate #0 is always stored in RAM only.

Internal function: the actual position of the selected motor is copied to selected coordinate array entry.

Related commands: SCO, GCO, CO, MVP COORD.

Mnemonic: ACO <coordinate number>, <motor number>

Instruction Type

39

Binary Representation

Motor/Bank Value

<coordinate number> <motor number> 0 (don’t care)

0. . . 20 0

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Copy the actual value of the accumulator to coordinate #1 of motor #0.

Mnemonic: ACO 1, 0

Binary Form of ACO 1, 0

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 27 h

Type 01 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

29 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 57 / 141

3.6.26 CALCX (Calculate using the X Register)

This instruction is very similar to CALC, but the second operand comes from the X register. The X register can be loaded with the LOAD or the SWAP type of this instruction. The result is written back to the accumulator for further processing like comparisons or data transfer.

This command is mainly intended for use in standalone mode.

Related commands: CALC, COMP, JC, AAP, AGP, GAP, GGP, GIO.

Mnemonic: CALCX <operation>

Binary Representation

Instruction Type

33 0 ADD – add X register to accumulator

1 SUB – subtract X register from accumulator

2 MUL – multiply accumulator by X register

3 DIV – divide accumulator by X register

4 MOD – modulo divide accumulator by X register

5 AND – logical and accumulator with X register

6 OR – logical or accumulator with X register

7 XOR – logical exor accumulator with X register

8 NOT – logical invert X register

9 LOAD – copy accumulator to X register

10 SWAP – swap accumulator and X register

Motor/Bank Value

0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Multiply accumulator and X register.

Mnemonic: CALCX MUL

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 58 / 141

Binary Form of CALCX MUL

Field Value

Target address 01 h

Instruction number 21 h

Type

Motor/Bank

02 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

24 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 59 / 141

3.6.27 AAP (Accu to Axis Parameter)

The content of the accumulator register is transferred to the specified axis parameter. For practical usage, the accumulator has to be loaded e.g. by a preceding GAP instruction. The accumulator may have been modified by the CALC or CALCX (calculate) instruction.

This command is mainly intended for use in standalone mode.

Info

For a table with parameters and values which can be used together with this command please refer to section

4 .

Related commands: AGP, SAP, GAP, SGP, GGP, GIO, CALC, CALCX.

Mnemonic: AAP <parameter number>, <motor number>

Binary Representation

Instruction Type Motor/Bank Value

34 see chapter

4

0 <value>

Reply in Direct Mode

Status Value

100 - OK don’t care

1

3

5

Example

Position motor #0 by a potentiometer connected to analog input #0:

Start :

GIO 0,1 // get value of analog input line 0

CALC MUL , 4 // multiply by 4

AAP 0,0

JA Start

// transfer result to target position of motor 0

// jump back to start

Binary Form of AAP 0, 0

Field Value

Target address 01 h

Instruction number 22 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

23 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 60 / 141

3.6.28 AGP (Accu to Global Parameter)

The content of the accumulator register is transferred to the specified global parameter. For practical usage, the accumulator has to be loaded e.g. by a preceding GAP instruction. The accumulator may have been modified by the CALC or CALCX (calculate) instruction.

This command is mainly intended for use in standalone mode.

Info

For an overview of parameter and bank indices that can be used with this command please see section

5 .

Related commands: AAP, SGP, GGP, SAP, GAP, GIO.

Mnemonic: AGP <parameter number>, <bank number>

Instruction Type

35

Binary Representation

Motor/Bank Value

<parameter number> 0/2/3 <bank number> 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Copy accumulator to user variable #42:

Mnemonic: AGP 42, 2

Binary Form of AGP 42, 2

Field Value

Target address 01 h

Instruction number 23 h

Type

Motor/Bank

2A h

02 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

50 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 61 / 141

3.6.29 CLE (Clear Error Flags)

This command clears the internal error flags. It is mainly intended for use in standalone mode.

The following error flags can be cleared by this command (determined by the <flag> parameter):

• ALL: clear all error flags.

• ETO: clear the timeout flag.

• EAL: clear the external alarm flag.

• EDV: clear the deviation flag.

• EPO: clear the position error flag.

Related commands: JC, WAIT.

Mnemonic: CLE <flags>

Binary Representation

Instruction Type

36 0 ALL – all flags

1 – (ETO) timeout flag

2 – (EAL) alarm flag

3 – (EDV) deviation flag

4 – (EPO) position flag

5 – (ESD) shutdown flag

Motor/Bank Value

0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Reset the timeout flag.

Mnemonic: CLE ETO

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 62 / 141

Binary Form of CLE ETO

Field Value

Target address 01 h

Instruction number 24 h

Type

Motor/Bank

01 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

26 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 63 / 141

3.6.30 EI (Enable Interrupt)

The EI command enables an interrupt. It needs the interrupt number as parameter. Interrupt number

255 globally enables interrupt processing.

This command is mainly intended for use in standalone mode.

Info

Please see table

12

for a list of interrupts that can be used on the TMCM-1111

StepRocker module.

Related commands: DI, VECT, RETI.

Mnemonic: EI <interrupt number>

Binary Representation

Instruction Type

25

Motor/Bank Value

<interrupt number> 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Globally enable interrupt processing:

Mnemonic: EI 255

Binary form of EI 255

Field Value

Target address 01 h

Instruction number 19 h

Type

Motor/Bank

FF h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

19 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 64 / 141

3.6.31 DI (Disable Interrupt)

The DI command disables an interrupt. It needs the interrupt number as parameter. Interrupt number

255 globally disables interrupt processing.

This command is mainly intended for use in standalone mode.

Info

Please see table

12

for a list of interrupts that can be used on the TMCM-1111

StepRocker module.

Related commands: EI, VECT, RETI.

Mnemonic: DI <interrupt number>

Binary Representation

Instruction Type

26

Motor/Bank Value

<interrupt number> 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Globally disable interrupt processing:

Mnemonic: DI 255

Binary Form of DI 255

Field Value

Target address 01 h

Instruction number 1A h

Type

Motor/Bank

FF h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

1A h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 65 / 141

3.6.32 VECT (Define Interrupt Vector)

The VECT command defines an interrupt vector. It takes an interrupt number and a label (just like with

JA, JC and CSUB commands) as parameters. The label must be the entry point of the interrupt handling routine for this interrupts. Interrupt vectors can also be re-defined.

This command is intended for use in standalone mode only.

Info

Please see table

12

for a list of interrupts that can be used on the TMCM-1111

StepRocker module.

Related commands: EI, DI, RETI.

Mnemonic: VECT <interrupt number>, <label>

Instruction Type

Binary Representation

Motor/Bank Value

37 <interrupt number> 0 (don’t care) <label>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Define interrupt vector for timer #0 interrupt:

1

3

5

7

9

VECT 0, Timer0Irq

...

Loop :

...

JA Loop

...

Timer0Irq :

SIO 0, 2, 1

RETI

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 66 / 141

Binary form of VECT (assuming label is at 50)

Field Value

Target address 01 h

Instruction number 25 h

Type FF h

Motor/Bank

Value (Byte 3)

00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

32 h

58 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 67 / 141

3.6.33 RETI (Return from Interrupt)

This command terminates an interrupt handling routine. Normal program flow will be continued then.

This command is intended for use in standalone mode only.

An interrupt routine must always end with a RETI command. Do not allow the normal program flow to run into an interrupt routine.

Internal function: The saved registers (accumulator, X registers, flags and program counter) are copied back so that normal program flow will continue.

Related commands: EI, DI, VECT.

Mnemonic: RETI

Binary Representation

Instruction Type

38

Motor/Bank Value

<interrupt number> 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Return from an interrup handling routine.

Mnemonic: RETI

Binary Form of RETI

Field Value

Target address 01 h

Instruction number 26 h

Type

Motor/Bank

FF h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

27 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 68 / 141

3.6.34 CALCVV (Calculate using two User Variables)

The CALCVV instruction directly uses the contents of two user variables for an arithmetic operation, storing the result in the first user variable. This eliminates the need for using the accumulator register and/or

X register for such purposes. The parameters of this command are the arithmetic function, the index of the first user variable (0. . . 255) and the index of the second user variable (0.. .255).

This command is mainly intended for use in standalone mode.

Related commands: CALCVA, CALCAV, CALCVX, CALCXV, CALCV.

Mnemonic: CALCVV <operation>, <var1>, <var2>

Binary representation

Binary Representation

Instruction Type

40 0 ADD – add <var2> to <var1>

1 SUB – subtract <var2> from <var1>

2 MUL – multiply <var2> with <var1>

3 DIV – divide <var2> by <var1>

4 MOD – modulo divide <var2> by <var1>

5 AND – logical and <var2> with <var1>

6 OR – logical or <var2> with <var1>

7 XOR – logical exor <var2> with <var1>

8 NOT – copy logical inverted <var2> to <var1>

9 LOAD – copy <var2> to <var1>

10 SWAP – swap contents of <var1> and <var2>

11 COMP – compare <var1> with <var2>

Motor/Bank Value

0 <var1> (0.. . 255) <var2> (0. .. 255)

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract user variable #42 from user variable #65.

Mnemonic: CALCVV SUB, 65, 42

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 69 / 141

Binary Form of CALCVV SUB, 65, 42

Field Value

Target address 01 h

Instruction number 28 h

Type

Motor/Bank

01 h

41 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

2A h

95 h

Reply (Status=no error, value=0:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

28 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

8F h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 70 / 141

3.6.35 CALCVA (Calculate using a User Variable and the Accumulator Register)

The CALCVA instruction directly modifies a user variable using an arithmetical operation and the contents of the accumulator register. The parameters of this command are the arithmetic function and the index of a user variable (0. . . 255).

This command is mainly intended for use in standalone mode.

Related commands: CALCV, CALCAV, CALCVX, CALCXV, CALCVV.

Mnemonic: CALCVA <operation>, <var>

Binary representation

Binary Representation

Instruction Type

41 0 ADD – add accumulator to <var>

1 SUB – subtract accumulator from <var>

2 MUL – multiply <var> with accumulator

3 DIV – divide <var> by accumulator

4 MOD – modulo divide <var> by accumulator

5 AND – logical and <var> with accumulator

6 OR – logical or <var> with accumulator

7 XOR – logical exor <var> with accumulator

8 NOT – copy logical inverted accumulator to <var>

9 LOAD – copy accumulator to <var>

10 SWAP – swap contents of <var> and accumulator

11 COMP – compare <var> with accumulator

Motor/Bank Value

0 <var> (0.. . 255) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract accumulator from user variable #27.

Mnemonic: CALCVA SUB, 27

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 71 / 141

Binary Form of CALCVA SUB, 27

Field Value

Target address 01 h

Instruction number 29 h

Type

Motor/Bank

01 h

1B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

46 h

Reply (Status=no error, value=0:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

29 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

90 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 72 / 141

3.6.36 CALCAV (Calculate using the Accumulator Register and a User Variable)

The CALCAV instruction modifies the accumulator register using an arithmetical operation and the contents of a user variable. The parameters of this command are the arithmetic function and the index of a user variable (0.. . 255).

This command is mainly intended for use in standalone mode.

Related commands: CALCV, CALCAV, CALCVX, CALCXV, CALCVV.

Mnemonic: CALCAV <operation>, <var>

Binary representation

Binary Representation

Instruction Type

42 0 ADD – add <var> to accumulator

1 SUB – subtract <var> from accumulator

2 MUL – multiply accumulator with <var>

3 DIV – divide accumulator by <var>

4 MOD – modulo divide accumulator by <var>

5 AND – logical and accumulator with <var>

6 OR – logical or accumulator with <var>

7 XOR – logical exor accumulator with <var>

8 NOT – copy logical inverted <var> to accumulator

9 LOAD – copy <var> to accumulator

10 SWAP – swap contents of <var> and accumulator

11 COMP – compare accumulator with <var>

Motor/Bank Value

0 <var> (0.. . 255) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract user variable #27 from accumulator.

Mnemonic: CALCXV SUB, 27

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 73 / 141

Binary Form of CALCXV SUB, 27

Field Value

Target address 01 h

Instruction number 2A h

Type

Motor/Bank

01 h

1B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

47 h

Reply (Status=no error, value=0:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

2A h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

91 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 74 / 141

3.6.37 CALCVX (Calculate using a User Variable and the X Register)

The CALCVX instruction directly modifies a user variable using an arithmetical operation and the contents of the X register. The parameters of this command are the arithmetic function and the index of a user variable (0...255).

This command is mainly intended for use in standalone mode.

Related commands: CALCV, CALCAV, CALCVA, CALCXV, CALCVV.

Mnemonic: CALCVX <operation>, <var>

Binary representation

Binary Representation

Instruction Type

43 0 ADD – add X register to <var>

1 SUB – subtract X register from <var>

2 MUL – multiply <var> with X register

3 DIV – divide <var> by X register

4 MOD – modulo divide <var> by X register

5 AND – logical and <var> with X register

6 OR – logical or <var> with X register

7 XOR – logical exor <var> with X register

8 NOT – copy logical inverted X register to <var>

9 LOAD – copy X register to <var>

10 SWAP – swap contents of <var> and X register

11 COMP – compare <var> with X register

Motor/Bank Value

0 <var> (0. .. 255) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract X register from user variable #27.

Mnemonic: CALCVX SUB, 27

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 75 / 141

Binary Form of CALCVX SUB, 27

Field Value

Target address 01 h

Instruction number 2B h

Type

Motor/Bank

01 h

1B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

48 h

Reply (Status=no error, value=0:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

2B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

92 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 76 / 141

3.6.38 CALCXV (Calculate using the X Register and a User Variable)

The CALCXV instruction modifies the X register using an arithmetical operation and the contents of a user variable. The parameters of this command are the arithmetic function and the index of a user variable

(0... 255).

This command is mainly intended for use in standalone mode.

Related commands: CALCV, CALCAV, CALCVA, CALCVX, CALCVV.

Mnemonic: CALCXV <operation>, <var>

Binary representation

Binary Representation

Instruction Type

44 0 ADD – add <var> to X register

1 SUB – subtract <var> from X register

2 MUL – multiply X register with <var>

3 DIV – divide X register by <var>

4 MOD – modulo divide X register by <var>

5 AND – logical and X register with <var>

6 OR – logical or X register with <var>

7 XOR – logical exor X register with <var>

8 NOT – copy logical inverted <var> to X register

9 LOAD – copy <var> to X register

10 SWAP – swap contents of <var> and X register

11 COMP – compare X register with <var>

Motor/Bank Value

0 <var> (0. .. 255) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract user variable #27 from X register.

Mnemonic: CALCXV SUB, 27

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 77 / 141

Binary Form of CALCXV SUB, 27

Field Value

Target address 01 h

Instruction number 2C h

Type

Motor/Bank

01 h

1B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

49 h

Reply (Status=no error, value=0:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

2C h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

93 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 78 / 141

3.6.39 CALCV (Calculate using a User Variable and a Direct Value)

The CALCV directly modifies a user variable using an arithmetical operation and a direct value. This eliminates the need of using the accumulator register for such a purpose and thus can make the program shorter and faster. The parameters of this command are the arithmetic function, the index of a user variable (0.. .255) and a direct value.

This command is mainly intended for use in standalone mode.

Related commands: CALCVA, CALCAV, CALCVX, CALCXV, CALCVV.

Mnemonic: CALCV <operation>, <var>, <value>

Binary representation

Binary Representation

Instruction Type

45 0 ADD – add <value> to <var>

1 SUB – subtract <value> from <var>

2 MUL – multiply <var> with <value>

3 DIV – divide <var> by <value>

4 MOD – modulo divide <var> by <value>

5 AND – logical and <var> with <value>

6 OR – logical or <var> with <value>

7 XOR – logical exor <var> with <value>

8 NOT – logical invert <var> (<value> ignored)

9 LOAD – copy <value> to <var>

11 COMP – compare <var> with <value>

Motor/Bank Value

0 <var> (0.. .255) <value>

Reply in Direct Mode

Status Value

100 - OK the operand (don’t care)

Example

Subtract 5000 from user variable #27.

Mnemonic: CALCV SUB, 27, 5000

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 79 / 141

Binary Form of CALCV SUB, 27, 5000

Field Value

Target address 01 h

Instruction number 2D h

Type

Motor/Bank

01 h

1B h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

13 h

88 h

E5 h

Reply (Status=no error, value=5000:

Field Value

Host address 02 h

Target address 01 h

Status

Instruction

64 h

2D h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

13 h

88 h

2F h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 80 / 141

3.6.40 RST (Restart)

Stop the program, reset the TMCL interpreter and then re-start the program at the given label. This command can be used to re-start the TMCL program from anywhere in the program, also out of subroutines or interrupt rotuines.

This command is intended for standalone operation only.

Internal function: The TMCL interpreter is reset (the subroutine stack, the interrupt stack and the registers are cleared) and then the program counter is set to the value passed to this command.

Related commands: JA, CSUB, STOP.

Mnemonic: RST <label>

Binary Representation

Instruction Type

48

Motor/Bank Value

0 (don’t care) 0 (don’t care) <restart address>

1

3

5

7

Example

Restart the program from a label, out of a subroutine:

Entry :

MVP ABS , 0, 51200

CSUB Subroutine

...

...

Subroutine :

RST Entry

RSUB

Binary form of the RST Entry command when the label Entry is at address 10:

Binary Form of RST Entry (assuming Entry at address 10)

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 30 h

Type 00 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

0A h

3A h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 81 / 141

3.6.41 DJNZ (Decrement and Jump if not Zero)

Decrement a given user variable and jump to the given address if the user variable is greater than zero.

This command can for example be used to easily program a counting loop, using any user variable as the loop counter.

This command is intended for standalone operation only.

Internal function: The user variable passed to this command is decremented. If it is not zero then the

TMCL program counter is set to the value passed to this command.

Related commands: JC, WAIT, CSUB.

Mnemonic: DJNZ <var>, <label>

Binary Representation

Instruction Type

49

Motor/Bank Value

<user variable> (0. .. 255) 0 (don’t care) <jump address>

2

4

6

Example

A counting loop in TMCL, using user variable #42:

SGP 42, 2, 100

Loop :

MVP ABS , REL , 51200

WAIT POS , 0, 0

WAIT TICKS , 0, 500

DJNZ 42, Loop

Binary form of the DJNZ 42, Loop command when the label Loop is at address 1:

Binary Form of DJNZ Loop (assuming Loop at address 1)

Field Value

Target address 01 h

Instruction number 31 h

Type 64 h

Motor/Bank

Value (Byte 3)

00 h

00 h

Value (Byte 2)

Value (Byte 1)

00 h

00 h

Value (Byte 0)

Checksum

01 h

97 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 82 / 141

3.6.42 CALL (Conditional Subroutine Call)

The CALL command calls a subroutine in the TMCL program, but only if the specifed condition is met. Otherwise the program execution will be continued with the next command following the CALL command.

The conditions refer to the result of a preceding comparison or assignment.

This command is intended for standalone operation only.

Internal function: When the condition is met the actual TMCL program counter value will be saved to an internal stack. Afterwards the program counter will be overwritten with the address supplied to this command. The number of entries in the internal stack is limited to 8. This also limits nesting of subroutine calls to 8. The command will be ignored if there is no more stack space left.

Related commands: RSUB, JC.

Mnemonic: CALL <condition>, <label>

Binary Representation

Instruction Type

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

9 EAL - external alarm

10 EDV - deviation error

11 EPO - position error

Motor/Bank Value

0 (don’t care) <jump address>

2

4

6

8

Example

Call a subroutine if a condition is met:

Loop :

GIO 0, 1

CALC SUB , 512

COMP 0

// read analog value

// subtract 512

// compare with zero

// Call routine " RunLeft " if accu <0 CALL LT , RunLeft

CALL ZE , MotorStop // Call routine " MotosStop " if accu =0

CALL GT , RunRight

JA Loop

// Call routine " RunRight " if accu >0

10

12

RunLeft :

CALC MUL , -1

ROLA 0

RSUB

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 83 / 141

14

16

RunRight :

RORA 0

RSUB

18

20

22

24

MotorStop :

GAP 2, 0

JC ZE , MotorIsStopped

MST 0

MotorIsStopped :

RSUB

Binary form of CALL LT, Run-

Left

(assuming RunLeft at address

100)

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 50 h

Type 06 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

64 h

BB h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 84 / 141

3.6.43 MVPA (Move to Position specified by Accumulator Register)

With this command the motor will be instructed to move to a specified relative or absolute position. The contents of the accumulator register will be used as the target position. This command is non-blocking which means that a reply will be sent immediately after command interpretation and initialization of the motion controller. Further commands may follow without waiting for the motor reaching its end position.

The maximum velocity and acceleration as well as other ramp parameters are defined by the appropriate axis parameters. For a list of these parameters please refer to section

4 .

Positioning can be interrupted using MST, ROL or ROR commands.

Three operation types are available:

• Moving to an absolute position specified by the accumulator register contents.

• Starting a relative movement by means of an offset to the actual position.

• Moving the motor to a (previously stored) coordinate (refer to SCO for details).

Note The distance between the actual position and the new position must not be more than 2147483647 (

2

31 − 1

) microsteps. Otherwise the motor will run in the opposite direction in order to take the shorter distance (caused by 32 bit overflow).

Internal function: Position mode is selected and the value stored in the accumulator register is copied to axis parameter #0 (target position).

Related commands: MVPXA, SAP, GAP, SCO, GCO, CCO, ACO, MST.

Mnemonic: MVPA < ABS|REL|COORD > , < axis >

Binary Representation

Instruction Type

0 – ABS – absolute

46 1 – REL – relative

Motor/Bank Value

0

0

2 – COORD – coordinate 0.. . 255

0 (don’t care)

0 (don’t care)

0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Move motor 0 to position specified by accumulator.

Mnemonic: MVPA ABS, 0

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 85 / 141

Binary Form of MVPA ABS, 0

Field Value

Target address 01 h

Instruction number 2E h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

2F h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 86 / 141

3.6.44 ROLA (Rotate Left using the Accumulator Register)

Rotate in left direction (decreasing the position counter) using the velocity specified by the contents of the accumulator register. The velocity is given in microsteps per second (pulse per second [pps]).

Internal function: Velocity mode is selected. Then, the velocity value is transferred to the target velocity

(axis parameter #2).

Related commands: RORA, MST, SAP, GAP.

Mnemonic: ROLA

< axis

>

Binary Representation

Instruction Type

50

Motor/Bank Value

0 (don’t care) 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Rotate left motor 0, velocity specified by accumulator.

Mnemonic: ROLA 0.

Binary Form of ROLA 0

Field Value

Target address 01 h

Instruction number 32 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

33 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 87 / 141

3.6.45 RORA (Rotate Right using the Accumulator Register)

Rotate in right direction (increasing the position counter) using the velocity specified by the contents of the accumulator register. The velocity is given in microsteps per second (pulse per second [pps]).

Internal function: Velocity mode is selected. Then, the velocity value is transferred to the target velocity

(axis parameter #2).

Related commands: ROLA, MST, SAP, GAP.

Mnemonic: ROLA

< axis

>

Binary Representation

Instruction Type

51

Motor/Bank Value

0 (don’t care) 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Rotate right motor 0, velocity specified by accumulator.

Mnemonic: RORA 0.

Binary Form of RORA 0

Field Value

Target address 01 h

Instruction number 33 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

33 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 88 / 141

3.6.46 SIV (Set Indexed Variable)

This command copies a direct value to a TMCL user variable. The index of the user variable (0. ..255) is specified by the content of the X register. Therefore the value in the X register must not be lower than zero or greater than 255. Otherwise this command will be ignored.

This command is mainly intended for use in standalone mode.

Internal function: The direct value supplied to this command will be copied to the user variable specified by the X register.

Related commands: AIV, GIV.

Mnemonic: SIV

Binary Representation

Instruction Type

55

Motor/Bank Value

0 (don’t care) 0 (don’t care) <value>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Copy the value 3 to the user variable indexed by the X register.

Mnemonic: SIV 3.

Binary Form of SIV 3

Field Value

Target address 01 h

Instruction number 37 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

03 h

3B h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 89 / 141

3.6.47 GIV (Get Indexed Variable)

This command reads a TMCL user variable and copies its content to the accumulator register. The index of the user variable (0. . . 255) is specified by the X register. Therefore the content of the X register must not be lower than zero or greater than 255. Otherwise this command will be ignored.

This command is mainly intended for use in standalone mode.

Internal function: The user variable specified by the x register will be copied to the accumulator register.

Related commands: SIV, AIV.

Mnemonic: GIV

Binary Representation

Instruction Type

55

Motor/Bank Value

0 (don’t care) 0 (don’t care) 0 (don’t care)

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Read the user variable indexed by the X register.

Mnemonic: GIV.

Field

Binary Form of GIV

Value

Target address 01 h

Instruction number 38 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

03 h

39 h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 90 / 141

3.6.48 AIV (Accumulator to Indexed Variable)

This command copies the content of the accumulator to a TMCL user variable. The index of the user variable (0.. .255) is specified by the content of the X register. Therefore the value in the X register must not be lower than zero or greater than 255. Otherwise this command will be ignored.

This command is mainly intended for use in standalone mode.

Internal function: The accumulator will be copied to the user variable specified by the X register.

Related commands: SIV, GIV.

Mnemonic: AIV

Binary Representation

Instruction Type

55

Motor/Bank Value

0 (don’t care) 0 (don’t care) <value>

Reply in Direct Mode

Status Value

100 - OK don’t care

Example

Copy the accumulator to the user variable indexed by the X register.

Mnemonic: AIV.

Field

Binary Form of AIV

Value

Target address 01 h

Instruction number 39 h

Type

Motor/Bank

00 h

00 h

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

00 h

00 h

3A h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 91 / 141

3.6.49 Customer specific Command Extensions (UF0...UF7 – User Functions)

These commands are used for customer specific extensions of TMCL. They will be implemented in C by

Trinamic. Please contact the sales department of Trinamic Motion Control GmbH & Co KG if you need a customized TMCL firmware.

Related commands: none.

Mnemonic: UF0. . . UF7

Binary Representation

Instruction Type

64... 71

Motor/Bank Value

<user defined> 0 <user defined> 0 <user defined>

Reply in Direct Mode

Status Value

100 - OK user defined

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 92 / 141

3.6.50 Request Target Position reached Event

This command is the only exception to the TMCL protocol, as it sends two replies: One immediately after the command has been executed (like all other commands also), and one additional reply that will be sent when the motor has reached its target position.

This instruction can only be used in direct mode (in standalone mode, it is covered by the WAIT command) and hence does not have a mnemonic.

Internal function: send an additional reply when a motor has reached its target position.

Related commands: none.

Binary Representation

Instruction Type Motor/Bank Value

138 0/1 0 (don’t care) always 1

With command 138 the value field is a bit vector. It shows for which motors one would like to have a position reached message. The value field contains a bit mask where every bit stands for one motor. For one motor modules like the TMCM-1111 StepRocker it only makes sense to have bit 0 set. So, always set this parameter to 1 with the TMCM-1111 StepRocker module. With the type field set to 0, only for the next

MVP command that follows this command a position reached message will be generated. With type set to 1 a position reached message will be generated for every MVP command that follows this command.

It is recommended to use the latter option.

Example

Get a target position reached message for each MVP command that follows.

Binary Form for this example

Field Value

Target address

Value (Byte 3)

01 h

Instruction number 8A h

Type 01 h

Motor/Bank 00 h

00 h

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

Checksum

00 h

00 h

01 h

8D h

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 93 / 141

Field

Reply in Direct Mode

Value

Target address 01 h

Host address 02 h

Status

Command

64 h

(100)

8A h

(138)

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

00 h

00 h

00 h

Motor bit mask

Checksum depends also on motor bit mask

Additional Reply after Motor has reached Target Position

Field Value

Target address 01 h

Host address 02 h

Status

Command

80 h

(128)

8A h

(138)

Value (Byte 3)

Value (Byte 2)

Value (Byte 1)

Value (Byte 0)

00 h

00 h

00 h

Motor bit mask

Checksum depends also on motor bit mask

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 94 / 141

3.6.51 TMCL Control Commands

There is a set of TMCL commands which are called TMCL control commands. These commands can only be used in direct mode and not in a standalone program. For this reason they only have opcodes, but no mnemonics. Most of these commands are only used by the TMCL-IDE (in order to implement e.g. the debugging functions in the TMCL creator). Some of them are also interesting for use in custom host applications, for example to start a TMCL routine on a module, when combining direct mode and standalone mode (please see also section

8.6

. The following table lists all TMCL control commands.

The motor/bank parameter is not used by any of these functions and thus is not listed in the table. It should always be set to 0 with these commands.

Instruction

128 – stop application

129 – run application

130 – step application

131 – reset application

TMCL Control Commands

Description Type

0 (don’t care) stop a running TMCL application start or continue

TMCL program execution

0 – from current address

1 – from specific address

0 (don’t care) execute only the next

TMCL command

Stop a running TMCL program.

Reset program counter and stack pointer to zero.

Reset accumulator and X register to zero.

Reset all flags.

0 (don’t care)

0 (don’t care) 132 – enter download mode All following commands (except control commands) are not executed but stored in the TMCL memory.

133 – exit download mode End the download mode. All following commands are executed normally again.

134 – read program memory Return contents of the specified program memory location (special reply format).

0 (don’t care)

0 (don’t care)

Value

0 (don’t care)

0 (don’t care) starting dress

0 (don’t care)

0 (don’t care) adstart address for download

0 (don’t care) address of memory location

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 95 / 141

Instruction

135 – get application status

Description

Return information about the current status, depending on the type field.

Type

0 - return mode, wait flag, memory pointer

1 - return mode, wait flag, program counter

2 - return accumulator

3 - return X register

0 - string format

1 - binary format

Value

0 (don’t care)

0 (don’t care) 136 – get firmware version

137 – restore factory settings Reset all settings in the EEPROM to their factory defaults.

This command does not send a reply.

255 – software reset

Return firmware version in string format (special reply) or binary format).

Restart the CPU of the module (like a power cycle).

The reply of this command might not always get through.

0 (don’t care)

0 (don’t care) set to 1234 set to 1234

Table 14: TMCL Control Commands

Especially the commands 128, 129, 131, 136 and 255 are interesting for use in custom host applications.

The other control commands are mainly being used by the TMCL-IDE.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 96 / 141

4 Axis Parameters

Most motor controller features of the TMCM-1111 StepRocker module are controlled by axis parameters.

Axis parameters can be modified or read using SAP, GAP and AAP commands. This chapter describes all axis parameters that can be used on the TMCM-1111 StepRocker module.

There are different parameter access types, like read only or read/write. Table

15

shows the different parameter access types used in the axis parameter tables.

Meaning of the Letters in the Access Column

Access type Command Description

R

W

GAP

SAP, AAP

Parameter readable

Parameter writable

Table 15: Meaning of the Letters in the Access Column

All Axis Parameters of the TMCM-1111 StepRocker Module

Number Axis Parameter Description

0 Target position The desired target position in position mode

Range [Units] Access

-2147483648

. . . 2147483647

[

µ steps]

RW

1

2

3

4

5

6

Actual position The actual position of the motor. Stop the motor before overwriting it. Should normally only be overwritten for reference position setting.

Target speed The desired speed in velocity mode. Not valid in position mode.

Actual speed

Maximum positioning speed

Maximum acceleration

Maximum current

The actual speed of the motor.

The maximum speed used for positioning ramps.

Maximum acceleration during ramp-up.

Motor current used when motor is running. The maximum value is 255 which means 100% of the maximum current of the module.

The most important setting, as too high values can cause motor damage.

[

-2147483648

. . . 2147483647

µ steps]

-1677215

. . . 16777215

[pps]

-16777215

. . . 16777215

[pps]

0. . . 16777215

[pps]

0. . .

2147483647

[pps 2 ]

0. . . 255

RW

RW

R

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 97 / 141

Number Axis Parameter Description

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.

Please see also parameter 214.

8

9

10

Position reached flag

Home switch state

Right limit switch state

This flag is always set when target position and actual position are equal.

The logical state of the home switch input.

The logical state of the right limit switch input.

Range [Units]

0. . . 255

0/1

0/1

0/1

Access

RW

R

R

R

11 The logical state of the left limit switch input.

0/1 R

12

13

14

15

16

Left limit switch state

Right limit switch enable / polarity

Left limit switch ensable

/ polarity

Ramp type

Start velocity

Start acceleration

0 - switch deactivated

1 - switch active, motor will stop if input is low

3 - switch active, motor will stop if input is high

0 - switch deactivated

1 - switch active, motor will stop if input is low

3 - switch active, motor will stop if input is high

Selects the type of ramp to be used:

0 - trapezoidal ramp

1 - S-shaped ramp

For trapezoidal ramps: initial velocity at motion start.

0/1/3

0/1/3

0/1

0. . . 16777215

[pps]

0. . .

2147483647

[pps]

RW

RW

RW

RW

RW

17

18

19

20

Maximum deceleration

Break velocity

Final deceleration

Stop velocity

For trapezoidal ramps: initial acceleration at motion start. Will be changed to maximum acceleration (axis parameter 5) as soon as the break velocity has been reached (axis parameter 18).

For trapezoidal ramps: maximum deceleration.

May be set to the same value as the maximum acceleration (axis parameter 5), but can also be set to a different value.

For trapezoidal ramps: below this velocity the start acceleration (axis parameter 16) is used – above this velocity the maximum acceleration

(axis parameter 5) is used.

For trapezoidal ramps: deceleration used as soon as the actual velocity has fallen below the break velocity (axis parameter 18).

For trapezoidal ramps: velocity when target position has been reached and motion stops.

0. . .

2147483647

[pps

0. . . 16777215

[pps

0. . .

2

2

2147483647

[pps 2 ]

0. . . 16777215

[pps]

]

]

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 98 / 141

Number Axis Parameter Description

21 Stop deceleration

Deceleration value if stop switches or virtual stops are used with soft ramps. A value not equal to zero will generate an automatic linear ramp when a stop switch is hit or a virtual stop has been reached.

22 Bow 1 Increasing of the absolute acceleration value for

S-shaped ramps.

Range [Units] Access

0. . .

2147483647

[pps 2 ]

RW

23

24

25

26

27

28

Bow 2

Bow 3

Bow 4

Decreasing of the absolute acceleration value for S-shaped ramps.

Increasing of the absolute deceleration value for S-shaped ramps.

Decreasing of the absolute deceleration value for S-shaped ramps.

Virtual stop left Virtual stop position when motor is moving in

Virtual stop right

Virtual stop enable negative direction.

Virtual stop position when motor is moving in positive direction.

0 - both virtual stop disabled

1 - Virtual stop left enable

2 - Virtual stop right enable

3 - both virtual stop enabled

0 . ..

2147483647

[pps 3 ]

0 . ..

2147483647

[pps 3 ]

0 . ..

2147483647

[pps 3 ]

0 . ..

2147483647

[pps 3 ]

-2147483648

. . . 2147483647

[pps]

-2147483648

. . . 2147483647

[pps]

0. . . 3

RW

RW

RW

RW

RW

RW

RW

29

33

34

35

Virtual stop mode

Swap stop switches

Enable soft stop

Bow scaling factor

0 - use normal ramp deceleration settings

1 - use hard stop

2 - use stop deceleration (parameter #21)

Use right stops switch for negative direction and left stop switch for positive direction if set to 1.

0 - use hard stop at stop switches

1 - use deceleration ramp (parameter #21) at stop switches

The bow values (axis parameters #22. .. #25) will be multiplied by this value so that also bow values higher than 2147483647 can be reached.

This is only needed in rare cases where very steep S-shaped ramps are needed. In most cases this value can be left at its default setting of 1. The bow values multiplied by this factor must not exceed 467.837

· 10 9 .

0/1/2

0/1

0/1

1. . . 255

R

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 99 / 141

Number Axis Parameter Description

50 Torque mode Writing to this parameter will run the motor in torque mode. This only works in closed loop mode. Any other motion command (MST, ROL,

ROR, MVP) stops the torque mode.

108 CL gamma

Vmin

109

110

CL gamma

Vmax

CL maximum gamma

For higher velocities the influence of the back

EMF may be compensated. At this velocity the compensation will start.

For higher velocities the influence of the back

EMF may be compensated. At the start velocity

(axis parameter #108) plus this velocity the compensation will reach its maximum.

For higher velocities the influence of the back

EMF may be compensated. This is the compensation factor that will be added scaled using the current velocity (see axis parameter #108 and

#109).

111

112

113

CL beta

CL offset

Maximum commutation angle that can be used to compensate for an evaluated position deviation.

Offset for closed loop operation. Measured during closed loop initialization.

Minimum current setting in closed loop operation.

114

115

116

117

118

119

120

121

CL current minimum

CL current maximum

CL correction velocity P

CL correction velocity I

CL correction velocity I clipping

CL correction velocity DV clock

CL correction velocity DV clipping

CL upscale delay

CL downscale delay

Maximum current setting in closed loop operation.

Parameter P of the PI regulator which controls the maximum velocity during closed loop regulation.

Parameter I of PI regulator which controls the maximum velocity during closed loop regulation.

Clipping of the error sum of the integral part of the PI regulator which controls the maximum velocity during closed loop regulation.

Clock divider for D part calculation.

Limit maximum velocity deviation above the maximum velocity.

Delay when increasing motor current during closed loop operation.

Delay when decreasing motor current during closed loop operation.

Range [Units] Access

-255. . . 255 RW

0. . . 16777215

[pps]

0. . . 16777215

[pps]

0. . . 255

0. . . 511

-2147483648

. . . 2147483647

0. . . 255

0. . . 255

0. . . 1677215

RW

RW

RW

RW

RW

RW

RW

RW

0. . . 16777215 RW

0. . . 32767

0. . . 32767

0. . .

2147483647

RW

RW

RW

0. . . 16777215 RW

0. . . 16777215 RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 100 / 141

Number Axis Parameter Description

124 CL correction position P

Proportional controller P parameter for compensating a detected position deviation. Resulting P parameter is this parameter divided by

65536.

125 Tolerance range for position deviation.

126

CL max.

correction tolerance

CL start up

127 Relative positioning option

Tolerance range for position deviation. If position deviation is within the CL start up window the current will not ramp up.

Start position for MVP REL command:

0 last target position

1 actual position

2 encoder position

129

131

Closed Loop

Mode measured speed

0 - closed loop off

1 - closed loop on

2 - PID mode based on v actual

3 - PID mode based on v=0

After switching on closed loop, please wait until parameter #133 is 1 before executing any motion commands.

Speed measured using the encoder.

Range [Units] Access

0. . . 16777215 RW

0. . . 255

0. . . 255

0/1

0. . . 3

RW

RW

RW

RW

132

133

134

136

137

138 current measured speed

Closed Loop

Init Flag

Positioning window

Speed measured using the encoder, without averaging.

0 - initialization not finished yet

1 - closed loop initialization finished

Maximum deviation for target reached flag to be set.

EncMeanWait Enocder filter related

EncMeanFilter Encoder filter related

EncMeanInt Encoder filter related

-2147483648

. . . 2147483647

[pps]

-2147483648

. . . 2147483647

[pps]

0/1

R

R

R

0. . .

2147483647

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 101 / 141

Number Axis Parameter Description

140 Microstep resolution

Microstep

0 fullstep resolutions per full step:

1 halfstep

2 4 microsteps

3 8 microsteps

4 16 microsteps

5 32 microsteps

6 64 microsteps

150

151

162

163

164

Encoder input sample rate

Encoder input filter length

Chopper blank time

Constant TOff mode

Disable fast decay comperator

7 128 microsteps

8 256 microsteps

Always leave at 8 (256 microstpes) when using closed loop operation!

Sample rate for ABN encoder inputs:

0 8 MHz

1 4 MHz

2 2 MHz

3 1 MHz

4 500kHz

5 250kHz

6 125kHz

7 62.5kHz

Use a high sample rate when using high resolution encoders. For low resolution encoders use lower sample rates in order to avoid glitches.

Number of sampled input bits that must have even logic levels to provide a valid input bit.

Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. Normally leave at the default value.

Selection of the chopper mode:

0 – spread cycle

1 – classic constant off time

See parameter 163. For ”classic const. off time” setting this parameter to ”1” will disable current comparator usage for termination of fast decay cycle.

Range [Units] Access

0..8

RW

0. . . 7

0. . . 7

0..3

0/1

0/1

RW

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 102 / 141

Number Axis Parameter Description

165 Chopper hysteresis end

/ fast decay time

See parameter 163. For ”spread cycle” chopper mode this parameter will set / return the hysteresis end setting (hysteresis end value after a number of decrements). For ”classic const. off time” chopper mode this parameter will set / return the fast decay time.

166

167

Chopper hysteresis start

/ sine wave offset

Chopper off time (TOff)

See parameter 163. For ”spread cycle” chopper mode this parameter will set / return the Hysteresis start setting (please note that this value is an offset to the hysteresis end value). For

”classic const. off time” chopper mode this parameter will set / return the sine wave offset.

The off time setting controls the minimum chopper frequency. An off time within the range of 5 µ s to 20 µ s will fit.

Range [Units] Access

0. . . 15 RW

0. . . 8

0. . . 15

RW

RW

168

169

170

171

SmartEnergy current minimum

(SEIMIN)

SmartEnergy current down step

SmartEnergy hysteresis

SmartEnergy current up step

Off time setting for constant t Off chopper:

N

CLK

= 12 + 32 ∗ tOF F

(Minimum is 64 clocks)

Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel.

Sets the lower motor current limit for CoolStep operation by scaling the maximum current (see axis parameter 6) value.

Minimum motor current:

1 0 -

1 -

2

1

4 of CS of CS

Sets the number of StallGuard2 readings above the upper threshold necessary for each current decrement of the motor current. Number of

StallGuard2 measurements per decrement:

Scaling: 0. . . 3: 32, 8, 2, 1

0: slow decrement

3: fast decrement

Sets the distance between the lower and the upper threshold for StallGuard2 reading. Above the upper threshold the motor current becomes decreased. Hysteresis:

([ AP 172] + 1) ∗ 32

Upper StallGuard threshold:

([ AP 172] +

[ AP 170] + 1) ∗ 32

Sets the current increment step. The current becomes incremented for each measured Stall-

Guard2 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

0/1

0. . . 3

0. . . 15

0. . . 3

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 103 / 141

Number Axis Parameter Description

172 SmartEnergy hysteresis start

The lower threshold for the StallGuard2 value

(see SmartEnergy current up step).

Setting this to 0 (default) turns off CoolStep.

173 StallGuard2 filter enable

Enables the StallGuard2 filter for more precision of the measurement. If set, reduces the measurement frequency to one measurement per four fullsteps. In most cases it is expedient to set the filtered mode before using CoolStep.

Use the standard mode for step loss detection.

0 - standard mode

1 - filtered mode

Range [Units] Access

0..15

RW

0/1 RW

174 RW

180

181

182

184

185

StallGuard2 threshold

SmartEnergy actual current

Stop on stall

SmartEnergy threshold speed

Random TOff mode

Chopper synchronization

This signed value controls StallGuard2 threshold level for stall output and sets the optimum measurement range for readout. A lower value gives a higher sensitivity. Zero is the starting value. A higher value makes StallGuard2 less sensitive and requires more torque to indicate a stall.

This status value provides the actual motor current setting as controlled by CoolStep. The value goes up to the CS value and down to the portion of CS as specified by SEIMIN.

Actual motor current scaling factor:

0. . . 31: 1/32, 2/32, . . . 32/32

Below this speed motor will not be stopped.

Above this speed motor will stop in case Stall-

Guard2 load value reaches zero.

Above this speed CoolStep becomes enabled.

-64. .. +63

0. . . 31

0 - Chopper off time is fixed

1 - Chopper off time is random

This parameter allows synchronization of the chopper for both phases of a two phase motor in order to avoid the occurrence of a beat, especially at low velocities.

0: chopper sync function chopSync off

1. . . 15: chopper synchronization

0. . . 15

0. . .

2147483647

[pps]

0. . .

2147483647

[pps]

0/1

R

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 104 / 141

Number Axis Parameter Description

1 Search left stop switch only.

2

3

Search right stop switch, then search left stop switch.

Search right stop switch, then search left stop switch from both sides.

193 Reference search mode

4

5

6

Search left stop switch from both sides.

Search home switch in negative direction, reverse the direction when left stop switch reached.

7

8

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.

9 Search encoder index pulse in positive direction.

10 Search encoder index pulse in negative direction.

Additional functions:

• Add 128 to a mode value for inverting the home switch (can be used with mode

5. . . 8).

• Add 64 to a mode for searching the right instead of the left reference switch (can be used with mode 1. . . 4).

Range [Units] Access

1. . . 10 RW

194

195

196

197

Reference search speed

Reference switch speed

End switch distance

Last reference position

This value specifies the speed for roughly searching the reference switch.

This parameter specifies the speed for searching the switching point. It should be slower than parameter 194.

This parameter provides the distance between the end switches after executing the RFS command (with reference search mode 2 or 3).

This parameter contains the last position value before the position counter is set to zero during reference search.

0. . . 16777215

[pps]

0. . . 16777215

[pps]

-2147483648

. . .

2147483647

[

µ steps]

-2147483648

. . . 2147483647

[ µ steps]

RW

RW

R

R

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 105 / 141

Number Axis Parameter Description

198 Latched actual position

This parameter contains the actual position that has been latched by an encoder null channel event.

199

200

201

Latched encoder position

Boost current

This parameter contains the encoder position that has been latched by an encoder null channel event.

Current used for acceleration and deceleration phases. If set to 0 the same current as set by axis parameter #6 will be used. Same scaling as with axis parameter #6.

Encoder mode A combination of the following values:

Bit 0 Required channel A polarity for null channel event.

(0: low, 1: high)

Bit 1

Bit 2

Required channel B polarity for null channel event.

(0: low, 1: high)

Null channel polarity.

(0:low, 1: high)

202

206

207

Motor full step resolution

Actual load value

Extended error flags

Range [Units]

-2147483648

. . . 2147483647

[

µ steps]

-2147483648

. . . 2147483647

[

µ steps]

0. . . 255

0. . . 511

Bit 3

Bit 4

Bit 5

Ignore channel A and B polarity for null channel event.

Clear/latch at every null channel event.

Clear/latch only at next null channel event.

Bit 8

Bit 9

0: Only latch positions on null event.

1: Also clear encoder counter on null event.

Latch encoder on null event.

Bit 10 Latch actual position on null event.

Full step resolution of the motor (Default: 200). 0. . . 65535

[ f ullsteps round

]

Readout of the actual load value used for stall detection (StallGuard2).

0. . . 1023

A combination of the following values:

1 StallGuard error

2 deviation error

These error flags are cleared automatically when this parameter has been read out or when a motion command has been executed.

0. . . 3

Access

R

R

RW

RW

RW

R

R

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 106 / 141

Number Axis Parameter Description

208 Motor driver error flags

A combination of the following values:

Bit 0 StallGuard2 status

(1: stall detected)

Bit 1 Overtemperature

(1: driver is shut down due to overtemperature)

Bit 2 Overtemperature pre-warning

(1: temperature threshold is exceeded)

Bit 3 Short to ground A

(1: short condition detected, driver currently shut down)

Bit 4 Short to ground B

(1: short condition detected, driver currently shut down)

Bit 5 Open load A

(1: no chopper event has happened during the last period with constant coil polarity)

Bit 6 Open load B

(1: no chopper event has happened during the last period with constant coil polarity)

Bit 7 Stand still

(1: no step pulse occurred during the last

65.536ms.

0: speed ≥ 16pps)

The bit flickers when the speed is between

1pps and 15pps.

209 Encoder position

Encoder counter value.

210

212

213

214

251

Encoder resolution

Maximum encoder deviation

Maximum velocity deviation

Power down delay

Reverse shaft

Range [Units]

0. . . 255

Access

R

Encoder counts per round. Setting this to a negative value reverses the encoder counting direction.

When the actual position (parameter 1) and the encoder position (parameter 209) differ more than set here the motor will be stopped. This function is switched off when the maximum deviation is set to zero.

The motor will be stopped when the desired speed and the real speed differ more than this value. Setting the value to 0 turns off this function.

Standstill period before the current will be ramped down to standby current. The standard value is 200 (which means 2000ms).

Reverse the rotation direction of the motor shaft. Please note that this will not reverse the encoder counting direction. Use axis parameter

#210 to reverse the enocder counting direction.

-2147483648

. . . 2147483647

[

µ steps]

-65535

. . . 65535

0. . .

2147483647

[encoder steps]

0. . .

2147483647

[encoder steps]

0. . . 65535

[10ms]

0/1

RW

RW

RW

RW

RW

RW

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 107 / 141

Number Axis Parameter Description

253 Step/Direction gear ratio

Electronic gearing factor for step/direction mode. The module will leave out the number of step pulses specified here until the next step will be taken. The 8 most significant bits specify the integer part and the lower 24 bits specify the fractional part of the gear ratio.

254 Step/Direction mode

Selects ramp generator mode (default) or step/direction mode.

0 Ramp generator (normal) mode

1 Step/Direction mode, step signal high active

2 Step/Direction mode, step signal low active

3 Step/Direction mode, use both edges (double speed)

Add 4 to the mode number for inverting the direction signal.

Add 8 to the mode number for indirect step/direction mode, using the built-in ramp generator in between.

Range [Units] Access

0 . . .

2 31 RW

0. . . 15 RW

Table 16: All Axis Parameters of the TMCM-1111 StepRocker Module

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 108 / 141

5 Global Parameters

The following sections describe all global parameters that can be used with the SGP, GGP, AGP, STGP and

RSGP commands. Global parameters are grouped into banks:

• Bank 0: Global configuration of the module.

• Bank 1: Not used.

• Bank 2: TMCL user variables.

• Bank 3: TMCL interrupt configuration.

5.1 Bank 0

Parameters with numbers from 64 on configure all settings that affect the overall behaviour of a module.

These are things like the serial address, the RS485 baud rate or the CAN bit rate (where appropriate).

Change these parameters to meet your needs. The best and easiest way to do this is to use the appropriate functions of the TMCL-IDE. The parameters with numbers between 64 and 128 are automatically stored in the EEPROM.

Note

• An SGP command on such a parameter will always store it permanently and no extra STGP command is needed.

• Take care when changing these parameters, and use the appropriate functions of the TMCL-IDE to do it in an interactive way.

• Some configurations of the interface (for example baud rates that are not supported by the PC) may leed to the fact that the module cannot be reached any more. In such a case please see the TMCM-1111 StepRocker

Hardware Manual on how to reset all parameters to factory default settings.

• Some settings (especially interface bit rate settings) do not take effect immediately. For those settings, power cycle the module after changing them to make the changes take effect.

There are different parameter access types, like read only or read/write. Table

17

shows the different parameter access types used in the global parameter tables.

E

A

Meaning of the Letters in the Access Column

Access type Command Description

R

W

GGP

SGP, AGP

Parameter readable

Parameter writable

STGP, RSGP Parameter can be stored in the EEPROM

SGP Automatically stored in the EEPROM

Table 17: Meaning of the Letters in the Access Column

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 109 / 141

All Global Parameters of the TMCM-1111 StepRocker Module in Bank 0

Number Global Parameter Description Range [Units]

0 9600

1 14400

Default

65 RS485 baud rate

2 19200

3 28800

4 38400

5 57600

0. . . 8

66

68

69

Serial address

Serial heartbeat

CAN bit rate

6 76800

7 115200

8 230400

Module (target) address for RS485.

Serial heartbeat for RS485 interface and

USB interface. If this time limit is up and no further command is received by the module the motor will be stopped. Setting this parameter to 0 (default) turns off the serial heartbeat function.

2 20kBit/s

3 50kBit/s

4 100kBit/s

5 125kBit/s

1. . . 255

0. . . 65535

2. . . 8

70

71

75

76

CAN reply ID

CAN ID

Telegram pause time

Serial host address

6 250kBit/s

7 500kBit/s

8 1000kBit/s (Default)

The CAN ID for replies from the board (default: 2).

The module (target) address for CAN (default: 1).

Pause time before the reply via RS485 is sent. For use with older RS485 interfaces it is often necessary to set this parameter to

15 or more (e.g. RS485 adapters controlled by the RTS pin). For CAN interface this parameter has no effect!

Host address used in the reply telegrams sent back via RS485.

0. . . 2047

0. . . 2047

0. . . 255 [ms]

0. . . 255

Access

RWA

RWA

RWA

RWA

RWA

RWA

RWA

RWA

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 110 / 141

Number Global Parameter Description

77 Auto start mode 0 - Do not start TMCL application after power up (default).

1 - Start TMCL application automatically after power up.

78 I/O mode Bit vector that selects input or output mode for each general purpose input/output. A bit that is clear selects input mode and a bit that is set selects output mode. Add up the values of the bits that are to be set.

Bit Value Input/Output

2

3

0

1

1

2

4

8

PWMU0

PWMU1

PWMU2

PWMD0

81

82

83

84

85

TMCL code protection

CAN heartbeat

CAN secondary address

Coordinate storage

Do not restore user variables

4

5

16

32

PWMD1

PWMD2

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

When switching off the protection against disassembling (changing this parameter from 1 or 3 to 0 or 2, the program will be erased first!

Heartbeat for CAN interface. If this time limit is up and no further command is received the motor will be stopped. Setting this parameter to 0 (default) turns off the

CAN heartbeat function.

Second CAN ID for the module. Switched off when set to zero. See section

7.9

.

0 - coordinates are stored in RAM only (but can be copied explicitly between RAM and

EEPROM)

1 - coordinates are always also stored in the

EEPROM and restored on startup

Determines if TMCL user variables are to be restored from the EEPROM automatically on startup.

0 - user variables are restored (default)

1 - user variables are not restored

Range [Units]

0/1

0. . . 63

0/1/2/3

0. . . 65535

0. . . 2047

0/1

0/1

Access

RWA

RWA

RWA

RWA

RWA

RWA

RWA

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 111 / 141

Number Global Parameter Description

87 Serial secondary address

Second module (target) address for RS485.

Setting this parameter to 0 switches off the seconndary address. See section

7.8

.

128

129

TMCL application status

Download mode

0 - stop

1 - run

2 - step

3 - reset

0 - normal mode

1 - download mode

130

132

TMCL program counter

TMCL tick timer

133

255

Random number

Suppress reply

Contains the address of the currently executed TMCL command.

A 32 bit counter that gets incremented by one every millisecond. It can also be reset to any start value.

Returns a random number. The seed value can be set by writing to this parameter.

The reply in direct mode will be suppressed when this parameter is set to 1. This parameter cannot be stored to EEPROM and will be reset to 0 on startup. The reply will not be suppressed for GAP, GGP and GIO commands.

Range [Units]

0. . . 255

0. . . 3

0/1

0/1

Access

RWA

R

R

R

0. . . 2147483647 RW

0. . . 2147483647 RW

RW

Table 18: All Global Parameters of the TMCM-1111 StepRocker Module in Bank 0

5.2 Bank 1

The global parameter bank 1 is normally not available. It may be used for customer specific extensions of the firmware. Together with user definable commands these variables form the interface between extensions of the firmware (written by Trinamic in C) and TMCL applications.

5.3 Bank 2

Bank 2 contains general purpose 32 bit variables for use in TMCL applications. They are located in RAM and the first 56 variables can also be stored permanently in the EEPROM. After booting, their values are automatically restored to the RAM. Up to 256 user variables are available. Please see table

17

for an explanation of the different parameter access types.

56... 255 user variables

#56. . . #255

User Variables in Bank 2

Number Global Parameter Description

0.. . 55 user

#0.. . #55 variables TMCL user variables

TMCL user variables

Table 19: User Variables in Bank 2

Range [Units]

-2147483648 .. .

2147483647

-2147483648 .. .

2147483647

Access

RWE

RWE

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 112 / 141

5.4 Bank 3

Bank 3 contains interrupt parameters. Some interrupts need configuration (e.g. the timer interval of a timer interrupt). This can be 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.

Table

20

shows all interrupt parameters that can be set. Please see table

17

for an explanation of the parameter access types.

Interrupt Parameters in Bank 3

Number Global Parameter Description

0 Time between two interrupts

1

2

Timer 0 period

(ms)

Timer 1 period

(ms)

Timer 2 period

(ms)

Time between two interrupts

Time between two interrupts

27 0=off, 1=low-high, 2=high-low, 3=both

28

39

40

Stop left 0 trigger transition

Stop right 0 trigger transition

Input 0 trigger transition

Input 1 trigger transition

0=off, 1=low-high, 2=high-low, 3=both

0=off, 1=low-high, 2=high-low, 3=both

0=off, 1=low-high, 2=high-low, 3=both

41

42

43

44

Input 2 trigger transition

Input 3 trigger transition

Input 4 trigger transition

Input 5 trigger transition

0=off, 1=low-high, 2=high-low, 3=both

0=off, 1=low-high, 2=high-low, 3=both

0=off, 1=low-high, 2=high-low, 3=both

0=off, 1=low-high, 2=high-low, 3=both

Range [Units]

0. . . 4294967295

[ms]

0. . . 4294967295

[ms]

0. . . 4294967295

[ms]

0. . . 3

Access

RW

RW

RW

RW

0. . . 3

0. . . 3

0. . . 3

0. . . 3

0. . . 3

0. . . 3

0. . . 3

RW

RW

RW

RW

RW

RW

RW

Table 20: Interrupt Parameters in Bank 3

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 113 / 141

6 Module Specific Hints

This section contains some hints that are specific to the TMCM-1111 StepRocker module.

6.1 General Purpose Inputs and Outputs

The TMCM-1111 StepRocker module is equipped with six general purpose digital lines. Each of these can either be used as an input or as an output. This can be selected using global parameter #78. For historical reasons (compatibility with the first TMCM-1110 StepRocker module), these inputs and outputs are named PWMU0, PWMU1, PWMU2, PWMD0, PWMD1 and PWMD2.

Global parameter #78 is a bit vector where each bit determines if the corresponding digital line is an input or an output. A bit that is clear means input, and a bit that is set means output.

Table

21

shows the relationship between the bits of global parameter #78 and the digital lines. Just add up the values of all bits that are to be set (i.e. of those digital lines that are to be used as outputs) and set global parameter #78 to this value.

4

5

2

3

0

1

Selection of Inputs and Outputs

Bit Value Digital I/O line

1

2

PWMU0

PWMU1

4

8

16

32

PWMU2

PWMD0

PWMD1

PWMD2

Table 21: Selection of Inputs and Outputs

For example, setting global parameter #78 to 7 (default value) programs PWMU0, PWMU1 and PWMU2 as outputs and PWMD0, PWMD1 and PWMD2 as inputs.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 114 / 141

7 Hints and Tips

This chapter gives some hints and tips on using the functionality of TMCL, for example how to use and parameterize the built-in reference search algorithm. You will also find basic information about Stall-

Guard2™ and CoolStep™ in this chapter.

7.1 Reference Search

The built-in reference search features switching point calibration and support for a home switch and/or one or two end switches. The internal operation is based on a state machine that can be started, stopped and monitored (instruction RFS, opcode 13). The settings of the automatic stop functions corresponding to the end switches (axis parameters 12 and 13) do not influence the reference search.

Notes:

• Until the reference switch is found for the first time, the searching speed set by axis parameter 194 is used.

• After hitting the reference switch, the motor slowly moves until the switch is released. Finally the switch is re-entered in the other direction, setting the reference point to the center of the two switching points. The speed used for this calibration is defined by axis parameter 195.

Axis parameter 193 defines the reference search mode to be used. Choose one of the reference search modes shown in table

22

and in the following subsections:

4

5

Reference Search Modes

Value Description

1 search left stop switch only

2

3 search right stop switch, then search left stop switch search right stop switch, then search left stop switch from both sides search left stop switch from both sides

6 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

7

8

9

10 search home switch in negative direction, ignore end switches search home switch in positive direction, ignore end switches search encoder null channel in positive direction search encoder null channel in negative direction

Table 22: Reference Search Modes

The drawings in the following subsections show how each reference search mode works. A linear stage with two end points and a moving slider is used as example.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 115 / 141

7.1.1 Mode 1

Reference search mode 1 only searches the left end switch. Select this mode by setting axis parameter

#193 to 1. Figure

3

illustrates this.

Add 64 to the mode number (i.e. set axis parameter #193 to 65) to search the right end switch instead of the left end switch.

L R start stop left limit / end / stop switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 3: Reference Search Mode 1

7.1.2 Mode 2

Reference search mode 2 first searches the right end switch and then the left end switch. The left end switch is then used as the zero point. Figure

4

illustrates this. Select this mode by setting axis parameter

#193 to 2. After the reference search has finished, axis parameter #196 contains the distance between the two reference switches in microsteps.

Add 64 to the mode number (i.e. set axis parameter #193 to 66) to search the left end switch first and then use the right end switch as the zero point.

L R start stop left limit / end / stop switch right limit / end / stop switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 4: Reference Search Mode 2

7.1.3 Mode 3

Reference search mode 3 first searches the right end switch and then the left end switch. The left end switch is then searched from both sides, to find the middle of the left end switch. This is then used as the zero point. Figure

5

illustrates this. Select this mode by setting axis parameter #193 to 3. After the reference search has finished, axis parameter #196 contains the distance between the right end switch and the middle of the left end switch in microsteps.

Add 64 to the mode number (i.e. set axis parameter #193 to 67) to search the left end switch first and then use the middle of the right end switch as the zero point.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 116 / 141

L R start stop left limit / end / stop switch right limit / end / stop switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 5: Reference Search Mode 3

7.1.4 Mode 4

Reference search mode 4 searches the left end switch only, but from both sides so that the middle of the switch will be found and used as the zero point. This is shown in figure

6 .

Add 64 to the mode number (i.e. set axis parameter #193 to 68) to search the right end switch instead.

L R stop left limit / end / stop switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195) start

Figure 6: Reference Search Mode 4

7.1.5 Mode 5

Reference search mode 5 searches the home switch in negative direction. The search direction will be reversed if the left limit switch is reached. This is shown in figure

7 .

Add 128 to the mode number (i.e. set axis parameter #193 to 133) to reverse the polarity of the home switch input.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 117 / 141

Home

L R start stop left limit / end / stop switch home switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 7: Reference Search Mode 5

7.1.6 Mode 6

Reference search mode 6 searches the home switch in positive direction. The search direction will be reversed if the right limit switch is reached. This is shown in figure

8 .

Add 128 to the mode number (i.e. set axis parameter #193 to 134) to reverse the polarity of the home switch input.

L R start stop right limit / end / stop switch home switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 8: Reference Search Mode 6

7.1.7 Mode 7

Reference search mode 7 searches the home switch in negative direction, ignoring the limit switch inputs.

It is recommended mainly for use with a circular axis. The exact middle of the switch will be found and used as the zero point. Figure

9

illustrates this.

Add 128 to the mode number (i.e. set axis parameter #193 to 135) to reverse the polarity of the home switch input.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 118 / 141

L R start stop home switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 9: Reference Search Mode 7

7.1.8 Mode 8

Reference search mode 8 searches the home switch in positive direction, ignoring the limit switch inputs.

It is recommended mainly for use with a circular axis. The exact middle of the switch will be found and used as the zero point. Figure

10

illustrates this.

Add 128 to the mode number (i.e. set axis parameter #193 to 136) to reverse the polarity of the home switch input.

L R start stop home switch

: reference search speed (axis parameter 194)

: reference switch speed (axis parameter 195)

Figure 10: Reference Search Mode 8

7.1.9 Mode 9

Reference search mode 9 searches the null channel (also called index pulse) of an encoder in positive direction. The encoder resolution and the encoder null channel polarity have to be set correctly as otherwise this reference search method cannot work.

start stop

Index pulse

:reference search speed (axis parameter 194)

:reference switch speed (axis parameter 195)

Figure 11: Reference Search Mode 9

7.1.10 Mode 10

Reference search mode 10 searches the null channel (also called index pulse) of an encoder in negative direction. The encoder resolution and the encoder null channel polarity have to be set correctly as otherwise this reference search method cannot work.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 119 / 141 start stop

Index pulse

:reference search speed (axis parameter 194)

:reference switch speed (axis parameter 195)

Figure 12: Reference Search Mode 10

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 120 / 141

7.2 Using Encoders

With the TMCM-1111 StepRocker it is also possible to use encoders. The TMCM-1111 StepRocker can work as an open-loop system as well as a true servo-like closed-loop system. In open-loop mode encoders can be used just to check if the motor really reaches its target positions and thus can follow the magnetic field and the position counter. In closed-loop mode the encoder is used for position feed back with regulation of the position, so that it will work like a servo. In PID mode, the motor will still be run in open loop mode, but the encoder is used for position regulation only. This is useful for example with a linear drive that is equipped with a linear encoder. Because of the gearing between motor shaft and encoder caused by such a system, closed loop mode cannot be used in this case, but PID position regulation will still work.

Consider the following things for using encoders with the TMCM-1111 StepRocker:

• Set the motor full step resolution using parameter #202 (for 1.8° motors this is 200 which is also the default value of this parameter).

• Set the encoder resolution (as encoder counts per round) using axis parameter #210.

• When parameters #202 and #210 are set to the right values the module will automatically convert the encoder resolution to the motor microstep resolution so that the encoder postion is the same as the motor position.

• The encoder position can be read using axis parameter #209. This parameter is also writable, e.g.

for setting a new origin. After a reference search this parameter is also automatically set to 0.

• We recommend executing the reference search in open-loop mode and switch to closed-loop mode after the reference search has finished successfully.

• The motor can also be stopped automatically when it cannot follow anymore (due to overload or obstruction). Axis parameter #212 controls this function.

8

6

4

2

7.3 Closed-Loop Operation

Together with an external ABN encoder it is possible to operate each axis of the TMCM-1111 StepRocker as a closed-loop stepper system. Before enabling this feature, some parameters have to be set. The following example TMCL program shows how to do this.

// Closed loop operation with 10000 cpr optical encoder and 1.8 degree Motor

// General Settings :

SAP 6, 0, 85

SAP 7, 0, 10

// set current to 1A ( RMS )

// set standby current

// Encoder Resolution Setting :

SAP 210 , 0, 10000 // 10000 counts per round

10

12

// Closed Loop Field Weakening Settings

SAP 108 , 0, 300000 // gamma Vmin

SAP 109 , 0, 1600000 // gamma Vmax

SAP 110 , 0, 255 // set CL maximum gamma

14

16

18

20

// Closed Loop Current Setting :

SAP 111 , 0, 255

SAP 113 , 0, 50

SAP 114 , 0, 255

SAP 126 , 0, 255

SAP 125 , 0, 255

// set CL beta ( default 255) => 90 degrees

// set CL current minimum

// set CL current maximum

// Start of Current Increase in CL Mode [0..255]

// set max . correction tolerance

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 121 / 141

22

24

26

28

30

32

SAP 134 , 0, 100

SAP 120 , 0, 1000 // set CL upscale delay

SAP 121 , 0, 10000 // set CL downscale delay

SAP 115 , 0, 3000

SAP 116 , 0, 20

SAP 117 , 0, 2000

SAP 118 , 0, 0

// set CL correction velocity P

// set CL correction velocity I

// set CL correction velocity I clipping

// set CL correction velocity DV clock

SAP 119 , 0, 100000 // set CL correction velocity DV clipping

SAP 124 , 0, 65536 // set correction position P ( default 65536)

SAP 212 , 0, 1000 // Max . position deviation .

SAP 213 , 0, 30000 // Pos_ERROR output . Max . velocity deviation .

// Turn on closed - loop

34

SAP 129 , 0, 1

36

38

WaitInit :

GAP 133 , 0

JC ZE , WaitInit

// Wait until CL - Init finished

40

42

44

// Acceleration , Velocity Settings :

SAP 4, 0, 600000 // set positioning velocity

SAP 5, 0, 800000 // set acceleration

SAP 17, 0, 800000 // set deceleration

STOP // end of the program

Note For closed loop mode to work, the encoder has to be mounted directly onto the motor shaft, without any gearing in between. The reason for this is that the encoder is also used for commutating the motor. If the encoder is not mounted directly to the motor shaft, closed loop mode cannot be used. Use the

PID

mode instead.

7.3.1 Closed-Loop Parameters

The closed-loop operation of the TMCM-1111 StepRocker is based on Trinamic’s closed-loop hardware motion controller IC TMC4361.

The 2-phase closed-loop control of the TMCM-1111 StepRocker follows a different approach than PID control cascades to consider stepper motor driver characteristics. The ramp generator which assigns target and velocity is independent of the position control (commutation angle control) which is also independent of the current control. The closed-loop control scheme is depicted in the following picture.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 122 / 141

Flags /

Status

Ramp

Parameters

Ramp Generator

Position

Control

Velocity

Control

Control

Parameters

Load

Angle

Control

Field

Weakening

Current

Level

Control

Driver

Stage

Motor velocity / position / electrical angle velocity / position

Figure 13: Closed-Loop Control Scheme

Load angle control and current level control will be executed in parallel.

ABN Encoder

7.3.2 Load Angle Control

As typical for stepper motor drivers, phase currents will be assigned directly to he motor drivers. This results in a current vector which should be followed by the rotor.The rotor position will be directly sampled by encoder feedback. The closed-loop motor control monitors the resulting load angle (deviation between driver stage current vector and encoder angle). Further on, the direction of the current vector will track the rotor position if the load angle should impend to exceed a certain limit. The result is a load angle which will be never exceed the given limit and as a result no step loss will occur. Thus, the current vector will follow an overpowered load until the load is reduced.

Figure

14

shows the parameters which limit the load angle.

Current Vector [µSteps](Driver Stage)

X_TARGET + 255

-383(-135°) -255(-90°)

X_TARGET + 128

SAP 111

-128(-45°)

X_TARGET - 128

X_TARGET

SAP 111

128(45°) 255(90°) 383(135°)

Load Angle [µSteps](Deviation Current Vector and Encoder)

X_TARGET - 255

Figure 14: Load Angle Control Parameter

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 123 / 141

7.3.3 Current Level Control

Parallel to the load angle control the TMCM-1111 StepRocker controls the motor current level (current vector amplitude) depending on the load angle to save energy during no or light load. Figure

15

gives an overview of the current control parameters.

Current Value [0..255]

SAP 134

255

SAP 134

128

SAP 114

SAP 113

-383(-135°) -255(-90°) -128(-45°)

SAP 126 SAP 126

128(45°) 255(90°) 383(135°)

Load Angle [µSteps](Deviation Current Vector and Encoder)

SAP 111 SAP 111

Figure 15: Current Level Control

• SAP 111: Closed Loop Beta

• SAP 126: Closed Loop Start Up

• SAP 113: Minimum Closed Loop Current Scaler

• SAP 114: Maximum Closed Loop Current Scaler

• SAP 134: Positioning Window for Target Reached Flag

Axis parameters #120 and #121 set up the delay which defines how fast the actual current will be increased or decreased and will follow the red marked graph.

7.3.4 Field Weakening

With every stepper motor the TMCM-1111 StepRocker will reach a velocity where it is not possible to maintain the target motor current due to the motor back EMF. Above this velocity load angle (SAP 111, default

90°) and current level control will reach their maximum. To drive the stepper motor faster the back EMF must be compensated by commutating the stepper motor with a commutation angle between 90° and

180°. The parameters for field weakening are described in figure

16 .

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 124 / 141

Normal Closed Loop

Field Weakening Load Angle [µSteps] max. 180°

SAP 111max. 90°

SAP 110

Motor Velocity [pps]

SAP 108 SAP 109

Figure 16: Field Weakening

• SAP 111: Closed Loop Beta

• SAP 110: Closed Loop Gamma

• SAP 108: Gamma Vmin

• SAP 109: Gamma Vmax

7.3.5 Position Catch up

The TMCM-1111 StepRocker includes a special feature for closed-loop positioning. Positioning parameters like velocity and acceleration will be calculated to reach a position in a dedicated time. If the target trapezoidal ramp cannot be maintained due to high load peaks the TMCM-1111 StepRocker includes a special position catch-up mode to ensure that the position will still be reached in time if possible.

Motor Velocity [pps]

PID control parameters for catch-up

SAP 115, 116, 117, 118

Overload

Catch-up

SAP 119

SAP 119

Position

Figure 17: Position Catch up

7.4 PID Operation

Together with an external ABN encoder it is possible to operate each axis of the TMCM-1111 StepRocker using PID position regulation. In contrast to closed loop mode, the encoder is only used for regulating the

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 125 / 141 position, but not for commutating the motor. This also works when the encoder is not directly mounted to the motor shaft, i.e. with gearing between motor and encoder.

7.4.1 PID Parameters

When using PID mode, axis parameters #115. . .#119, #124 and #125 are used for setting the PID regulation parameters.

• Axis parameter #115 defines the P part of the PID regulator.

• Axis parameter #116 defines the I part of the PID regulator.

• Axis parameter #117 defines the clipping value for the I part.

• Axis parameter #118 sets the clock divider for D part calculation.

• Axis parameter #119 defines the clipping value for the D part.

• Axis parameter #124 defines the D part of the PID regulator.

• Axis parameter #125 defines the maximum tolerated position deviation. There will be no correction as long as the position deviation is within this window.

7.4.2 PID Modes

There are two PID modes, which can be activated using axis parameter #129:

• PID mode based on v actual

: In this mode, the output value of the PID regulator will be added to the actual velocity given by the ramp generator. In most cases, this mode is used. Activate this PID mode by setting axis parameter #129 to 2.

• PID mode based on v=0: In this mode, the output value of the PID regulator will be directly used as velocity value. This mode can be activated by setting axis parameter #129 to 3.

11

13

15

17

19

3

5

7.4.3 PID Example

1

The following TMCL program shows how to activate the PID mode.

// PID operation with 10000 cpr optical encoder and 1.8 degree Motor

// General Settings :

SAP 6, 0, 85

SAP 7, 0, 10

// set current to 1A ( RMS )

// set standby current

9

7

// Encoder Resolution Setting :

SAP 210 , 0, 10000 // 10000 counts per round

// PID parameters

SAP 115 , 0, 8000

SAP 116 , 0, 500

SAP 117 , 0, 400

SAP 118 , 0, 2

SAP 119 , 0, 400000

SAP 124 , 0, 10000

SAP 125 , 0, 3

SAP 129 , 0, 2

// PID : P parameter

// PID : I parameter

// PID : I clipping

// PID : Clock divider for D part calculation

// PID : D part clipping value

// PID : D parameter

// PID : Tolerated position deviation

// activate PID mode ( based on actual velocity )

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 126 / 141

21

23

25

// Acceleration , Velocity Settings :

SAP 4, 0, 600000 // set positioning velocity

SAP 5, 0, 800000 // set acceleration

SAP 17, 0, 800000 // set deceleration

STOP // end of the program

7.5 StallGuard2

The module is equipped with motor driver chips that feature load measurement. This load measurement can be used for stall detection. StallGuard2 delivers a sensorless load measurement of the motor as well as a stall detection signal. The measured value changes linear with the load on the motor in a wide range of load, velocity and current settings. At maximum motor load the StallGuard value goes to zero. This corresponds to a load angle of 90° between the magnetic field of the stator and magnets in the rotor.

This also is the most energy efficient point of operation for the motor.

Stall detection means that the motor will be stopped automatically when the load gets too high. This function is configured mainly using axis parameters #174 and #181.

Stall detection can for example be used for finding the reference point without the need for reference switches. A short routine written in TMCL is needed to use StallGuard for reference searching.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 127 / 141

7.6 CoolStep

This section gives an overview of the CoolStep related parameters. Please bear in mind that the figure only shows one example for a drive. There are parameters which concern the configuration of the current.

Other parameters are there for velocity regulation and for time adjustment.

Figure

18

shows all the adjustment points for CoolStep. It is necessary to identify and configure the thresholds for current (I6, I7 and I183) and velocity (V182). Furthermore the StallGuard2 feature has to be adjusted (SG170). It can also be enabled if needed (SG181).

The reduction or increasing of the current in the CoolStep area (depending on the load) has to be configured using parameters I169 and I171.

In this chapter only basic axis parameters are mentioned which concern CoolStep and StallGuard2. The complete list of axis parameters in chapter

4

contains further parameters which offer more configuration options.

Velocity

SG

SG

V

170

181

182

I 6

I 183

I 6 /2*

Current

I 7

I 183

I 7 coolStep™ area

I 6

I

The current depends on the load of the motor.

183

T 214

I 7

Time area without coolStep™

I 123 Current and parameter

V 123 Velocity and parameter

T 123 Time parameter

SG 123 stallGuard2™ parameter

* The lower threshold of the coolStep™ current can be adjusted up to I6 /4. Refer to parameter 168.

Figure 18: CoolStep Adjustment Points and Thresholds

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 128 / 141

CoolStep Adjustment Points and Thresholds

Number Axis Parameter Description

I6 Absolute maximum current 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 32 steps (0. . . 255 divided by eight; e.g. step 0 = 0.. .7, step 1 = 8. . . 15 and so on).

Too high values may cause motor damage!

I7

I168

I169

I171

SG170

SG181

V182

T214

Standby current The current limit two seconds after the motor has stopped.

smartEnergy current minimum Sets the lower motor current limit for Cool-

Step operation by scaling the CS (Current

Scale, see axis parameter 6) value.

Minimum motor current:

0 - 1/2 of CS

1 - 1/4 of CS smartEnergy current down step Sets the number of StallGuard2 readings above the upper threshold necessary for each current decrement of the motor current.

Number of StallGuard2 measurements per decrement:

Scaling: 0. . . 3: 32, 8, 2, 1

0: slow decrement

3: fast decrement smartEnergy current 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 smartEnergy hysteresis

Stop on stall

Sets the distance between the lower and the upper threshold for StallGuard2 reading. Above the upper threshold the motor current becomes decreased.

Below this speed motor will not be stopped.

Above this speed motor will stop in case

StallGuard2 load value reaches zero.

smartEnergy threshold speed

Power down delay

Above this speed CoolStep becomes enabled.

Standstill period before the current is changed down to standby current. The standard value is 200 (which means

2000msec).

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 129 / 141

Number Axis Parameter Description

Table 23: CoolStep Adjustment Points and Thresholds

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 130 / 141

7.7 Velocity and Acceleration Calculation

When the unit mode (axis parameter #255) is set to 1 (which is also the default value), all velocity parameters on the TMCM-1111 StepRocker are given in microsteps per second (also called pulse per second or pps). Acceleration and deceleration units are given in pps 2 .

When axis parameter #255 is set to 0 the internal units of the ramp generators are directly used. But this is only necessary in very special cases. Normally one should leave axis parameter #255 at 1 and use the pps units.

In order to convert between pps units and units like rounds per second (rps) or rounds per minute (rpm), one has to know the fullstep resolution of the motor (full steps per round) and the microstep resolution setting of the module (axis parameter #140, default setting is 256 microsteps per full step).

So to convert from pps to rps, use the following formula: v rps

= v pps r f ullstep

· r microstep

To convert from rps to rpm, use: v rpm

= v rps

· 60

With the following symbols:

• v rps

: velocity in rounds per second

• v rpm

: velocity in rounds per minute

• v pps

: velocity in pulses (microsteps) per second

• r f ullstep

: fullstep resolution of the motor (with most motors 200 (1.8°))

• r microstep

: microstep setting of the module (default 256)

So, with a 200 fullsteps motor and a microstep setting of 256 (axis parameter #140 = 8), a velocity of

51200pps will result in 1rps (60rpm).

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 131 / 141

7.8 Secondary Serial Address

Using the secondary serial address (global parameter #87) is an easy to use method to synchonize multiple

TMCL modules controlled by one RS485 master. To use this method, set the secondary serial address of all modules connected to the bus to the same value (but not to 0 or to the value used for global parameter

#66). All the serial addresses (global parameter #66) must be set to different values. Each command sent using the secondary address will then be executed by all modules at the same time, and there will be no bus contention as no replies are being sent. Using the normal serial address each module can still be addressed separately and will also still send back a reply.

7.9 Secondary CAN Address

Using the secondary CAN address (global parameter #83) is an easy to use method to synchonize multiple

TMCL modules controlled by one CAN master. To use this method, set the secondary CAN address of all modules connected to the bus to the same value (but not to 0 or to the value used for global parameter

#71). All the serial addresses (global parameter #71) must be set to different values. Each command sent using the secondary address will then be executed by all modules at the same time, and there will be no bus contention as no replies are being sent. Using the normal CAN address each module can still be addressed separately and will also still send back a reply.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 132 / 141

8 TMCL Programming Techniques and Structure

8.1 Initialization

The first task in a TMCL program (like in other programs also) is to initialize all parameters where different values than the default values are necessary. For this purpose, SAP and SGP commands are used.

8.2 Main Loop

Embedded systems normally use a main loop that runs infinitely. This is also the case in a TMCL application that is running stand alone. Normally the auto start mode of the module should be turned on.

After power up, the module then starts the TMCL program, which first does all necessary initializations and then enters the main loop, which does all necessary tasks end never ends (only when the module is powered off or reset).

There are exceptions to this, e.g. when TMCL routines are called from a host in direct mode.

6

8

10

4

2

So most (but not all) stand alone TMCL programs look like this:

// Initialization

SAP 4, 0, 50000 // define maximum positioning speed

SAP 5, 0, 10000 // define maximum 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

8.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

11

// 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

13

15

MainLoop :

MVP ABS , Motor0 , Position1

WAIT POS , Motor0 , 0

MVP ABS , Motor0 , Position0

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 133 / 141

17

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.

8.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).

1

3

Please see the following example:

MyVariable = 42

// Use a symbolic name for the user variable

//( This makes the program better readable and understandable .)

5

7

9

11

SGP MyVariable , 2, 1234

...

...

GGP MyVariable , 2

CALC MUL , 2

AGP MyVariable , 2

...

...

// Initialize the variable with the value 1234

// Copy contents of variable to accumulator register

// Multiply accumulator register with two

// 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.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 134 / 141

8.5 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.

8.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).

2

4

Example:

// Jump commands to the TMCL routines

Func1 : JA Func1Start

Func2 : JA Func2Start

Func3 : JA Func3Start

6

8

10

12

14

16

Func2Start :

ROL 0, 500

WAIT TICKS , 0, 100

MST 0

STOP

18

Func1Start :

MVP ABS , 0, 1000

WAIT POS , 0, 0

MVP ABS , 0, 0

WAIT POS , 0, 0

STOP

20

22

Func3Start :

ROR 0, 1000

WAIT TICKS , 0, 700

MST 0

STOP

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 135 / 141

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.

8.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"’.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 136 / 141

9 Figures Index

1 StallGuard2 Load Measurement as a

Function of Load

. . . . . . . . . . . .

2 Energy Efficiency Example with Cool-

Step

. . . . . . . . . . . . . . . . . . . .

6

6

3 Reference Search Mode 1

. . . . . . . 115

4 Reference Search Mode 2

. . . . . . . 115

5 Reference Search Mode 3

. . . . . . . 116

6 Reference Search Mode 4

. . . . . . . 116

7 Reference Search Mode 5

. . . . . . . 117

8 Reference Search Mode 6

. . . . . . . 117

9 Reference Search Mode 7

. . . . . . . 118

10 Reference Search Mode 8

. . . . . . . 118

11 Reference Search Mode 9

. . . . . . . 118

12 Reference Search Mode 10

. . . . . . 119

13 Closed-Loop Control Scheme

. . . . . 122

14 Load Angle Control Parameter

. . . . 122

15 Current Level Control

. . . . . . . . . . 123

16 Field Weakening

. . . . . . . . . . . . . 124

17 Position Catch up

. . . . . . . . . . . . 124

18 CoolStep Adjustment Points and

Thresholds

. . . . . . . . . . . . . . . . 127

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 137 / 141

10 Tables Index

1 Most important Axis Parameters

. . .

8

2 TMCL Command Format

. . . . . . . .

11

3 TMCL Reply Format

. . . . . . . . . . .

12

4 TMCL Status Codes

. . . . . . . . . . .

12

5 Overview of all TMCL Commands

. . .

16

6 Motion Commands

. . . . . . . . . . .

16

7 Parameter Commands

. . . . . . . . .

16

8 Branch Commands

. . . . . . . . . . .

17

9 I/O Port Commands

. . . . . . . . . .

17

10 Calculation Commands

. . . . . . . .

18

11 Interrupt Processing Commands

. . .

18

12 Interrupt Vectors

. . . . . . . . . . . .

19

13 New TMCL Commands

. . . . . . . . .

21

14 TMCL Control Commands

. . . . . . .

95

15 Meaning of the Letters in the Access

Column

. . . . . . . . . . . . . . . . . .

96

16 All Axis Parameters of the TMCM-

1111 StepRocker Module

. . . . . . . 107

17 Meaning of the Letters in the Access

Column

. . . . . . . . . . . . . . . . . . 108

18 All Global Parameters of the TMCM-

1111 StepRocker Module in Bank 0

. 111

19 User Variables in Bank 2

. . . . . . . . 111

20 Interrupt Parameters in Bank 3

. . . . 112

21 Selection of Inputs and Outputs

. . . 113

22 Reference Search Modes

. . . . . . . 114

23 CoolStep Adjustment Points and

Thresholds

. . . . . . . . . . . . . . . . 129

24 Firmware Revision

. . . . . . . . . . . 140

25 Document Revision

. . . . . . . . . . . 141

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 138 / 141

11 Supplemental Directives

11.1 Producer Information

11.2 Copyright

TRINAMIC owns the content of this user manual in its entirety, including but not limited to pictures, logos, trademarks, and resources. © Copyright 2022 TRINAMIC. All rights reserved. Electronically published by

TRINAMIC, Germany.

Redistribution of sources or derived formats (for example, Portable Document Format or Hypertext Markup

Language) must retain the above copyright notice, and the complete data sheet, user manual, and documentation of this product including associated application notes; and a reference to other available product-related documentation.

11.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.

11.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.

11.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.

11.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

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 139 / 141 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.

11.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

.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 140 / 141

12 Revision History

12.1 Firmware Revision

Version Date

1.08

1.09

2017-SEP-07

2017-DEC-07

Author Description

OK

OK

First release version.

Longer step pulses on step/direction output.

Better behaviour of STST flag (GAP 208).

Pull-up resistor switching fixed.

Added axis parameter #251.

Added deviation checking.

Added stop switch interrupts.

1.10

1.11

1.12

1.13

2019-JAN-24

2020-JUN-19

OK

OK

2021-NOV-15 OK not deployed

New TMCL commands supported.

EEPROM partitioning corrected.

Position reset after reference search corrected.

PID modes supported using axis parameter #129.

Velocity-dependent switching of stallGuard corrected.

Axis parameter #3 made read-only.

New axis parameter #35 introduced.

Spurious changes of home input polarity eliminated.

New axis parameters #150 and #151. New reference search methods 9 and 10.

Global parameter #87 implemented.

RORA command fixed.

MVP REL command in closed loop mode fixed.

Activating closed loop mode when it is already activated does not cause problems any more.

Fixed: CAN interface was sometimes sending some random telegrams directly after power up.

Fixed: reference search modes 5.. .10 did not correctly zero the position.

Missing heartbeat also stops torque mode.

Table 24: Firmware Revision

12.2 Document Revision

Version Date

1.00

1.01

2017-SEP-29

2017-OCT-10

Author Description

OK

OK

First release version.

New product picture on first page.

1.02

1.03

1.04

2017-DEC-07

2018-JUN-15

2018-SEP-04

OK

OK

OK

Firmware V1.09 included.

Description of axis parameter #210 extended.

Pull-up resistor switching added.

Missing axis parameters added.

©2022 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-1111 StepRocker TMCL ™ Firmware Manual • Firmware Version V1.13 | Document Revision V1.09 • 2021-NOV-16 141 / 141

Version Date

1.05

2019-JAN-25

Author Description

OK New features of firmware V1.11 included.

1.06

1.07

2019-JUN-28

2019-SEP-19

OK

OK

Description of axis parameters #12 and #13 corrected.

Description of axis parameter #201 completed.

1.08

1.09

2020-JUN-25 OK

2021-NOV-16 OK

Firmware V1.12 included.

Firmware V1.13 included.

Table 25: Document Revision

©2022 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany

Terms of delivery and rights to technical change reserved.

Download newest version at www.trinamic.com

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement