datasheet for TMC454 by Trinamic


Add to my manuals
62 Pages

advertisement

datasheet for TMC454 by Trinamic | Manualzz

TMC454 DATASHEET (v. 1.02 / October 5, 2009) 29

7 The Ramp Generator

7.1 General Description

The ramp generator can generate velocity ramps (velocity over time) with constant velocity, constant acceleration and linear rising acceleration. This allows the generation of step-less and smooth ramps to avoid the motor loosing steps at the joints of each two curve segments. The so called S-curve can be generated automatically. It has got several advantages compared to the trapezoidal ramps which are commonly used for positioning tasks.

7.2 Principle of Operation

In principle the ramp generator is a cascade of three integrators (Figure 7.1). All integrators work with the

frequency f ramp

, which is divided from the clock frequency via a divider (fifo_pre_div) which can be programmed in powers of two. The same frequency is used to derive the step frequency of the motor. The first integrator generates a linear change of the acceleration for parabolic curves. It adds up the 14 bit wide parameter

fifo_bow in every time step to the 22 bit wide acceleration register (ramp_actaccel). The integrator is stopped as soon as the pre-programmed value for the nominal acceleration (fifo_a_nom) is reached. The velocity value is generated using the same mechanism: The 22 bit wide velocity integrator adds up the upper 14 bits of the acceleration value in every time step until the nominal velocity (fifo_v_nom) is reached.

The TMC454 avoids overflows of the integrators by stopping the integration if the next addition step would exceed the preprogrammed nominal values. Thus it is important to always choose correct nominal values to stop integration.

To yield a finer step resolution, the input values of the integrators are shifted to the right by 8 bits. This corresponds to a division by 256.

The velocity value (ramp_actvel) calculated by the integrator chain feeds a programmable pulse generator, which generates one impulse for every motor step. The frequency of this pulse generator can be calculated as follows:

Step frequency of the ramp generator (Microsteps or fullsteps depending on the settings of the sequencer)

f step

f clk

v

2

14

fifo

_

pre

_

div

1 full step frequency = micro step frequency (f step

) / microstep count f clk

: external clock frequency of the TMC454 v: actual 14 bit velocity value, signed (-8191..8191)

Operation frequency of the ramp generator

The calculation of the actual velocity and acceleration values as well as the time counter work with a frequency which is controlled by the pre-divider (f ramp

f ramp

f clk

2

fifo

_

pre

_

div

1

):

All settings of the ramp generator are controlled via the command FIFO. The corresponding registers and commands are listed in the chapter on the command FIFO.

Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG

TMC454 DATASHEET (v. 1.02 / October 5, 2009)

[23..0] ramp_time_cnt

Sequencer timer full step half step micro step

[3..0] fifo_pre_div4

Prescaler

8 Bits

Clk 12,5MHZ

[23..0] ramp_pos_act

Pulse generator

14

[21..8]

[21..0] ramp_actvel

1

[13..0] fifo_v_nom

Velocity

Control

22

[13..0] fifo_a_nom

Acceleration

Control

14

[21..8]

[21..0] ramp_actaccel

22

30

14

Parabolic Control

0

[13..0] fifo_bow

Figure 7.1: Schematic of the ramp generator

Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG

TMC454 DATASHEET (v. 1.02 / October 5, 2009) 31

Registers of the ramp generator

Address Term

0x40 latch_ramp_params

0x41

0x44

0x48

0x4C

0x50

0x60

0x62

0x64

0x66

0x68

0x6A

0x6C

0x6E

0x70

0x74

0x75

0x76

0x77

0x78

0x79 ramp_status ramp_time_cnt

Width

0 (w) ramp_actvel 22 (r) ramp_actaccel 22 (r) ramp_pos_act fifo_a_nom

24 (r)

14 (r) fifo_v_nom fifo_a_sld fifo_v_sld fifo_bow14 fifo_a_comp1

14 (r)

13 (r)

13 (r)

14 (r)

13 (r) fifo_v_comp1 fifo_a_comp2 fifo_v_comp2 fifo_pre_div4 fifo_imot0 fifo_imot1 fifo_imot2 fifo_imot3 fifo_misc_ctrl

8 (r)

24 (rw)

13 (r)

13 (r)

13 (r)

4 (r)

8 (r)

8 (r)

8 (r)

8 (r)

2 (r)

Description

A write access to this register causes all relevant data of the ramp generator to be copied to the ramp-holding registers.

(This is the same as the execution of a command with the bit

COPY_REG_INT set)

Holding register for the state of the ramp generator

Internal ramp time reference (counts ramp generator clocks)

(On read access: value of the holding register)

Holding register for velocity value (s. rounding *)

Holding register for acceleration value (s. rounding *)

Holding register for position counter (actual value)

Nominal acceleration for ramp generation

Nominal velocity for ramp generation

Acceleration for slowdown operation

Final velocity for slowdown operation

Ascent of acceleration (bow parameter) for ramp generation

Acceleration compare value for automatic motor current control

(MC0, MC1,AOUT2)

Velocity compare value for automatic motor current control

(MC0, MC1, AOUT2)

Acceleration compare value for automatic motor current control

(MC0, MC1, AOUT2)

Velocity compare value for automatic motor current control

(MC0, MC1, AOUT2)

Pre-divider for ramp generator (division in powers of two)

Output value for analog output AOUT2 for automatic rampdependant current control with 0 exceeded compare values

Output value for analog output AOUT2 for automatic rampdependant current control with 1 exceeded compare value

Output value for analog output AOUT2 for automatic rampdependant current control with 2 exceeded compare values

Output value for analog output AOUT2 for automatic rampdependant current control with 3 or 4 exceeded compare values

Flag for PID controller (bit 1) and flag for control based on the measured velocity (bit 0)

Time limit for execution of the actual FIFO-command

End position for ramp segment

0x7C

0x80 fifo_t_lim fifo_pos_end

24 (r)

24 (r)

(*) Rounding of the 22 bit wide values in ramp_actvel and ramp_actaccel:

For all internal calculations the values in the 22 bit wide velocity and acceleration registers are rounded to 14 bit signed values. The internal rounding algorithm rounds into the direction of the next number with a higher absolute value when the least significant 8 bits have got a value between 0x80 and 0xFF for positive numbers, respectively between 0x7F and 0x00 for negative numbers.

Hint:

When reading the two’s-complement signed numbers from the TMC454 into the host processor, please note, that they have to be sign-extended before using in 16 or 32 bit arithmetic.

Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG

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

Table of contents