TaskGetJointTarget Method |
Namespace: ABB.Robotics.Controllers.RapidDomain
public JointTarget GetJointTarget()
Exception | Condition |
---|---|
InvalidOperationException | The task is not a motiontask, i.e. no mechanical unit is connected to this task. |
GeneralException | A General Exception has occurred. |
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; }