Difference between revisions of "AXY:Blending"

From SoftMC-Wiki
Jump to: navigation, search
m (Version 3.7.x - Previous Rules)
(AXY: new links)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Introduction ==
 
==Introduction ==
  
The softMC system has two blending methods: Continuous Path (CP) and Super Position (SP). Both 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.  
+
The softMC system has two blending methods: Continuous Path (CP) and Super Position (SP). Both 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.  
  
 
* The problem arises when one of the movement is issues with no explicit blending parameter, in this case the default value <br> (of the CP or BF) is used. But the default value can also implicitly switch off the blending (CP = 0 or BF = 100).
 
* The problem arises when one of the movement is issues with no explicit blending parameter, in this case the default value <br> (of the CP or BF) is used. But the default value can also implicitly switch off the blending (CP = 0 or BF = 100).
Line 26: Line 26:
 
</pre>
 
</pre>
  
 
 
== Version 3.7.x - Previous Rules ==
 
 
# Nodal value of BF determines the point on the given motion where the '''next''' motion starts.<br/>
 
# In case where blending of first motion is switched off (BF set to 100 or CP to 0), the next motion's BF will be applied.<br/>
 
# Switching off blending on second motion (BF=100 or CP=0) will cancel blending between the two motions (first & second).
 
 
<br>
 
 
[[File:Axystems;Blending Behaviour 1.png| caption| Blending Behavior version 3.7.x| 400px]]
 
  
 
==Version 4.x.x Rules ==
 
==Version 4.x.x Rules ==
Line 43: Line 32:
 
# 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.
 
<br/>
 
<br/>
[[Image:Axystems;Blending Behaviour 2.png| 400px|frame| caption| Blending Behavior version 4.x.x]]
+
[[File:Blending Behaviour 2.png| Caption |Blending Behavior version 4.x.x |400px]]
 +
<br/>
  
 
= Blending Behavior - Advanced =
 
= Blending Behavior - Advanced =
  
1.) [[Axystems:MC-Basic:group.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]  - either modal (global) or nodal (local) defines 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>
+
1.) [[MC-Basic:element.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]  - either modal (global) or nodal (local) defines 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>
  
2.) [[Axystems: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>.BFP must be set to -1 (actually: any negative number). The default value shall be -1, so that the default behaviour is the same as with current 4.2 firmwares.<br>
+
2.) [[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>.BFP must be set to -1 (actually: any negative number). The default value shall be -1, so that the default behaviour is the same as with current 4.2 firmwares.<br>
 
example:<br>
 
example:<br>
  
Line 59: Line 49:
 
::means:<br> '''loc1 -> BF90 -> loc2 -> BF50 -> loc3'''<br>  
 
::means:<br> '''loc1 -> BF90 -> loc2 -> BF50 -> loc3'''<br>  
  
3.) The same shall apply to [[Axystems:MC-Basic:group.CP|'''<robot>.CP''']]  and [[Axystems: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:
+
3.) 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:
  
 
::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)
Line 69: Line 59:
 
without any implicit magic at the price of only little changes to existing code.
 
without any implicit magic at the price of only little changes to existing code.
  
== Summary: ==
+
== Summary ==
  
 
# global BF (<robot>.bf=<NUM>) is the default BF
 
# global BF (<robot>.bf=<NUM>) is the default BF
Line 78: Line 68:
 
# 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 shall apply to CP and CPPrev
+
# the same will apply to CP and CPPrev
  
 
with some side effects:
 
with some side effects:
  
{{Note| Globally setting <nowiki>BFPrev to >= 0</nowiki> is probably a bad idea, because it will overwrite any and all elaborate local BF, but that's the spec.}}
+
{{Note| Globally setting BFPrev to <nowiki>= 0</nowiki> 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!}}
 +
 
 +
== Version 3.7.x - Previous Rules ==
  
{{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> should be expected!}}
+
# Nodal value of BF determines the point on the given motion where the '''next''' motion starts.<br/>
 +
# In case where blending of first motion is switched off (BF set to 100 or CP to 0), the next motion's BF will be applied.<br/>
 +
# Switching off blending on second motion (BF=100 or CP=0) will cancel blending between the two motions (first & second).
 +
 
 +
<br>
 +
[[File:Axystems;Blending Behaviour 1.png| caption| Blending Behavior version 3.7.x| 400px]]
 +
<br>
  
 
== Refer to ==
 
== Refer to ==
  
 
<!-- * {{Bugzilla|2847}} -->
 
<!-- * {{Bugzilla|2847}} -->
* [[Axystems:MC-Basic:group.CP|'''<robot>.CP''']]  
+
* [[MC-Basic:element.CP|'''<robot>.CP''']]  
* [[Axystems:MC-Basic:group.CPPREV|'''<robot>.CPPrev''']]
+
* [[MC-Basic:element.CPPREV|'''<robot>.CPPrev''']]
* [[Axystems:MC-Basic:group.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]
+
* [[MC-Basic:element.BLENDINGFACTOR|'''BlendingFactor (<robot>.BF)''']]
* [[Axystems:MC-Basic:group.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']]
+
* [[MC-Basic:element.BLENDINGFACTORPREVIOUS|'''BlendingFactorPrevious (<robot>.BFPrev)''']]
* [[Axystems:Safe_Superposition_(SP)_blending | '''Safe Superposition (SP) blending''']]
 
  
 +
* [[Blend Protected|'''Blend Protected''']]
 +
* [[Motion Blending|'''Motion Blending''']]
 +
* [[Safe Superposition (SP) blending|'''Safe Superposition (SP) Blending''']]
  
[[Category:Axystems:Motion Blending|Blending]]
+
[[Category:Motion Blending|Blending]]

Latest revision as of 13:32, 13 September 2017

Introduction

The softMC system has two blending methods: Continuous Path (CP) and Super Position (SP). Both 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.

  • The problem arises when one of the movement is issues with no explicit blending parameter, in this case 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).
  • Selection between different blending methods is done by BlendingMethod property (1 – CP, 2 – SP).
  • In cases when one of the movement has blending switched off the following rules apply:

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 


Version 4.x.x Rules

  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 next motion.


Blending Behavior version 4.x.x

Blending Behavior - Advanced

1.) BlendingFactor (<robot>.BF) - either modal (global) or nodal (local) defines the blending between the motion it is given for and the next upcoming motion. Ranges from 0 (immediate = maximum blending) to 100 (no blending).

2.) 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>.BFP must be set to -1 (actually: any negative number). The default value shall be -1, so that the default behaviour is the same as with current 4.2 firmwares.
example:

moves robot loc1 BF=0 <br>
moves robot loc2 BFPrev=90 BF=90 <br>
moves robot loc3 BFPrev=50 
means:
loc1 -> BF90 -> loc2 -> BF50 -> loc3

3.) 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

without any implicit magic at the price of only little changes to existing code.

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 = 0 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 can be expected!

Version 3.7.x - Previous Rules

  1. Nodal value of BF determines the point on the given motion where the next motion starts.
  2. In case where blending of first motion is switched off (BF set to 100 or CP to 0), the next motion's BF will be applied.
  3. Switching off blending on second motion (BF=100 or CP=0) will cancel blending between the two motions (first & second).


Blending Behavior version 3.7.x

Refer to