![Trinamic TMCM-170 Programming And Reference Manual Download Page 7](http://html1.mh-extra.com/html/trinamic/tmcm-170/tmcm-170_programming-and-reference-manual_1163072007.webp)
TMCM-170 and TMCM-171 MODULE – Reference and Programming Manual
7
Copyright © 2005, TRINAMIC Motion Control GmbH & Co. KG
|velocity|
position
target position
(set via MVP)
max_pos_speed
min_pos_speed
MVP_target_reached_distance
Motor off in this area
slow-down-distance
actual motor velocity
Motor regulated by
Velocity PID
Motor regulated by
combination of
Velocity and Position
PID
Acceleration
MVP_target_
reached_velocity
Target reached flag
only set when velocity
and position are in this
area.
1.6 Homing procedure
There are two ways provided for homing: The encoder N channel and a reference switch input. A
combined procedure will bring the most exact result for linear drives: First do a homing to the switch,
then move the motor away from the switch again and do a homing to the next N-channel event. To
home the drive to either of them, you need to set the following parameters:
1. Enable Encoder_Set_Null or Switch_Set_Null (set desired parameters to 1). Enable
Clear_Set_Null, to do the homing procedure only once. For the switch, set Enable_Stop_Switch, if
the motor is to stop after hitting the switch, i.e. because the switch is positioned at the end point of
a linear axis.
2. Now move the motor in the direction of the Switch using a rotation command. As soon as the
motor hits the stop switch, the encoder position becomes set to zero. If at the same time the motor
switch is enabled as a stop switch, the motor is stopped and the target position is also set to zero.
If the switch is not used to stop the motor, or the Encoder_Set_Null has been enabled, only the
actual position becomes influenced. This would cause a large difference between the actual
(encoder) position and the target position, because the target position (as read by GAP 0 value) is
not influenced by the nulling of the encoder counter! Thus, the motor would at once try to re-
position to the actual target, based on the new encoder position. This would result in a fast
movement to an undefined position, if the initialization had not been done once before. To avoid
this effect, use the Clear_Target_Distance setting:
Set the Clear_Target_Distance to some reasonably low value, e.g. corresponding to one motor
rotation or less. Example: For a 2000 step encoder a homing is done based on the N-channel. The
motor shall not re-position automatically, when the old home position has been further away than
a quarter of a rotation. The resulting maximum offset would be 500 steps, or a
Clear_Target_Distance value of 2 (=500/256).
Hint: A very low value for Clear_Target_Distance may result in problems when working with high
velocities and / or low PID parameter setting. Use a higher value for normal motion.
3. Homing is finished now.