Difference between revisions of "Program Example - Path-PLS: Equidistant Points from Start/End as Position Source"
m |
|||
Line 1: | Line 1: | ||
− | This program uses two positions, which are distanced equally from the start and the end of the motion, as PLS positions. | + | This program uses two positions, which are distanced equally from the start and the end of the motion, as PLS positions. |
− | The PLS output is toggled at 10 mm or 70 mm after the start position or before the target position, depending on PLSRelatedTo. | + | The PLS output is toggled at 10 mm or 70 mm after the start position or before the target position, depending on PLSRelatedTo. |
+ | | ||
<syntaxhighlight lang="vb"> | <syntaxhighlight lang="vb"> | ||
Line 23: | Line 24: | ||
P3.PLSPosition[2] = 70 | P3.PLSPosition[2] = 70 | ||
P3.PLSRelatedTo = 0 | P3.PLSRelatedTo = 0 | ||
+ | Attach GXY | ||
GXY.PLSSource = PathLength | GXY.PLSSource = PathLength | ||
GXY.en = 1 | GXY.en = 1 | ||
Line 29: | Line 31: | ||
MOVES {0,100} WithPLS = P2 | MOVES {0,100} WithPLS = P2 | ||
MOVES {0,0} WithPLS = P3 | MOVES {0,0} WithPLS = P3 | ||
− | + | End With | |
+ | Detach GXY | ||
End program | End program | ||
Line 35: | Line 38: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | [[ | + | [[File:Path pls example6 2.png|RTENOTITLE]] |
+ | |||
+ | [[Category:Pages with broken file links]] |
Latest revision as of 11:46, 18 April 2019
This program uses two positions, which are distanced equally from the start and the end of the motion, as PLS positions. The PLS output is toggled at 10 mm or 70 mm after the start position or before the target position, depending on PLSRelatedTo.
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 P1 2
CreatePLSData P2 2
CreatePLSData P3 2
P1.PLSPosition[1] = 10
P1.PLSPosition[2] = 70
P1.PLSRelatedTo = 0
P2.PLSPosition[1] = 10
P2.PLSPosition[2] = 70
P2.PLSRelatedTo = 1
P3.PLSPosition[1] = 10
P3.PLSPosition[2] = 70
P3.PLSRelatedTo = 0
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