Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 825 of 909
Home Against a Hard Stop (Basic)
Because the SmartMotor has the capability of lowering its own power level and reading its
position error, it can be programmed to gently feel for the end of travel. This provides a
means to develop a consistent home position subsequent to each power-up.
Machine reliability requires the elimination of potential failure sources. Eliminating a home
switch and its associated cable leverages SmartMotor benefits and improves machine
reliability.
The following program lowers the current limit, moves against a limit, looks for resistance
and then declares and moves to a home position located 100 counts from the hard stop.
MDS 'Using Sine mode commutation
KP=3200 'Increase stiffness from default
KD=10200 'Increase damping from default
F 'Activate new tuning parameters
AMPS=100 'Lower current limit to 10%
VT=-10000 'Set maximum velocity
ADT=100 'Set maximum accel/decel
MV 'Set Velocity mode
G 'Start motion
WHILE EA>-100 'Loop while position error is small
LOOP 'Loop back to WHILE
O=-100 'While pressed, declare home offset
S 'Abruptly stop trajectory
MP 'Switch to Position mode
VT=20000 'Set higher maximum velocity
PT=0 'Set target position to be home
G 'Start motion
TWAIT 'Wait for motion to complete
AMPS=1000 'Restore current limit to maximum
END 'End Program
Home Against a Hard Stop (Advanced)
Because the SmartMotor has the capability of lowering its own power level and reading its
position error, it can be programmed to gently feel for the end of travel. This provides a
means to develop a consistent home position subsequent to each power-up.
Machine reliability requires the elimination of potential failure sources. Eliminating a home
switch and its associated cable leverages SmartMotor benefits and improves machine
reliability.
Similar to the previous example, the following program lowers the current limit, moves
against a limit, looks for resistance and then declares and moves to a home position just one
encoder revolution from the hard stop. However, this example provides a more sophisticated
version of the previous method.
Part 3: Examples: Home Against a Hard Stop (Basic)