User manual

TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 52
www.trinamic.com
7.4 Velocity Ramp Generator
For a controlled start up of the motor's velocity a velocity ramp generator can be activated/deactivated by
axis parameter 146. The ramp generator uses the maximal allowed motor velocity (axis parameter 4), the
acceleration (axis parameter 11) und the desired target velocity (axis parameter 2) to calculate a ramp
generator velocity for the following velocity PID regulator.
7.5 Position Regulation
Based on current and velocity regulators the TMCM-1640 supports a positioning mode based on encoder or
hall sensor position. During positioning the velocity ramp generator can be activated to enable motor
positioning with controlled acceleration or it can be disabled to support motor positioning with max
allowed speed.
The PID regulation uses two basic parameters: the P regulation and a timing control value.
TIMING CONTROL VALUE
The timing control value (PID regulation loop parameter - axis parameter 133) determines how often the PID
regulator is invoked. It is given in multiple of 1ms:


 

= the resulting delay between two position regulation loops

= PID regulation loop multiplier parameter
For most applications it is recommended to leave the timing control value unchanged at its default of 1ms.
Higher values may be necessary for very slow and less dynamic drives.
STRUCTURE OF THE POSITION REGULATOR
n
ACTUAL
n
TARGET
P
PARAM
/256
Clip
V
MAX
V
TARGET
Clip
±65535
Figure 7.4: Positioning regulation
Parameter
Description
n
ACTUAL
Actual motor position (GAP 1)
n
TARGET
Target motor position (SAP 0)
P
PARAM
Position P parameter (SAP 130, SAP 230)
V
MAX
Max. allowed velocity (SAP 4)
V
TARGET
New target velocity for ramp generator (GAP 13)
PARAMETERIZING THE POSITION REGULATION
Based on the velocity regulator only the position regulator P has to be parameterized.
1. Disable the velocity ramp generator and set position P parameter to zero.
2. Choose a target position and increase the position P parameter until the motor reaches the target
position approximately.
3. Switch on the velocity ramp generator. Based on the max. positioning velocity (axis parameter 4)
and the acceleration value (axis parameter 11) the ramp generator automatically calculates the slow
down point, i.e. the point at which the velocity has to be reduced in order to stop at the desired
target position.
4. Reaching the target position is signaled by setting the position end flag.