Program Example - Path-PLS: Blended Motion Transitions as Position Source

From SoftMC-Wiki
Jump to: navigation, search

This program example uses the transitions between two blended motions as PLS positions. This program shows system behavior when PLSSource is relative. During the actual blending (the time during which two motions are executed simultaneously), the system executes two separate PLS events.

  • When PLS positions are crossed, the percentage of the first motion path length is computed
  • When PLS positions are crossed, the percentage of the second motion path length is computed

If two motions containing the same PLS positions (PathPercentage 0% and 100%) are blended, the PLS output will switch off during the phase in which the motions coincide.

 

Common Shared GXY as group of axnm = A1 axnm = A2 of XY
Common Shared P1 as PLS GXY Sys.Dout.1

Program

   CreatePLSData P1 2 
   P1.PLSPosition[1] = 0
   P1.PLSPosition[2] = 100
Attach GXY
   GXY.PLSSource = PathPercentage
   GXY.BlendingMethod = 2
   GXY.BlendingFactor = 90
   GXY.en = 1
   With GXY
      MOVES {0,0} 
     MOVES {200,200} WithPLS = P1
     MOVES {300,300} WithPLS = P1
   End With
Detach GXY
End program

RTENOTITLE

The PLS output toggles OFF at the beginning of the second motion (during the coinciding-motion phase, before the first motion is completed).
The PLS output toggles toggles ON at the end of the first motion (after the second motion has already started).

RTENOTITLE