/*********************************************************************/
/* How to obtain the value for the backlash correction:              */
/*********************************************************************/
/* 1) Set the current values for backlash correction to zero by      */
/*    editing the file MtDrv.ini (dAcdCorr = 0 0 0 0).               */  
/* 2) Start this program with a valid setting for the axis ia and    */
/*    a possible value for corr. The axis will move 10 times in      */ 
/*    both directions.                                               */
/* 3) Check whether you can feel the axis moving or not. If so, use  */
/*    a smaller value for corr. if not, use a bigger value.          */  
/*    The correct value is maximum distance for which the tested     */
/*    axis does not really move.                                     */
/* 4) Enter the new value into the dAcdCorr entry of the MtDrv.ini   */
/*    file.                                                          */  
/* Note: Changes of the MtDrv.ini file do not take effect unless     */
/* EdiTasc is restarted!                                             */
/*********************************************************************/

local "corr" "ia" "f";

ia   = 0;       /* axis (0=X, 1=Y, ...) */
corr = 10;      /* value to be tested   */

f = _drvAcToMcFac[ia];
if(f < 0.0){f = -f;}

for 10{
 _ocNext[ia] = _ocNext[ia] + 2 * corr * f; ml; wait 0.5;
 _ocNext[ia] = _ocNext[ia] - 2 * corr * f; ml; wait 0.5;
}

