<< Prev        Next >>

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 largest value in the specified mathematical expression as double precision type 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 spline 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	'Meaurement start time
	Wait CurPathPoint >= 1	'Waiting for spline 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

<< Prev        Next >>