<< Prev        Next >>

ID : 4947

CurPathPoint

Function

Returns the most recently passed path point number.

Syntax

CurPathPoint[(mode)]

Guaranteed Entry

Mode
Designate a mode as integer type data. This can be omitted.

Return Value

Returns the most recently passed path point number as integer data.

Description

Returns the most recently passed path point number.

About Modes

Specifies whether to judge the passage by the "command value" or "encoder value."

Argument Content
0 Command value
1 (default) Encoder value

Attention

If the position and posture of adjacent path points are very close to each other in the registered path data, the latter path point is not reflected in the path and will not be the return value of CurPathPoint.

Example

<MoveSpline.pcs>

Program performing free curve interpolation motion

Sub Main
	TakeArm
	Run SplineMonitor
	Move S, 1
End Sub

<SplineMonitor.pcs>

Program outputting the block time

Sub Main
	Dim n As Integer	'Counter
	Dim aaa As Integer	'Measurement start time
	Wait CurPathPoint >= 1	'Waiting for free curve interpolation motion
	aaa = Timer
	n = 2
	Do
		If CurPathPoint = 0 Then Exit Do
		Wait CurPathPoint >= n
		PrintDbg "Block" & (CurPathPoint - 1), (Timer - aaa) & "ms"
		aaa = Timer
		n = CurPathPoint + 1
	Loop
End Sub

ID : 4947

<< Prev        Next >>