Click or drag to resize

TaskEnabled Property

Gets or sets a value indicating if the task will start when RAPID execution is started.

Namespace:  ABB.Robotics.Controllers.RapidDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public bool Enabled { get; set; }

Property Value

Type: Boolean
true if task will start with execution, else false.
Exceptions
ExceptionCondition
UasRejectExceptionThe current user does not have Grant to perform the operation.
MasterRejectExceptionMastership could not be obtained to perform the operation.
ModeRejectExceptionOperation not allowed in ControllerOperatingMode.Auto
ExecutionStateExceptionOperation is illegal in current execution state
RejectExceptionOperation was rejected by the controller safety access restriction mechanism
RapidDataFormatExceptionTask is not defined in TaskPanel
InvalidOperationExceptionTaskpanel is disabled on the controller
InvalidOperationExceptionOperation is not allowed when tasks are in synchronized state
InvalidOperationExceptionOperation is not possible until the current movement is completed
Remarks
Grant UAS_RAPID_RESTART is required to set Enabled state.
Examples
This example enables task T_ROB1
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
public void EnableTRob1()
{
       try
       {
        EnableTask("T_ROB1");
    }
       catch (System.Exception se)
    {
        // Exception handling
    }
}

private void EnableTask(string taskName)
{
    Controller c = null;
    Task t = null;
    try
    {
        c = new Controller();
        if(c == null)
        {
            // Error handling
        }

        t = c.Rapid.GetTask(taskName);
        if(t == null)
        {
            // Error handling
        }

        if (t.Enabled == false)
            t.Enabled = true;
    }
    catch (System.Exception se)
    {
        // Exception handling
    }
    finally
    {
        // Dispose of all temporary resources
        if (t != null)
            t.Dispose();
        t = null;

        if (c != null)
            c.Dispose();
        c = null;
    }
}
...
See Also