Search Results for

    Show / Hide Table of Contents

    Class RsToolData

    Tooldata is used to describe the characteristics of a tool. It corresponds to the 'tooldata' data type in RAPID.

    Inheritance
    object
    ProjectObject
    RsDataDeclaration
    RsToolData
    Implements
    ISupportCopy
    Inherited Members
    RsDataDeclaration.GetReferencingInstructions()
    RsDataDeclaration.DisplayName
    RsDataDeclaration.Synchronize
    RsDataDeclaration.ModuleName
    RsDataDeclaration.StorageType
    RsDataDeclaration.Local
    RsDataDeclaration.DataType
    ProjectObject.FindObjects(Predicate<ProjectObject>, Predicate<ProjectObject>)
    ProjectObject.ToString()
    ProjectObject.Parent
    ProjectObject.ContainingProject
    ProjectObject.Attributes
    ProjectObject.UIVisible
    ProjectObject.TypeDisplayName
    ProjectObject.UniqueId
    ProjectObject.Children
    ProjectObject.DisplayNameChanged
    ProjectObject.ProjectObjectChanged
    ProjectObject.InternalEvent
    Namespace: ABB.Robotics.RobotStudio.Stations
    Assembly: ABB.Robotics.RobotStudio.Stations.dll
    Syntax
    public sealed class RsToolData : RsDataDeclaration, ISupportCopy
    Examples

    Create RsToolData.

    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();
            }</code></pre>
    

    Constructors

    View Source

    RsToolData()

    Initializes a new instance of the RsToolData class.

    Declaration
    public RsToolData()
    Examples

    Create RsToolData.

    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();
            }</code></pre>
    

    Properties

    View Source

    Frame

    Gets a Transform that corresponds to the TCP of the tool.

    Declaration
    public Transform Frame { get; }
    Property Value
    Type Description
    Transform
    Examples

    Get Frame.

    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();
            }</code></pre>
    
    View Source

    FrameSize

    Gets or set the size of the graphical representation of the TCP frame.

    Declaration
    public double FrameSize { get; set; }
    Property Value
    Type Description
    double
    Examples

    Get/Set FrameSize.

    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();
            }</code></pre>
    
    View Source

    LoadData

    Gets or sets the RsLoadData of the tool.

    Declaration
    public RsLoadData LoadData { get; set; }
    Property Value
    Type Description
    RsLoadData
    Examples

    Get/Set LoadData.

    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();
             }</code></pre>
    
    View Source

    Name

    Gets or sets the name of the object

    Declaration
    public override string Name { get; set; }
    Property Value
    Type Description
    string
    Overrides
    RsDataDeclaration.Name
    View Source

    RobotHold

    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.

    Declaration
    public bool RobotHold { get; set; }
    Property Value
    Type Description
    bool
    Examples

    Get/Set RobotHold.

    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();
             }</code></pre>
    
    View Source

    ShowName

    Gets or sets whether the name of the tooldata will be displayed in the graphics.

    Declaration
    public bool ShowName { get; set; }
    Property Value
    Type Description
    bool
    Examples

    Get/Set ShowName.

    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();
            }</code></pre>
    
    View Source

    Visible

    Gets or set whether the TCP frame should be displayed in the graphics.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool
    Examples

    Get/Set Visible.

    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();
            }</code></pre>
    

    Methods

    View Source

    AfterLoad(PimDocument)

    Declaration
    protected override void AfterLoad(PimDocument doc)
    Parameters
    Type Name Description
    PimDocument doc
    Overrides
    ProjectObject.AfterLoad(PimDocument)
    View Source

    Copy()

    Creates a copy of the DataDeclaration.

    Declaration
    public override ProjectObject Copy()
    Returns
    Type Description
    ProjectObject
    Overrides
    RsDataDeclaration.Copy()
    View Source

    IsValid(RsToolData)

    Declaration
    [Obsolete("not used")]
    public static bool IsValid(RsToolData toolData)
    Parameters
    Type Name Description
    RsToolData toolData
    Returns
    Type Description
    bool

    Implements

    ISupportCopy
    • View Source
    In this article
    Back to top Copyright © 2026 ABB Robotics