VGetRobotPlacePos 方法

描述
检索机器人放置位置。

语法
Sub VGetRobotPlacePos (Sequence As String, Object As String, Result As Integer, ByRef Found As Boolean, ByRef PlacePointAs SpelPoint)

参数

  • Sequence
    含有当前项目中视觉序列名称的字符串表达式。
  • Object
    含有序列 Sequence 中对象名称的字符串表达式。
  • Result
    表示结果编号的整数表达式。
  • Found
    包含 boolean 查找状态的整数变量。如果 found 为 false,则不会定义W、Y、U。
  • PlacePoint
    含有放置位置的 SpelPoint 变量。

参阅
VGetRobotPlaceTargetPos 方法, VSetRobotPlaceTargetPos 方法

VGetRobotPlacePos 示例
VB 例:

Dim found As Integer  
Dim x As Single, y As Single, u As Single  
Dim seq As String, blob As String  
Dim placePoint As SpelPoint  
  
seq = "testSeq"  
blob = "blob01"  
' 将工件向上移动到摄像机上方  
m_spel.Jump("camPos")  
m_spel.VRun(seq)  
m_spel.VGetRobotPlacePos(seq, blob, 1, found, placePoint)  
' 使用 SCARA 时使用 +TLZ 结束  
m_spel.Jump(placePoint, "+TLZ(10)")  
m_spel.Go(placePoint)  

C# 例:

bool found;  
float x, y, u;  
string seq, blob;  
SpelPoint placePoint = new SpelPoint();  
seq = "testSeq";  
blob = "blob01";  
  
// 将工件向上移动到摄像机上方  
m_spel.Jump("camPos");  
m_spel.VRun(seq);  
m_spel.VGetRobotPlacePos(seq,blob,1,out found, out placePoint);  
// 使用 SCARA 时使用 +TLZ 结束  
m_spel.Jump(placePoint, "+TLZ(10)");  
m_spel.Go(placePoint);