TeachPoint 方法

描述
运行允许操作员步进并示教一个点的对话框。

语法
Function TeachPoint ( PointFile As String, PointNumber As Integer, Prompt As String ) As Boolean
Function TeachPoint (PointFile As String, PointName As String, Prompt As String) As Boolean
Function TeachPoint (PointFile As String, PointNumber As Integer, Prompt As String, Parent As Form) As Boolean
Function TeachPoint (PointFile As String, PointName As String, Prompt As String, Parent As Form) As Boolean

参数

  • PointFile
    含有点文件名称的字符串。
  • PointNumber
    待示教的点编号。
  • PointName
    显示点标签的字符串
  • Prompt
    含有示教对话框底部显示的指示性文本的字符串。
  • Parent
    可选。窗口的 .NET 父窗体。

返回值
如果操作员点击了示教按钮,则返回 True;如果操作员点击了取消,则返回 False。

备注
使用 TeachPoints 可允许操作员示教控制器中的一个机器人点。执行 TeachPoints 时,将从控制器加载点文件。点击 Teach 按钮时,将在控制器中示教点并将点文件保存至控制器。

TeachPoint 示例
VB 例:

Sub btnTeachPick_Click( _  
       ByVal sender As System.Object, _  
       ByVal e As System.EventArgs) _  
       Handles btnTeachPick.Click  
  
    Dim sts As Boolean  
    Dim prompt As String  
  
    prompt = "Jog to Pick position and click Teach"  
    sts = m_spel.TeachPoint("points.pts", 1, prompt)  
End Sub  

C# 例:

void btnTeachPick_Click(object sender, EventArgs e){  
    bool sts;  
    string prompt;  
  
    prompt = "Jog to Pick position and click Teach";  
    sts = m_spel.TeachPoint("points.pts", 1, prompt);  
  
}