Difference between revisions of "Program Examples:Backlash Compensation Table"
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|Program_Examples:Backlash_Compensation_Table}} | ||
==Introduction== | ==Introduction== | ||
Line 96: | Line 97: | ||
End Program | End Program | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | |||
+ | '''SEE ALSO''' | ||
+ | * [[MC-Basic:COMMON SHARED ... AS COMP|COMMON SHARED comp_name AS COMP]] | ||
+ | * [[MC-Basic:axis.COMPPOSITIONCOMMAND|axis.COMPPOSITIONCOMMAND]] | ||
+ | * [[MC-Basic:axis.COMPPOSITIONFEEDBACK|axis.COMPPOSITIONFEEDBACK]] | ||
+ | * [[MC-Basic:compTable.MINPOSITION|compTable.MINPOSITION]] | ||
+ | * [[MC-Basic:compTable.MAXPOSITION|compTable.MAXPOSITION]] | ||
+ | * [[MC-Basic:compTable.TARGETDATA|compTable.TARGETDATA]] | ||
+ | * [[MC-Basic:compTable.SOURCEDATA|compTable.SOURCEDATA]] | ||
+ | * [[MC-Basic:compTable.DIRECTION|compTable.DIRECTION]] | ||
+ | * [[MC-Basic:compTable.COMPACTIVE|compTable.CompActive]] | ||
+ | * [[MC-Basic:CREATECOMP|CREATECOMP]] | ||
+ | * [[MC-Basic:LOADCOMPDATA|LOADCOMPDATA]] | ||
+ | * [[MC-Basic:COMPSET|COMPSET]] | ||
+ | * [[MC-Basic:STORECOMPDATA|STORECOMPDATA]] |
Latest revision as of 05:30, 17 July 2017
Language: | English • 中文(简体) |
---|
Introduction
This article demonstrates the use of compensation tables for eliminating position backlash .
Program
First, define two compensation tables each one for opposite directions:
common shared compAxAPlus as comp common shared compAxAMinus as comp
attach the axis, go to an initial position (-100):
Attach AxA Move A1 -100
Define the number of points in each table (10):
CreateComp compAxAPlus 10 CreateComp compAxAMinus 10
Both are active between -100 and +100:
CreateComp compAxAPlus 10 CreateComp compAxAMinus 10
Set the both tables acting on same axis(AxA):
CompSet compAxAPlus AxA On AxA CompSet compAxAMinus AxA On AxA
Checking the actual compensation value from terminal should return 0 as no motion has been done:
compAxAPlus.MinPosition[1] = -100 compAxAPlus.MaxPosition[1] = +100 compAxAMinus.MinPosition[1] = -100 compAxAMinus.MaxPosition[1] = +100
Set the compensation values linearly between 0.1 for -100 and 1.0 for +100 for positive direction and -0.1 to -1.0 for negative direction:
for i = 1 to 10 compAxAPlus.TargetData[1][i] = 0.1*i compAxAMinus.TargetData[1][i] = -0.1*i next
Set direction of compensation activity, one table is only active in positive movement (vcmd > 0) direction the other is negative (vcmd <0):
compAxAPlus.direction = 1 compAxAMinus.direction = -1
Set both tables active, it means both will be active each one in different direction:
compAxAPlus.CompActive = 1 compAxAMinus.CompActive = 1
Start Motion:
AxA.PositionBacklashAlpha = 0.9 Sleep 100 Move AxA 99.9 Abs = 1 Vcruise = 10000 Delay AxA 100 Move AxA -99.9 Abs = 1 Vcruise = 10000 Delay AxA 100
Detach the axis:
Detach AxA End Program
SEE ALSO