TargetOK Method
Description
Returns a status indicating whether or not the PTP (Point to Point) motion from the current position to a target position is possible.
Syntax
Function TargetOK (PointNumber As Integer) As Boolean
Function TargetOK (Point As SpelPoint) As Boolean
Function TargetOK (PointExpr As String) As Boolean
Parameters
Each syntax has one parameter that specifies the target point to check.
- PointNumber
Specifies the end point using the point number of a previously taught point in the Controller’s point memory for the current robot.
Point Specifies the end point using the SpelPoint data type. - PointExpr
Specifies the end point using a string expression.
Return Value
True if the target can be moved to from the current position, False if not.
Remarks
If an error occurs and the ErrorNumber property of the SpelException is 3101, see the remarks in the SetPoint method.
See Also
Go Method, Jump Method, Move Method, TGo Method, TMove Method, SetPoint Method
TargetOK Example
VB Example:
If m_spel.TargetOK("P1 /F") Then
m_spel.Go("P1 /F")
End If
C# Example:
if (m_spel.TargetOK("P1 /F"))
m_spel.Go("P1 /F");