Difference between revisions of "Motion Blending"

From SoftMC-Wiki
Jump to: navigation, search
m (Blending Properties)
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Introduction ==
+
{{Languages|Motion_Blending}}
 +
== Introduction ==
  
Blending is combination of two or more motions together. During Blending motion typically does not stop at the intermediate points.
+
Blending is combination of two or more motions together. During Blending motion typically does not stop at the intermediate points.
  
 
There are three blending types:
 
There are three blending types:
  
# '''CP''' (Continous Path) blending.<br>''Two movements are combined into one lead by one common profile.''  
+
#'''CP''' (Continous Path) blending.<br/> ''Two movements are combined into one lead by one common profile.''  
# '''SP''' (SuperPosition ) blending.<br>''Two movements are combined into one by addition, each movement is lead by its own profile.''
+
#'''SP''' (SuperPosition ) blending.<br/> ''Two movements are combined into one by addition, each movement is lead by its own profile.''  
# '''AI''' (Advance Interpolation) blending.<br>''Many movements are combined into one lead by one common profile.''
+
#'''AI''' (Advance Interpolation) blending.<br/> ''Many movements are combined into one lead by one common profile.''  
 
 
Selected by [[MC-Basic:group.BLENDINGMETHOD|BlendingMethod]] property.
 
  
 +
Selected by [[MC-Basic:element.BLENDINGMETHOD|BlendingMethod]] property.
  
 
=== Blending Properties ===
 
=== Blending Properties ===
Line 16: Line 16:
 
Different blending properties are used in different blending methods:
 
Different blending properties are used in different blending methods:
  
{| {{table}} border = "1"
+
{| border="1"
| align="center" |''' Properties '''
+
|-
| align="center" |''' CP '''
+
| align="center" | '''Properties'''
| align="center" |''' SP '''
+
| align="center" | '''&nbsp;CP&nbsp;'''
| align="center" |''' AI '''
+
| align="center" | '''&nbsp;SP&nbsp;'''
 +
| align="center" | '''&nbsp;AI&nbsp;'''
 +
|-
 +
| [[MC-Basic:element.BLENDINGMETHOD|BlendingMethod]]
 +
| 1
 +
| 2
 +
| 3
 +
|-
 +
| [[MC-Basic:element.CP|CP]]
 +
| ✓
 +
| -
 +
| -
 
|-
 
|-
||[[MC-Basic:group.BLENDINGMETHOD|BlendingMethod]]||1||2||3
+
| [[MC-Basic:element.CPPREV|CPPrev]]
 +
|
 +
| -
 +
| -
 
|-
 
|-
||[[MC-Basic:group.CP|CP]]||✓ ||-||-  
+
| [[MC-Basic:element.BLENDINGFACTOR|BlendingFactor]]
 +
| -
 +
| 1..100
 +
| -
 
|-
 
|-
||[[MC-Basic:group.CPPREV|CPPrev]]||✓ ||-||-  
+
| [[MC-Basic:element.BLENDINGFACTORPREVIOUS|BFPrev]]
 +
| -
 +
| 1..100
 +
| -
 
|-
 
|-
||[[MC-Basic:group.BLENDINGFACTOR|BlendingFactor]]||-||1..100||-
+
| [[MC-Basic:element.BLENDPROTECTED|BlendProtected]]
|-  
+
| -
||[[MC-Basic:group.BLENDINGFACTORPREVIOUS|BFPrev]]||-||1..100||-
+
|
|-
+
| -
||[[MC-Basic:group.BLENDPROTECTED|BlendProtected]]||-||✓||-
 
 
|-
 
|-
||[[MC-Basic:group.BLENDINGSTARTCONDITION|BlendingStartCondition]]||✓||✓||-
+
| [[MC-Basic:element.BLENDINGPERCENTAGE|BlendingPercentage]]
 +
| ✓
 +
| ✓
 +
| -
 
|-
 
|-
||[[MC-Basic:group.DOUBLEMODE|DoubleMode]]||✓||✓||-
+
| [[MC-Basic:element.BLENDINGSTARTCONDITION|BlendingStartCondition]]
 +
| ✓
 +
| ✓
 +
| -
 +
|-
 +
| [[MC-Basic:element.DOUBLEMODE|DoubleMode]]
 +
| ✓
 +
| ✓
 +
| -
 
|}
 
|}
  
==Simple Blending==
+
== Simple Blending ==
The first two blending methods (Continuous Path (CP) and Super Position (SP)) are characterized by the fact that during blending exactly two motions are active and combined into one. In first case (CP) the combination is done using profiler-following and in the second case (SP) simple addition of two movements. Both methods as a trigger for blending specify the distance from the target position of the first motion. In CP this is defined by the '''cp''' factor which in represents the linear distance from the target point (however this factor is combined with the CP of the second motion). In case of the SP it is a simple distance (given in '''percentage''') from the starting point (Blending factor - BF). In both cases the parameter (CP or BF) of the current motion influences the point of blending of the next motion.
 
''When one of the movement is issued with no explicit blending parameter,  the default value  (of the CP or BF) is used. But the default value can also implicitly switch off the blending (CP = 0 or BF = 100).''
 
  
* In cases when one of the movement has blending switched off, the following rules apply:
+
The first two blending methods (Continuous Path (CP) and Super Position (SP)) are characterized by the fact that during blending exactly two motions are active and combined into one. In the first case (CP) the combination is done using profiler-following and in the second case (SP) simple addition of two movements. Both methods as a trigger for blending specify the distance from the target position of the first motion. In CP this is defined by the '''cp''' factor which in represents the linear distance from the target point (however this factor is combined with the CP of the second motion). In case of the SP it is a simple distance (given in '''percentage''') from the starting point (Blending factor - BF). In both cases the parameter (CP or BF) of the current motion influences the point of blending of the next motion. ''When one of the movements are issued with no explicit blending parameter, the default value (of the CP or BF) is used. But the default value can also implicitly switch off the blending (CP = 0 or BF = 100).''
  
# The nodal BF defines the starting point of the '''next''' motion in blending.
+
*In cases when one of the movements have blending switched off, the following rules apply:
# If the nodal BF value is set to 100 (or CP=0), there will be no blending with next motion.
 
  
===Program Example ===
+
#The nodal BF defines the starting point of the '''next''' motion in blending.
<pre>
+
#If the nodal BF value is set to 100 (or CP=0), there will be no blending with the next motion.
Blendingmethod =1 ' cp
+
 
 +
=== Program Example ===
 +
<pre>Blendingmethod =1 ' cp
 
CP = 0
 
CP = 0
 
BlendingFactor = 100
 
BlendingFactor = 100
Line 65: Line 94:
 
</pre>
 
</pre>
  
===Blending Propagation Rules ===
+
=== Blending Propagation Rules ===
  
 +
*Nodal values of BF/CP define the starting point of the '''next''' motion in blending.
  
* Nodal values of  BF/CP define the starting point of the '''next''' motion in blending.
+
*If the nodal BF value is set to 100 (or CP=0), there will be no blending with next motion.  
  
* If the nodal BF value is set to 100 (or CP=0), there will be no blending with next motion.
+
*[[MC-Basic:element.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']] - either modal (global) or nodal (local) define the blending between the motion. '''''It is given for and the next upcoming motion.''''' Ranges from 0 (immediate = maximum blending) to 100 (no blending).  
  
* [[MC-Basic:group.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']] - either modal (global) or nodal (local) define the blending between the motion. '''''It is given for and the next upcoming motion.''''' Ranges from 0 (immediate = maximum blending) to 100 (no blending).<br>
+
*[[MC-Basic:element.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']] - either modal (global) or nodal (local) overwrites - if in the range of 0 to 100 - the <robot>.BF of the previous motion. '''''Meant to be applied between the previous motion and the current one.''''' The meaning of the range 0 to 100 is the same as with <robot>.BF. If no such overwriting is desired <robot>.BFPrev must be set to -1 (actually: any negative number).  
  
* [[MC-Basic:group.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']] - either modal (global) or nodal (local) overwrites - if in the range of 0 to 100 -  the <robot>.BF of the previous motion. '''''Meant to be applied between the previous motion and the current one.''''' The meaning of the range 0 to 100 is the same as with <robot>.BF. If no such overwriting is desired <robot>.BFPrev must be set to -1 (actually: any negative number).  
+
*The same shall apply to [[MC-Basic:element.CP|'''<robot>.CP''']] and [[MC-Basic:element.CPPREV|'''<robot>.CPPrev''']]. If given and > 0 <robot>.CPPrev shall overwrite the previous <robot>.CP. If -1 (actually: any negative number) it shall be ignored. The default shall be -1. If the overwrite comes too late the previous motion shall continue with its own <robot>.CP. This means that it might still apply its own low CP if it was to be overwritten by a large CPPrev. These two factors basically allow to give separate blending coefficients for the two end points of a motion, together with a very explicit and easy rule how they're applied. One can:
  
* The same shall apply to [[MC-Basic:group.CP|'''<robot>.CP''']]  and [[MC-Basic:group.CPPREV|'''<robot>.CPPrev''']]. If given and > 0 <robot>.CPPrev shall overwrite the previous <robot>.CP. If -1 (actually: any negative number) it shall be ignored. The default shall be -1. If the overwrite comes too late the previous motion shall continue with its own <robot>.CP. This means that it might still apply its own low CP if it was to be overwritten by a large CPPrev. These two factors basically allow to give separate blending coefficients for the two end points of a motion, together with a very explicit and easy rule how they're applied. One can:
+
:
 +
::a) always determine blending in advance (i.e. before or at starting the motion
  
::a) always determine blending in advance (i.e. before or at starting the motion)
+
:
 +
::b) always determine blending retrospectively (i.e. after starting the motion)  
  
::b) always determine blending retrospectively (i.e. after starting the motion)
+
:
 +
::c) mix a) and b) randomly 
  
::c) mix a) and b) randomly
+
&nbsp;
 
+
<pre>moves robot loc1 BF=0  
 
 
<pre>
 
moves robot loc1 BF=0  
 
 
moves robot loc2 BFPrev=90 BF=90  
 
moves robot loc2 BFPrev=90 BF=90  
 
moves robot loc3 BFPrev=50  
 
moves robot loc3 BFPrev=50  
Line 93: Line 123:
 
</pre>
 
</pre>
  
 
+
<br/> [[File:Blending Behaviour 2.png|600px|Blending Behavior]]<br/> Blending Behavior
<br/>
 
[[File:Blending Behaviour 2.png| Caption |Blending Behavior |400px]]
 
<br/>Blending Behavior
 
  
 
=== Rules Summary ===
 
=== Rules Summary ===
  
# global BF (<robot>.bf=<NUM>) is the default BF
+
#global BF (<robot>.bf=<NUM>) is the default BF  
# local BF (move <robot> BF=<NUM>) overwrites that default per motion
+
#local BF (move <robot> BF=<NUM>) overwrites that default per motion  
# this results in an effective BF per motion
+
#this results in an effective BF per motion  
# global BFPrev initialized by the system to -1
+
#global BFPrev initialized by the system to -1  
# local BFPrev overwrites global BFPrev per motion
+
#local BFPrev overwrites global BFPrev per motion  
# this results in an effective BFPrev per motion
+
#this results in an effective BFPrev per motion  
# if the effective BFP is >= 0 (not negative), it overwrites the effective BF for the previous motion
+
#if the effective BFP is >= 0 (not negative), it overwrites the effective BF for the previous motion  
# the same will apply to CP and CPPrev
+
#the same will apply to CP and CPPrev  
  
 
with some side effects:
 
with some side effects:
  
{{Note| Globally setting BFPrev to <nowiki>= 0</nowiki> is not recommended, because it will overwrite any and all elaborate local BF}}
+
{{Note| Globally setting BFPrev to ?'"`UNIQ--nowiki-00000003-QINU`"'? is not recommended, because it will overwrite any and all elaborate local BF}}
  
{{Note | Accuracy of the path length depends on the velocity at the moment of blending. Error in the magnitude of <math>V \cdot T </math> can be expected!}}
+
{{Note | Accuracy of the path length depends on the velocity at the moment of blending. Error in the magnitude of ?'"`UNIQ--math-00000004-QINU`"'? can be expected!}}
  
 +
[[File:Blending Prev.png|600px|Blending Prev.png]]<br/> ''BF vs BFprev''
  
[[File:Blending Prev.png|800px]]<br>
+
== See Also ==
''BF vs BFprev''
 
  
== See Also: ==
+
<!-- * {{Bugzilla|2847}} -->
  
<!-- * {{Bugzilla|2847}} -->
+
*[[MC-Basic:element.CP|'''<robot>.CP''']]  
* [[MC-Basic:group.CP|'''<robot>.CP''']]  
+
*[[MC-Basic:element.CPPREV|'''<robot>.CPPrev''']]  
* [[MC-Basic:group.CPPREV|'''<robot>.CPPrev''']]
+
*[[MC-Basic:element.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]  
* [[MC-Basic:group.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]
+
*[[MC-Basic:element.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']]  
* [[MC-Basic:group.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']]
+
*[[Safe_Superposition_(SP)_blending|'''Safe Superposition (SP) blending''']]
* [[Safe Superposition (SP) blending| '''Safe Superposition (SP) blending''']]
+
*[[Cartesian_Gearing|'''Cartesian Gearing''']]  
  
[[Category:Motion Control|Motion Blending]]
+
[[Category:Motion Control]] [[Category:Motion Blending|Blending]]
[[Category:Motion Blending|Blending]]
 

Latest revision as of 11:52, 11 August 2019

Language: English  • 中文(简体)‎

Introduction

Blending is combination of two or more motions together. During Blending motion typically does not stop at the intermediate points.

There are three blending types:

  1. CP (Continous Path) blending.
    Two movements are combined into one lead by one common profile.
  2. SP (SuperPosition ) blending.
    Two movements are combined into one by addition, each movement is lead by its own profile.
  3. AI (Advance Interpolation) blending.
    Many movements are combined into one lead by one common profile.

Selected by BlendingMethod property.

Blending Properties

Different blending properties are used in different blending methods:

Properties  CP   SP   AI 
BlendingMethod 1 2 3
CP - -
CPPrev - -
BlendingFactor - 1..100 -
BFPrev - 1..100 -
BlendProtected - -
BlendingPercentage -
BlendingStartCondition -
DoubleMode -

Simple Blending

The first two blending methods (Continuous Path (CP) and Super Position (SP)) are characterized by the fact that during blending exactly two motions are active and combined into one. In the first case (CP) the combination is done using profiler-following and in the second case (SP) simple addition of two movements. Both methods as a trigger for blending specify the distance from the target position of the first motion. In CP this is defined by the cp factor which in represents the linear distance from the target point (however this factor is combined with the CP of the second motion). In case of the SP it is a simple distance (given in percentage) from the starting point (Blending factor - BF). In both cases the parameter (CP or BF) of the current motion influences the point of blending of the next motion. When one of the movements are issued with no explicit blending parameter, the default value (of the CP or BF) is used. But the default value can also implicitly switch off the blending (CP = 0 or BF = 100).

  • In cases when one of the movements have blending switched off, the following rules apply:
  1. The nodal BF defines the starting point of the next motion in blending.
  2. If the nodal BF value is set to 100 (or CP=0), there will be no blending with the next motion.

Program Example

Blendingmethod =1 ' cp
CP = 0
BlendingFactor = 100
MOVE L
MOVE L CP = 10
Move L
delay 100
Blendingmethod =2 ' sp
CP = 0
BlendingFactor = 100
MOVE L
MOVE L BlendingFactor = 85
Move L BlendingFactor = 100 

Blending Propagation Rules

  • Nodal values of BF/CP define the starting point of the next motion in blending.
  • If the nodal BF value is set to 100 (or CP=0), there will be no blending with next motion.
  • BlendingFactor (<robot>.BF) - either modal (global) or nodal (local) define the blending between the motion. It is given for and the next upcoming motion. Ranges from 0 (immediate = maximum blending) to 100 (no blending).
  • BlendingFactorPrevious (<robot>.BFPrev) - either modal (global) or nodal (local) overwrites - if in the range of 0 to 100 - the <robot>.BF of the previous motion. Meant to be applied between the previous motion and the current one. The meaning of the range 0 to 100 is the same as with <robot>.BF. If no such overwriting is desired <robot>.BFPrev must be set to -1 (actually: any negative number).
  • The same shall apply to <robot>.CP and <robot>.CPPrev. If given and > 0 <robot>.CPPrev shall overwrite the previous <robot>.CP. If -1 (actually: any negative number) it shall be ignored. The default shall be -1. If the overwrite comes too late the previous motion shall continue with its own <robot>.CP. This means that it might still apply its own low CP if it was to be overwritten by a large CPPrev. These two factors basically allow to give separate blending coefficients for the two end points of a motion, together with a very explicit and easy rule how they're applied. One can:
a) always determine blending in advance (i.e. before or at starting the motion)
b) always determine blending retrospectively (i.e. after starting the motion)
c) mix a) and b) randomly

 

moves robot loc1 BF=0 
moves robot loc2 BFPrev=90 BF=90 
moves robot loc3 BFPrev=50 

means: loc1 -> BF90 -> loc2 -> BF50 -> loc3


Blending Behavior
Blending Behavior

Rules Summary

  1. global BF (<robot>.bf=<NUM>) is the default BF
  2. local BF (move <robot> BF=<NUM>) overwrites that default per motion
  3. this results in an effective BF per motion
  4. global BFPrev initialized by the system to -1
  5. local BFPrev overwrites global BFPrev per motion
  6. this results in an effective BFPrev per motion
  7. if the effective BFP is >= 0 (not negative), it overwrites the effective BF for the previous motion
  8. the same will apply to CP and CPPrev

with some side effects:

NOTE-Info.svgNOTE
Globally setting BFPrev to ?'"`UNIQ--nowiki-00000003-QINU`"'? is not recommended, because it will overwrite any and all elaborate local BF
NOTE-Info.svgNOTE
Accuracy of the path length depends on the velocity at the moment of blending. Error in the magnitude of ?'"`UNIQ--math-00000004-QINU`"'? can be expected!

Blending Prev.png
BF vs BFprev

See Also