SetPoint Method
Description
Sets the coordinate data for a point for the current robot.
Syntax
Sub SetPoint(PointNumber As Integer, Point As SpelPoint)
Sub SetPoint(PointLabel As String, Point As SpelPoint)
Sub SetPoint(PointNumber As Integer, X As Single, Y As Single, Z As Single, U As Single)
Sub SetPoint(PointLabel As String, X As Single, Y As Single, Z As Single, U As Single)
Sub SetPoint(PointNumber As Integer, X As Single, Y As Single, Z As Single, U As Single,Local As Integer, Hand As SpelHand)
Sub SetPoint(PointLabel As String, X As Single, Y As Single, Z As Single, U As Single,Local As Integer, Hand As SpelHand)
Sub SetPoint(PointNumber As Integer, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single)
Sub SetPoint(PointLabel As String, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single)
Sub SetPoint(PointNumber As Integer, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single, Local As Integer, Hand As SpelHand, Elbow As SpelElbow, Wrist As SpelWrist, J4Flag As Integer, J6Flag As Integer)
Sub SetPoint(PointLabel As String, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single, Local As Integer, Hand As SpelHand, Elbow As SpelElbow, Wrist As SpelWrist, J4Flag As Integer, J6Flag As Integer)
Sub SetPoint(PointNumber As Integer, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single, S As Single, T As Single)
Sub SetPoint(PointLabel As String, X As Single, Y As Single, Z As Single, U As Single,V As Single, W As Single, S As Single, T As Single)
Sub SetPoint(PointNumber As Integer, PointExpr As String)
Sub SetPoint(PointLabel As String, PointExpr As String)
Parameters
- PointNumber
An integer expression that specifies the point number of a point in the current robot’s point memory. - X
The X coordinate for the specified point. - Y
The Y coordinate for the specified point. - Z
The Z coordinate for the specified point. - U
The U coordinate for the specified point. - V
The V coordinate for the specified point. - W
The W coordinate for the specified point. - S
The S coordinate for the specified point. - T
The T coordinate for the specified point. - Local
The Local Number for the specified point. Use 0 when there is no local. - Hand
The hand orientation at the specified point. - Elbow
The elbow orientation at the specified point. - Wrist
The wrist orientation at the specified point. - PointExpr
Specifies a point using a string expression.
Note
Do not enter integer values to X, Y, Z, U, V, W, S, and T parameters. Use Single variables or directly enter Single type values.
Remarks
If an error occurs and the ErrorNumber property of the SpelException is 3101, do one of the following:
- In Windows, go to [Control Panel] - [Clock and Region] - [Region] - [Formats] - [Additional settings] and change [Decimal symbol] to ".". Then start your .NET application.
- Before calling the SetPoint method in your .NET application, set the CurrentCulture property of the System.Globalization.CultureInfo class to a CultureInfo instance with the decimal separator set to ".". If necessary, set the CurrentCulture property back to its original setting after the SetPoint method call.
CurrentCulture setting example (C#):
// CurrentCulture Save the original settings of the properties
var ciOrg = CultureInfo.CurrentCulture;
try
{
// Duplicate a new setting from the original and set the decimal separator with NumberFormat.NumberDecimalSeparator
var ciNew = (CultureInfo)ciOrg.Clone();
ciNew.NumberFormat.NumberDecimalSeparator = ".";
// CurrentCulture Set the duplicated property to the property
CultureInfo.CurrentCulture = ciNew;
// Call the SetPoint method
m_spel.SetPoint(1, pt);
}
finally
{
// Reset CurrentCulture
CultureInfo.CurrentCulture = ciOrg;
}
See Also
GetPoint Method, LoadPoints Method, SavePoints Method
SetPoint Example
Example of RC + project SPEL + program to run:
Global Integer P_WorkDetect
Global Real offsetX, offsetY, heightZ, offsetU
Function SetOffset
P_WorkDetect = 5
offsetX = 0.5
offsetY = 0.3
heightZ = 10.0
offsetU = 1.2
Fend
VB Example:
Dim pt As SpelPoint
' Get coordinates of P1
pt = m_spel.GetPoint(1)
' Set it with changes
pt.U = pt.U - 10.5
’ Specify orientation flag
pt.J1Flag = 1
m_spel.SetPoint(1, pt)
’ Run RC + project SPEL + function
m_spel.Call("SetOffset")
’ Set coordinates and orientation using string expressions
m_spel.SetPoint(2, "P(P_WorkDetect) +X(offsetX) +Y(offsetY) :Z(heightZ) +U (offsetU) /A /J1F1")
C# Example:
SpelPoint pt;
// Get coordinates of P1
pt = m_spel.GetPoint(1);
// Set it with changes
pt.U = pt.U - 10.5;
// Specify orientation flag
pt.J1Flag = 1;
m_spel.SetPoint(1, pt);
// Run RC + project SPEL + function
m_spel.Call("SetOffset")
// Set coordinates and orientation using string expressions
m_spel.SetPoint(2, "P(P_WorkDetect) +X(offsetX) +Y(offsetY) :Z(heightZ) +U (offsetU) /A /J1F1");