Click or drag to resize

TaskGetJointTarget Method

Get the current position for mechanical unit connected to task as JointTarget.

Namespace:  ABB.Robotics.Controllers.RapidDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public JointTarget GetJointTarget()

Return Value

Type: JointTarget
JointTarget contaning the current position for the mechanical unit connected to the task.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe task is not a motiontask, i.e. no mechanical unit is connected to this task.
GeneralExceptionA General Exception has occurred.
Examples
This example shows how to get the mechanical units, connected to the parameter task, position as JointTarget.
public JointTarget GetJointTarget(Task task)
{
  JointTarget target = JointTarget.Undefined;
  try
  {
    if (task != null)
    {
      target = task.GetJointTarget();
    }
  }
  catch //(System.Exception ex)
  {
    // Exception handling
  }

  return target;
}

This example shows how to get the mechanical units, connected to the parameter task, external axis position as ExtJoint.

public ExtJoint GetExternalAxis(Task task)
{
  ExtJoint extAx = new ExtJoint();
  try
  {
    if (task != null)
    {
      JointTarget target = task.GetJointTarget();

      extAx = target.ExtAx;
    }
  }
  catch //(System.Exception ex)
  {
    // Exception handling
  }

  return extAx;
}
See Also