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

From SoftMC-Wiki
Jump to: navigation, search

This program example uses percentages of the path, from the start of the motion path, as PLS positions. Two PLS positions are defined: one at 0% (motion start) and one at 100% (motion end). This means the output will stay ON during execution of the entire motion and switch OFF at the end of motion.
The default value of PLSRelatedTo is zero; therefore the percentage is 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

Program

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

RTENOTITLE