TeachPoint Method

Description
Runs a dialog that allows an operator to jog and teach one point.

Syntax
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

Parameters

  • PointFile
    A character string indicating the point file name.
  • PointNumber
    Point number to be taught
  • PointName
    A character string indicating the point label
  • Prompt
    A character string indicating the instructional text that is displayed at the bottom of the teach dialog.
  • Parent
    Optional. A .NET form that is the parent of the window.

Return Value
Returns True if the operator clicked the Teach button, False if the operator clicked Cancel.

Remarks
Use TeachPoints to allow an operator to teach one robot point in the Controller. When TeachPoints is executed, the point file is loaded in the Controller. When the Teach button is clicked, the point is taught in the Controller and the point file is saved on the Controller.

TeachPoint Example
VB Example:

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# Example:

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);  
  
}