- No category
advertisement
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
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
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 1 Features
- 6 Functional Overview
- 7 Introduction
- 7 Control of Stepper Motors
- 7 Microstepping
- 7 More precision using motor current control
- 7 Conclusion
- 9 Block diagram
- 10 Pinning, Package, and Electrical data of the TMC
- 10 Pinning of TMC
- 13 Pull-Up / Pull-Down Resistances
- 13 Blocking Capacitors
- 15 Package Outlines and Dimensions
- 15 Fine Pitch BGA Package with 144 Balls (FBGA144) of TMC454-BC
- 16 Absolute Maximum Ratings
- 16 Analog Functions - External Low Cost DACs
- 17 Using TRINAMIC Driver (TMC236, TMC239, TMC246, TMC249) via SPI
- 17 Control Signals
- 17 Diagnosis Signals
- 17 with TMC246 or TMC
- 17 PWM DAC for Current Scaling
- 18 External DACs - LTC
- 19 Digital part
- 19 The Bus interface
- 19 Parallel Interface
- 22 Serial Interface
- 23 Description of the COMMAND FIFO
- 23 Accessing the TMC
- 24 General functionality
- 24 Description of the registers of the COMMAND FIFO
- 24 FIFO Commands
- 26 Description of the status bits
- 27 STOP and SLOWDOWN-functions
- 27 Finding the Reference Position
- 28 Programming example for the FIFO
- 29 The Ramp Generator
- 29 General Description
- 29 Principle of Operation
- 32 Programming the Ramp generator
- 32 Automatic Ramp generation
- 33 Programmed / Interactive Ramp generation
- 33 Synchronization of multiple TMC454s
- 34 Ramp adaptive motor current control
- 35 The Incremental Encoder Interface
- 35 General Description
- 35 Registers of the Incremental Encoder Interface
- 37 The Sequencer
- 37 Registers for Sinestep operation
- 38 Programming the Sine Generator
- 41 Full Step and Half Step Operation
- 41 Automatic Phase Pattern Setup
- 42 Manual Phase Pattern Setup
- 45 Registers for Microstep Operation
- 48 Administration of the different modes of operation and output control
- 51 The PID Controller
- 51 General introduction
- 51 Increasing stepping accuracy and stabilizing the position
- 52 Description of the registers of the PID controller
- 56 Interrupt control and Interrupt Sources
- 58 TMC454 Register Overview
- 61 Literature & Links
- 61 Revision History