<< 向前        下一页 >>

ID : 4947

CurPathPoint

功能

返回最近通过的路径点编号。

格式

CurPathPoint[(模式)]

指定项目

模式
使用整数型数据指定模式。可省略。

返回值

使用整数型数据返回最近通过的路径点编号。

解说

返回最近通过的路径点编号。

模式

指定通过“指令值”或“编码值”进行通过判断。

自变量 内容
0 指令值
1(省略时) 编码器值

注意事项

如果登录的路径数据中相邻路径点的位置和姿势非常接近,则后面的路径点将不能反映至轨道,且不能成为通过CurPathPoint得到的的返回值。

应用示例

<MoveSpline.pcs>

进行自由曲线插补动作的程序

Sub Main
	TakeArm
	Run SplineMonitor
	Move S, 1
End Sub

<SplineMonitor.pcs>

输出区间时间的程序

Sub Main
	Dim n As Integer	' 计数器
	Dim aaa As Integer	'测定开始时间
	Wait CurPathPoint &gt;= 1	'等待自由曲线插补动作
	aaa = Timer
	n = 2
	Do
		If CurPathPoint = 0 Then Exit Do
		Wait CurPathPoint &gt;= n
		PrintDbg &quot;区间&quot; &amp; (CurPathPoint - 1), (Timer - aaa) &amp; &quot;ms&quot;
		aaa = Timer
		n = CurPathPoint + 1
	Loop
End Sub

ID : 4947

<< 向前        下一页 >>