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
0 Comments