Class Task
This class represents a RAPID Task.
Inherited Members
Namespace: ABB.Robotics.Controllers.RapidDomain
Assembly: ABB.Robotics.Controllers.PC.dll
Syntax
public sealed class Task : SDKControllerBoundBase, IComparable, IDisposable, IRapidSymbol, INamedObject
Properties
Cycle
Get/Sets execution cycle.
Declaration
public ExecutionCycle Cycle { get; set; }
Property Value
| Type | Description |
|---|---|
| ExecutionCycle |
Enabled
Gets or sets the Enabled state of the Task. 'Enabled' is also referred to as activated/deactivated in the user interface. Returns true if the task is activated in the task selection panel and will react to start requests. Returns false if the task is deactivated and will not react to start requests.
The Enabled state can only be changed by a local controller client and is not allowed by remote clients.
RobotStudio connects to virtual controllers, that belongs to a station, as a local client. In all other scenarios, only the FlexPendant is connected as a local client. Other clients are remote.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The Enabled state can only be changed by a local controller client and is not allowed by remote clients.
Set requires controller to be in auto mode. Requires Mastership.
Exceptions
| Type | Condition |
|---|---|
| ModeRejectException |
See Also
ExecutionStatus
Gets the execution status of the task.
Declaration
public TaskExecutionStatus ExecutionStatus { get; }
Property Value
| Type | Description |
|---|---|
| TaskExecutionStatus |
ExecutionType
Gets the current execution type.
Declaration
public ExecutionType ExecutionType { get; }
Property Value
| Type | Description |
|---|---|
| ExecutionType |
Motion
Returns true if task is a motion task.
Declaration
public bool Motion { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MotionPointer
Gets the current position of the motion pointer.
Declaration
public ProgramPosition MotionPointer { get; }
Property Value
| Type | Description |
|---|---|
| ProgramPosition |
ProgramPointer
Gets the current position of the program pointer.
Declaration
public ProgramPosition ProgramPointer { get; }
Property Value
| Type | Description |
|---|---|
| ProgramPosition |
RemainingCycles
Gets/Sets the remaining cycle counter.
Declaration
public int RemainingCycles { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
TaskType
Gets the task type, i.e. Normal, Static or Semi-static.
Declaration
public TaskType TaskType { get; }
Property Value
| Type | Description |
|---|---|
| TaskType |
Type
Gets the kind of symbol, i.e. Record, Persistent, Constant, Parameter, Trap, Task etc.
Declaration
public SymbolTypes Type { get; }
Property Value
| Type | Description |
|---|---|
| SymbolTypes |
Methods
CheckProgram()
Checks the modules in the task for syntactic and semantic errors
Declaration
public CheckProgramResult CheckProgram()
Returns
| Type | Description |
|---|---|
| CheckProgramResult |
DeleteModule(String)
Delete a RAPID module from the task in the robot controller.
Declaration
public void DeleteModule(string moduleName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | moduleName | The name of the RAPID module to delete. |
Remarks
Requires mastership of RAPID domain.
DeleteProgram()
Deletes the RAPID program of the task from the controller program memory.
Declaration
public void DeleteProgram()
Remarks
All program modules of the task will be deleted from program memory. If they have been saved they will however remain in the controller file system.
Requires mastership of RAPID domain.
Requires the LoadRapidProgram grant.
Use DeleteProgram(Int32)if you want to load another program directly after the deletion.
DeleteProgram(Int32)
Deletes the RAPID program of the task from the controller program memory. Returns as soon as the execution of the RESET event routine is ready.
Declaration
public void DeleteProgram(int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | timeout | Milliseconds used as timeout. |
Remarks
THIS METHOD ONLY WORKS WITH RW 5.12 AND LATER!
All program modules of the task will be deleted from program memory. If they have been saved they will however remain in the controller file system.
Requires mastership of RAPID domain.
Requires the LoadRapidProgram grant.
When a RAPID program has been deleted the controller program server executes a RESET event routine a short while. This method returns as soon as the program server is ready to load another RAPID program.
Exceptions
| Type | Condition |
|---|---|
| TimeoutException | The method did not finish within the specified time limit. |
GetJointTarget()
Get JointTarget from task.
Declaration
public JointTarget GetJointTarget()
Returns
| Type | Description |
|---|---|
| JointTarget | JointTarget object JointTarget. |
GetModule(String)
Returns the requested module.
Declaration
public Module GetModule(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of module. |
Returns
| Type | Description |
|---|---|
| Module | Module. |
GetModules()
Returns the modules defined in the task.
Declaration
public Module[] GetModules()
Returns
| Type | Description |
|---|---|
| Module[] | A Module array. |
GetRapidData(RapidSymbol)
Gets a RapidData object from a RapidSymbol.
Declaration
public RapidData GetRapidData(RapidSymbol symbol)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbol | symbol | Symbol to get data for. |
Returns
| Type | Description |
|---|---|
| RapidData | RapidData object. |
GetRapidData(String[])
Gets a RapidData object that references a RAPID data instance in the robot controller.
Declaration
public RapidData GetRapidData(params string[] rapidData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | rapidData | An array of strings, which specifies where in the RAPID domain the RAPID data is declared. |
Returns
| Type | Description |
|---|---|
| RapidData | A RapidData object. If the RAPID data doesn't exist null is returned. |
Remarks
If you do not know the name of the module where the data is declared SearchRapidSymbol(...) can be used.
To access RAPID data in a shared module just send the name of the data as parameter, see the second example below.
NOTE! RAPID data declared in a - Hidden or -Shared -Hidden module cannot be accessed.
Examples
This example utilizes a function that returns the sum of all reg1 variables in the system. Variable reg1 is by default declared in the RAPID module USER.
private int SumOfAllReg1(Controller c)
{
int result = 0;
try
{
// Get all tasks
Task[] tasks = _controller.Rapid.GetTasks();
foreach (Task t in tasks)
{
RapidData rdReg1 = t.GetRapidData("user", "reg1");
result += int.Parse(rdReg1.Value.ToString());
}
}
catch (ABB.Robotics.Controllers.RapidDomain.RapidModuleNotFoundException ee)
{
// TODO: Add error handling
}
catch (ABB.Robotics.Controllers.RapidDomain.RapidSymbolNotFoundException ee)
{
// TODO: Add error handling
}
catch (GeneralException ee)
{
// TODO: Add error handling
}
catch (System.Exception ee)
{
// TODO: Add error handling
}
finally
{
// Release resources
}
return result;
}
This example gets the shared RAPID data nMessageID seen from task T_ROB1.
private RapidData GetMessageID()
{
RapidData rData = null;
Task tRob1 = null;
try
{
// Create temporary controller object to get task
using (Controller c = new Controller())
{
tRob1 = c.Rapid.GetTask("T_ROB1");
if (tRob1 != null)
{
rData = tRob1.GetRapidData("nMessageID");
}
}
}
catch (GeneralException ee)
{
// TODO: Add error handling
}
catch (System.Exception ee)
{
// TODO: Add error handling
}
finally
{
// Release temporary resources
if (tRob1 != null)
{
tRob1.Dispose();
tRob1 = null;
}
}
return rData;
}
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | rapidData is null or length is less then 1 |
GetRobTarget()
Gets the current position (as a robtarget using current tool and work object).
Declaration
public RobTarget GetRobTarget()
Returns
| Type | Description |
|---|---|
| RobTarget | RobTarget object RobTarget. |
Examples
This is how to get the current RobTarget of all tasks.
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
Controller c = new Controller();
Task[] allTasks = c.Rapid.GetTasks();
foreach (Task t in allTasks)
{
if (t.Name.Contains("T_ROB"))
{
RobTarget rt = t.GetRobTarget();
Console.WriteLine("RobTarget: {0}", rt.ToString());
}
}
GetRobTarget(String, String)
Gets RobTarget of the task using the specified tool and work object.
Declaration
public RobTarget GetRobTarget(string tool, string workobject)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | tool | Tool |
| System.String | workobject | Work object |
Returns
| Type | Description |
|---|---|
| RobTarget | RobTarget object RobTarget. |
LoadModuleFromFile(String, RapidLoadMode)
Loads a RAPID module to the task in the robot controller.
Declaration
public bool LoadModuleFromFile(string filePath, RapidLoadMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Path to the file containing the RAPID module. Valid extensions for a RAPID module file are .mod and .sys. For RW >= 7.1 .modx and .sysx are also valid. |
| RapidLoadMode | mode | Specifies the RapidLoadMode of the operation. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if loading succeeds without any errors, otherwise false. |
Remarks
Requires mastership of RAPID domain. Requires the LoadRapidProgram grant.
LoadProgramFromFile(String, RapidLoadMode)
Loads a RAPID program to the controller program memory
Declaration
public bool LoadProgramFromFile(string filePath, RapidLoadMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Path to the file containing the RAPID program. Valid extension for a RAPID program file is .pgf. |
| RapidLoadMode | mode | Specifies the RapidLoadMode of the operation. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if loading succeeds without any build errors, otherwise false. |
Remarks
Requires mastership of RAPID domain.
Requires the LoadRapidProgramgrant.
Use LoadProgramFromFile(String, RapidLoadMode, Int32) if you need to make another call to the RAPID program server, eg. Start() , directly after having loaded the program.
LoadProgramFromFile(String, RapidLoadMode, Int32)
Loads a RAPID program to the controller program memory. Returns as soon as the execution of the RAPID RESET event routine is ready.
Declaration
public bool LoadProgramFromFile(string filePath, RapidLoadMode mode, int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Path to the file containing the RAPID program. Valid extension for a RAPID program file is .pgf. |
| RapidLoadMode | mode | Specifies the RapidLoadMode of the operation. |
| System.Int32 | timeout | Milliseconds used as timeout. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if loading succeeds without any build errors, otherwise false. |
Remarks
THIS METHOD ONLY WORKS WITH RW 5.12 AND LATER!
Requires mastership of RAPID domain.
Requires the LoadRapidProgram grant.
The program server will be busy executing a RAPID event routine a short while after the program has been loaded. This method returns as soon as the controller program server is ready for another call.
Exceptions
| Type | Condition |
|---|---|
| TimeoutException | The method did not finish within the specified time limit. |
ResetProgramPointer()
Resets the program pointer of this task to the main entry point.
Declaration
public void ResetProgramPointer()
Remarks
Requires mastership of RAPID domain. Requires the ExecuteRapid grant. Requires Auto mode.
SaveProgramToFile(String)
Saves the current RAPID program at the specified path.
Declaration
public void SaveProgramToFile(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Controller path to save program at. |
Remarks
Requires the BackupController grant.
SearchRapidSymbol(RapidSymbolSearchProperties)
General RapidSymbol search method. Searches the task for symbols that match the specified criteria.
Declaration
public RapidSymbol[] SearchRapidSymbol(RapidSymbolSearchProperties searchProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbolSearchProperties | searchProperties | Properties for search. |
Returns
| Type | Description |
|---|---|
| RapidSymbol[] | All matching symbols. |
SearchRapidSymbol(RapidSymbolSearchProperties, RapidDataType)
Searches the task for RapidSymbol of the specified data type.
Declaration
public RapidSymbol[] SearchRapidSymbol(RapidSymbolSearchProperties searchProperties, RapidDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbolSearchProperties | searchProperties | Search properties. |
| RapidDataType | type | Data type to match. |
Returns
| Type | Description |
|---|---|
| RapidSymbol[] | All matching symbols. |
SearchRapidSymbol(RapidSymbolSearchProperties, RapidDataType, String)
General RapidSymbol search method. Searches the task for symbols that match the specified criteria.
Declaration
public RapidSymbol[] SearchRapidSymbol(RapidSymbolSearchProperties searchProperties, RapidDataType type, string searchExpression)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbolSearchProperties | searchProperties | Search properties. |
| RapidDataType | type | The data type to search for. |
| System.String | searchExpression | Expression used to match search, regular expression. |
Returns
| Type | Description |
|---|---|
| RapidSymbol[] | All matching symbols. |
SearchRapidSymbol(RapidSymbolSearchProperties, String)
General RapidSymbol search method. Searches the task for symbols that match the specified criteria.
Declaration
public RapidSymbol[] SearchRapidSymbol(RapidSymbolSearchProperties searchProperties, string searchExpression)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbolSearchProperties | searchProperties | Search properties. |
| System.String | searchExpression | Expression used to match search, regular expression. |
Returns
| Type | Description |
|---|---|
| RapidSymbol[] | All matching symbols. |
SearchRapidSymbol(RapidSymbolSearchProperties, String, String)
General RapidSymbol search method. Searches the task for symbols that match the specified criteria.
Declaration
public RapidSymbol[] SearchRapidSymbol(RapidSymbolSearchProperties searchProperties, string dataType, string searchExpression)
Parameters
| Type | Name | Description |
|---|---|---|
| RapidSymbolSearchProperties | searchProperties | Instance of RapidSymbolSearchProperties ,which defines the search criteria. |
| System.String | dataType | Name of the data type to search for. Use string.Empty if not of interest. |
| System.String | searchExpression | The regular expression to search for. Use string.Empty if not of interest. |
Returns
| Type | Description |
|---|---|
| RapidSymbol[] | An array of matching RapidSymbol. If none is found an array of length zero is returned. |
Remarks
To search data in Shared module, set RapidSymbolSearchProperties.SearchMethod to SymbolSearchMethod.Scope. See the second example below.
NOTE! RAPID data declared in a - Hidden or -Shared -Hidden module cannot be found.
Examples
This example lists all functions and RAPID data instances of type num declared in task T_ROB1. The name of RapidSymbol and the module where it is declared are added to a listview.
private void btnSearch_Click(object sender,EventArgs e)
{
try
{
Task task = _controller.Rapid.GetTask("T_ROB1");
RapidSymbolSearchProperties sProp =
RapidSymbolSearchProperties.CreateDefault();
sProp.Types = SymbolTypes.Function | SymbolTypes.Data;
sProp.InUse = false;
sProp.Recursive = true;
sProp.SearchMethod = SymbolSearchMethod.Block;
RapidSymbol[] datas = task.SearchRapidSymbol(sProp, "num", string.Empty);
foreach (RapidSymbol rs in datas)
{
ListViewItem li = new ListViewItem(rs.Name);
li.SubItems.Add(rs.Scope[1]);
// Add item
listView1.Items.Add(li);
}
}
catch (System.Exception ee)
{
// Handle any error here
}
}
This example shows a simple search method that finds declared data of the type defined by the parameter sDataType. The parameter bSystem determines the scope to search. The search is made from task T_ROB1.
private RapidSymbol[] GetSymbols(string stDataType, bool bSystem)
{
RapidSymbol[] result = new RapidSymbol[0];
Task tRob1 = null;
try
{
// Create temporary controller object to get task
using (Controller c = new Controller())
{
tRob1 = c.Rapid.GetTask("T_ROB1");
if (tRob1 != null)
{
RapidSymbolSearchProperties sProps = RapidSymbolSearchProperties.CreateDefault();
// Setup sProps according to parameter bSystem
if (bSystem == true)
{
// Search data that the task can see in System scope, e.g. Shared data
sProps.GlobalSymbols = true;
sProps.InUse = false;
sProps.LocalSymbols = false;
sProps.Recursive = false;
sProps.SearchMethod = SymbolSearchMethod.Scope;
sProps.Types = SymbolTypes.Data;
}
else
{
// Search Task scope
sProps.Types = SymbolTypes.Data;
sProps.InUse = false;
sProps.SearchMethod = SymbolSearchMethod.Block;
}
// Perform the search
result = tRob1.SearchRapidSymbol(sProps, stDataType, string.Empty);
}
else
{
// No task to search from
}
}
}
catch (GeneralException ee)
{
// TODO: Add error handling
}
catch (System.Exception ee)
{
// TODO: Add error handling
}
finally
{
// Release temporary resources
if (tRob1 != null)
{
tRob1.Dispose();
tRob1 = null;
}
}
return result;
}
SetProgramPointer(ProgramPosition)
Sets program pointer to a position in a RAPID module.
Declaration
public void SetProgramPointer(ProgramPosition pos)
Parameters
| Type | Name | Description |
|---|---|---|
| ProgramPosition | pos | A program position |
Remarks
Any previous execution stack will be cleared.
Requires mastership of Rapid domain.
Requires automatic mode.
Examples
This example sets the program position to 20th row to the routine "MyRoutine" in the module "MyModule".
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
try
{
Controller controller = new Controller();
Task[] tasks = c.Rapid.GetTasks();
if (controller.OperatingMode == ControllerOperatingMode.Auto)
{
using (Mastership rapid = Controllers.Mastership.Request(controller.Rapid))
{
ProgramPosition pos = new ProgramPosition("MyModule", "MyRoutine", new TextRange(20));
tasks[0].SetProgramPointer(pos);
}
}
else
{
MessageBox.Show("Setting the program pointer is not allowed in manual mode from a remote client.");
}
}
catch (System.InvalidOperationException ex)
{
MessageBox.Show("Mastership is held by another client.");
}
catch (System.Exception ex)
{
//TODO: Add error handling
}
}
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Program Pointer is not set because parameter may be invalid. |
| System.InvalidOperationException | Mastership is held by another client. |
SetProgramPointer(String, Int32)
Sets program pointer to a specific row in a RAPID module.
Declaration
public void SetProgramPointer(string module, int row)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | module | The name of the module where program pointer should be set. |
| System.Int32 | row | The row number in this module. |
Remarks
Set program pointer to another row in the current routine and also to set program pointer to a row in a different routine.
Any previous execution stack will be cleared.
Requires mastership of Rapid domain.
Requires automatic mode.
Examples
This example sets the program pointer to 20th row of the module "MyModule"
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
try
{
Controller controller = new Controller();
Task[] tasks = c.Rapid.GetTasks();
if (controller.OperatingMode == ControllerOperatingMode.Auto)
{
using (Mastership rapid = Controllers.Mastership.Request(controller.Rapid))
{
tasks[0].SetProgramPointer("MyModule",20);
}
}
else
{
MessageBox.Show("Setting the program pointer is not allowed in manual mode from a remote client.");
}
}
catch (System.InvalidOperationException ex)
{
MessageBox.Show("Mastership is held by another client.");
}
catch (System.Exception ex)
{
//TODO: Add error handling
}
}
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | program pointer is not set because one or both parameters are wrong. |
| System.InvalidOperationException | Mastership is held by another client. |
SetProgramPointer(String, String)
Sets program pointer to the first instruction of a routine (global or local).
Declaration
public void SetProgramPointer(string module, string routine)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | module | The name of the module in which the routine is defined. |
| System.String | routine | The name of the routine to which program pointer will be set. |
Remarks
Any previous execution stack will be cleared.
Requires mastership of Rapid domain.
Requires automatic mode.
Examples
This example sets the program pointer to the routine "MyRoutine" in "MyModule".
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
try
{
Controller controller = new Controller();
Task[] tasks = c.Rapid.GetTasks();
if (controller.OperatingMode == ControllerOperatingMode.Auto)
{
using (Mastership rapid = Controllers.Mastership.Request(controller.Rapid))
{
tasks[0].SetProgramPointer("MyModule", "MyRoutine");
}
}
else
{
MessageBox.Show("Setting the program pointer is not allowed in manual mode from a remote client.");
}
}
catch (System.InvalidOperationException ex)
{
MessageBox.Show("Mastership is held by another client.");
}
catch (System.Exception ex)
{
//TODO: Add error handling
}
}
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Program pointer is not set because one or both parameters are wrong. |
| System.InvalidOperationException | Mastership is held by another client. |
Start()
Starts RAPID program execution. Use Start(Boolean) to get an exception if the start fails.
Declaration
public StartResult Start()
Returns
| Type | Description |
|---|---|
| StartResult | Start result. No exception is thrown if start of execution fails. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Start(RegainMode, ExecutionMode)
Starts RAPID program execution.
Declaration
public StartResult Start(RegainMode regain, ExecutionMode execution)
Parameters
| Type | Name | Description |
|---|---|---|
| RegainMode | regain | Regain mode. |
| ExecutionMode | execution | Execution mode. |
Returns
| Type | Description |
|---|---|
| StartResult | Start result. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Start(RegainMode, ExecutionMode, ExecutionCycle)
Starts RAPID program execution
Declaration
public StartResult Start(RegainMode regain, ExecutionMode execution, ExecutionCycle cycle)
Parameters
| Type | Name | Description |
|---|---|---|
| RegainMode | regain | Regain mode. |
| ExecutionMode | execution | Execution mode. |
| ExecutionCycle | cycle | The number of cycles to execute the program. |
Returns
| Type | Description |
|---|---|
| StartResult | Start result. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Start(RegainMode, ExecutionMode, ExecutionCycle, StartCheck)
Starts RAPID program execution.
Declaration
public StartResult Start(RegainMode regain, ExecutionMode execution, ExecutionCycle cycle, StartCheck check)
Parameters
| Type | Name | Description |
|---|---|---|
| RegainMode | regain | Regain mode. |
| ExecutionMode | execution | Execution mode. |
| ExecutionCycle | cycle | The number of cycles to execute the program. |
| StartCheck | check | Check to perform prior to start. |
Returns
| Type | Description |
|---|---|
| StartResult | Start result. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Start(RegainMode, ExecutionMode, ExecutionCycle, StartCheck, Boolean)
Starts RAPID program execution.
Declaration
public StartResult Start(RegainMode regain, ExecutionMode execution, ExecutionCycle cycle, StartCheck check, bool throwOnError)
Parameters
| Type | Name | Description |
|---|---|---|
| RegainMode | regain | Regain mode. |
| ExecutionMode | execution | Execution mode. |
| ExecutionCycle | cycle | The number of cycles to execute the program. |
| StartCheck | check | Check to perform prior to start. |
| System.Boolean | throwOnError | True to get exception instead of just Error for "unmapped" start results. |
Returns
| Type | Description |
|---|---|
| StartResult | Start result. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Start(Boolean)
Starts RAPID program execution.
Declaration
public StartResult Start(bool throwOnError)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | throwOnError | True to get exception instead of just Error for "unmapped" start results. |
Returns
| Type | Description |
|---|---|
| StartResult | Start result. |
Remarks
Requires mastership of Rapid domain. Requires ExecuteRapid grant. Requires Auto mode. This method is no longer supported from RobotWare 5.60.
Stop()
Stops execution after next Cycle.
Declaration
public void Stop()
Stop(StopMode)
Stops execution.
Declaration
public void Stop(StopMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| StopMode | mode | Stop mode to use. |
UnloadProgram()
Deletes the RAPID program of the task from the controller program memory.
Declaration
[Obsolete("Use DeleteProgram()")]
public void UnloadProgram()
Remarks
All program modules of the task will be deleted from program memory. If they have been saved they will however remain in the controller file system.
Requires auto mode. Requires mastership of RAPID domain.
Requires the LoadRapidProgram grant.
If another program is to be loaded after the deletion you may need to use a short delay, as the controller program server must finish a RAPID event routine before it can do anything else.
Events
MotionPointerChanged
This event is raised when the motion pointer changes.
Declaration
public event EventHandler<ProgramPositionEventArgs> MotionPointerChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<ProgramPositionEventArgs> |
ProgramPointerChanged
This event is raised when the program pointer changes.
Declaration
public event EventHandler<ProgramPositionEventArgs> ProgramPointerChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<ProgramPositionEventArgs> |