Click or drag to resize
RsToolData Class
Tooldata is used to describe the characteristics of a tool. It corresponds to the 'tooldata' data type in RAPID.
Inheritance Hierarchy

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public sealed class RsToolData : RsDataDeclaration

The RsToolData type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleRsToolData
Initializes a new instance of the RsToolData class.
Top
Properties
  NameDescription
Public propertyAttributes
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.)
Public propertyChildren
Enumerates all child objects.
(Inherited from ProjectObject.)
Public propertyContainingProject
Returns the Project that this object is a part of, or null if it is not part of a Project.
(Inherited from ProjectObject.)
Public propertyCode exampleDataType
Gets the RAPID data type of the Data Declaration.
(Inherited from RsDataDeclaration.)
Public propertyDisplayName (Inherited from RsDataDeclaration.)
Public propertyCode exampleFrame
Gets a Transform that corresponds to the TCP of the tool.
Public propertyCode exampleFrameSize
Gets or set the size of the graphical representation of the TCP frame.
Public propertyCode exampleLoadData
Gets or sets the RsLoadData of the tool.
Public propertyLocal
Gets or sets if the DataDeclaration is declared local in a module. (Corresponds to the LOCAL keyword in RAPID).
(Inherited from RsDataDeclaration.)
Public propertyModuleName
Gets or sets the name of the RAPID module that the DataDeclaration will be synchronized to.
(Inherited from RsDataDeclaration.)
Public propertyName
Gets or sets the name of the object
(Overrides RsDataDeclarationName.)
Public propertyParent
Returns the objects parent, if it has one.
(Inherited from ProjectObject.)
Public propertyCode exampleRobotHold
Gets or sets a values specifying whether or not the robot is holding the tool: True if the robot is holding the tool, false otherwise.
Public propertyCode exampleShowName
Gets or sets whether the name of the tooldata will be displayed in the graphics.
Public propertyStorageType
Gets or sets the RapidStorageType of the DataDeclaration
(Inherited from RsDataDeclaration.)
Public propertySynchronize
Gets or sets whether the DataDeclaration should be synchronized to the VC when the referencing RsPathProcedure is.
(Inherited from RsDataDeclaration.)
Public propertyTypeDisplayName
Gets a localized name for the type of this object.
(Inherited from ProjectObject.)
Public propertyUIVisible
Gets or sets a value that indicates if this object should be displayed in GUI such as an object browser.
(Inherited from ProjectObject.)
Public propertyUniqueId
Gets a persisted, globally unique identifier for this object, that can be used to find the object using the GetObjectFromUniqueId(String) method.
(Inherited from ProjectObject.)
Public propertyCode exampleVisible
Gets or set whether the TCP frame should be displayed in the graphics.
Top
Methods
  NameDescription
Public methodCopy (Overrides RsDataDeclarationCopy.)
Public methodEquals (Inherited from Object.)
Public methodFindObjects
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetReferencingInstructions
Returns all RsInstructions that are referencing this DataDeclaration.
(Inherited from RsDataDeclaration.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberIsValid Obsolete.
Public methodToString (Inherited from ProjectObject.)
Top
Examples
Create RsToolData.
RsToolData Example
Project.UndoContext.BeginUndoStep("RsToolDataExample");
try
{
    Station station = Station.ActiveStation;

    // Create a gripper tool using sample data from the RAPID manual.
    RsToolData myTool = new RsToolData();

    // Get a valid RAPID name and assign it.
    myTool.Name = station.ActiveTask.GetValidRapidName("gripper", "_", 1);

    // The robot is holding the tool.
    myTool.RobotHold = true;

    // Set the TCP, expressed in the wrist coordinate system.
    myTool.Frame.X = 0.0974;
    myTool.Frame.Y = 0;
    myTool.Frame.Z = 0.2231;
    myTool.Frame.RX = Globals.DegToRad(45);
    myTool.Frame.RY = 0;
    myTool.Frame.RZ = Globals.DegToRad(45);

    // Create the load data for the tool.
    RsLoadData myloadData = new RsLoadData();

    // Set mass.
    myloadData.Mass = 5;

    // Set center of gravity.
    myloadData.Cog = new Vector3(0.023, 0, 0.075);

    // Set the axis of moment.
    myloadData.Aom = new Quaternion(1, 0, 0, 0);

    // The load can be considered a point mass in this example, i.e. without any moment of inertia.
    myloadData.Inertia = new Vector3(0, 0, 0);

    // Att the load data to the tool.
    myTool.LoadData = myloadData;

    // Show the name of the tool data in the graphics.
    myTool.ShowName = true;

    // Set the frame size to twice its default size.
    myTool.FrameSize = myTool.FrameSize * 2;

    // Show the tool data in the graphics.
    myTool.Visible = true;

    // Add the tool data to the ActiveTask.
    station.ActiveTask.DataDeclarations.Add(myTool);
}
catch
{
    Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
    throw;
}
finally
{
    Project.UndoContext.EndUndoStep();
}
Version Information

Supported in: 1.0.0.0
See Also