Program Example - Path-PLS: Path Distances as Position Source

From SoftMC-Wiki
Jump to: navigation, search

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