Homing an MDrive AccuStep to a hard stop
System designers often want to home an axis to a hard stop to avoid the additional complexity and expense of a home sensor.
This program is an example of how to home an AccuStep drive to a hard stop. Functionally, this is similar to a hard stop homing routine on an MDrive/MForce with an optional encoder. The AccuStep program conditionally branches on a lag limit (ER 107) when the drive stops. At that point the user program resets errors and position.
Additionally, this program commands the drive to an offset position after sensing the hard stop.
Video demonstration
Program
'Test routine for homing to a hard stop. 'Intended for sample purposes only
'*** Parameters ***
Vi=100000 'Set init vel
A=4500000 'Accel and Decel
D=A
'*** Program ***
PG 1
LB G1
mu=0,1 'Set makeup, clear LL reg.
As=1 'Set AccuStep mode to fixed current
LD=5000 'Lead Limit
LG=5000 'Lag Limit
Rc=20 'Use a low value of run current for hard stop
Er=0 'Clear any errors
SL -25000 'Slew in CCW direction
LB K2 'User defined label
H 100 'Hold 100mS
BR Z1, Er=107 'Branch to Z1 if Lag Limit reached
BR K2 'Branch to K2
LB Z1 'After error 107 occurs set position and do offset
A=1000 'Change accel and decel
D=A
SL 0 'Slew to 0
H 100 'Delay
Er=0 'Clear error
P=0 'Reset position
C1=0 'Reset counters
C2=0
PR "Homing Complete"
MA 51200 'Offset position one turn CW
H 'Hold until motion complete
PR "Offset Complete"
E 'Program end
PG
Download AccuStep Homing to Hard Stop .mxt file
(color-coded in IMS Terminal)
