Program Examples:Backlash Compensation

From SoftMC-Wiki
Revision as of 12:45, 15 September 2014 by Miborich (talk | contribs) (Created page with "==Introduction== This article demonstrates the use of position backlash compensation feature. [[File:Backlash.jpg|Backlash compensation value in different movement direction...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

This article demonstrates the use of position backlash compensation feature.

Backlash compensation value in different movement directions

Program

First, attach the axis, go to an initial position (zero):

  Attach A1    
  Move A1 0

Set the backlash value and the alpha smoothing factor:

   A1.PositionBacklash = 0.5
   A1.PositionBacklashAlpha = 0.9

Checking the actual compensation value from terminal should return 0 as no motion has been done:

-->?a1.CompPCmd - a1.PCmd
0


Move back (negative direction):

  MOVE A1 -100

Checking the actual compensation value from terminal should return -0.5 as motion was in negative direction:

-->?a1.CompPCmd - a1.PCmd
-0.5

Move forward (positive direction):

  MOVE A1 +100

Checking the actual compensation value from terminal should return +0.5 as motion was in positive direction:

-->?a1.CompPCmd - a1.PCmd
0.5