ViX Servo: How to Home to a Hard Stop
Below is some sample code on how to home to a hard stop using the ViX servo controller.
NOTE: Use a low speed and set a low torque limit and GP gain for testing. Your customer will need to calculate the correct CR value. Limiting your total torque to 10 % should be a good starting point to prevent damage. The scale of the CR value is +/-931903, reference this value to the peak current setting of the VIX.
Sample code:Â
;Torque/Current limit example
;This program example shows a drive running up to a torque
;limit.
Â
1KÂ Â ;Kill all programs.
1CLEAR(ALL)Â ;Clear all programs.
1START:Â Â ;Start program is required to declare run label.
1DECLARE(RUN)Â ;Declare "RUN" label.
1END
Â
1RUN:Â Â ;"RUN" program.
1MCÂ Â ;Set continous motion.
1V1Â Â ;Set velocity to 1 rps.
1D-123Â Â ;Force distance to negative direction.
1W(CQ,0)Â ;Write the value of continous execution to 0.
1ONÂ Â ;Turn on drive.
1GÂ Â ;Run axis.
1R(CR)Â Â ;Print current reference.
1TR(CR,<,-10000);Trigger when system current reference is less
  ;then -10000.
1R(CR)Â Â ;Print current reference.
1OFFÂ Â ;Turn off axis.
1END
Â
29-Jul 2016 nc