Difference between revisions of "Program Example - Path-PLS: Path Distances as Position Source"

From SoftMC-Wiki
Jump to: navigation, search
 
Line 21: Line 21:
 
   P3.PLSPosition[1] = 10
 
   P3.PLSPosition[1] = 10
 
   P3.PLSPosition[2] = 90
 
   P3.PLSPosition[2] = 90
 +
Attach GXY
 
   GXY.PLSSource = PathLength  
 
   GXY.PLSSource = PathLength  
 
   GXY.en = 1
 
   GXY.en = 1
 
   With GXY
 
   With GXY
   Attach
+
      MOVES {100,0} WithPLS = P1
    MOVES {100,0} WithPLS = P1
 
 
     MOVES {0,100} WithPLS = P2
 
     MOVES {0,100} WithPLS = P2
 
     MOVES {0,0}  WithPLS = P3
 
     MOVES {0,0}  WithPLS = P3
  Detach
+
    End With
  End With
+
Detach GXY
 
End program
 
End program
  

Latest revision as of 11:44, 18 April 2019

This program example uses distances along the path, from the start of the motion path, as PLS positions. The default value of PLSRelatedTo is zero; therefore all PLS position values are computed from the start of motion.

 

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

Program

   CreatePLSData 2 P1  
   CreatePLSData 2 P2 
   CreatePLSData 2 P3 
   P1.PLSPosition[1] = 10
   P1.PLSPosition[2] = 90
   P2.PLSPosition[1] = 10
   P2.PLSPosition[2] = 90
   P3.PLSPosition[1] = 10
   P3.PLSPosition[2] = 90
Attach GXY
   GXY.PLSSource = PathLength 
   GXY.en = 1
   With GXY
       MOVES {100,0} WithPLS = P1
     MOVES {0,100} WithPLS = P2
     MOVES {0,0}   WithPLS = P3
     End With
Detach GXY
End program

RTENOTITLE