RsToolData Class |
Namespace: ABB.Robotics.RobotStudio.Stations
public sealed class RsToolData : RsDataDeclaration
The RsToolData type exposes the following members.
Name | Description | |
---|---|---|
RsToolData |
Initializes a new instance of the RsToolData class.
|
Name | Description | |
---|---|---|
Attributes |
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.) | |
Children |
Enumerates all child objects.
(Inherited from ProjectObject.) | |
ContainingProject |
Returns the Project that this object is a part of, or null if it is
not part of a Project.
(Inherited from ProjectObject.) | |
DataType |
Gets the RAPID data type of the Data Declaration.
(Inherited from RsDataDeclaration.) | |
DisplayName | (Inherited from RsDataDeclaration.) | |
Frame |
Gets a Transform that corresponds to the TCP of the tool.
| |
FrameSize |
Gets or set the size of the graphical representation of the TCP frame.
| |
LoadData |
Gets or sets the RsLoadData of the tool.
| |
Local |
Gets or sets if the DataDeclaration is declared local in a module. (Corresponds to the LOCAL keyword in RAPID).
(Inherited from RsDataDeclaration.) | |
ModuleName |
Gets or sets the name of the RAPID module that the DataDeclaration will be synchronized to.
(Inherited from RsDataDeclaration.) | |
Name |
Gets or sets the name of the object
(Overrides RsDataDeclarationName.) | |
Parent |
Returns the objects parent, if it has one.
(Inherited from ProjectObject.) | |
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.
| |
ShowName |
Gets or sets whether the name of the tooldata will be displayed in the graphics.
| |
StorageType |
Gets or sets the RapidStorageType of the DataDeclaration
(Inherited from RsDataDeclaration.) | |
Synchronize |
Gets or sets whether the DataDeclaration should be synchronized to the VC when the referencing RsPathProcedure is.
(Inherited from RsDataDeclaration.) | |
TypeDisplayName |
Gets a localized name for the type of this object.
(Inherited from ProjectObject.) | |
UIVisible |
Gets or sets a value that indicates if this object should be displayed in GUI
such as an object browser.
(Inherited from ProjectObject.) | |
UniqueId |
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.) | |
Visible |
Gets or set whether the TCP frame should be displayed in the graphics.
|
Name | Description | |
---|---|---|
Copy | (Overrides RsDataDeclarationCopy.) | |
Equals | (Inherited from Object.) | |
FindObjects |
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.) | |
GetHashCode | (Inherited from Object.) | |
GetReferencingInstructions |
Returns all RsInstructions that are referencing this DataDeclaration.
(Inherited from RsDataDeclaration.) | |
GetType | (Inherited from Object.) | |
IsValid | Obsolete. | |
ToString | (Inherited from ProjectObject.) |
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(); }