Struct RsLoadData
Loaddata is used to describe loads attached to the mechanical interface of the robot Load data usually defines the payload (grip load is defined by the instruction Grip- Load) of the robot, i.e. the load held in the robot gripper. The tool load is specified in the tool data (tooldata) which includes load data.
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public struct RsLoadData
Examples
RsLoadData 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();
}
Constructors
RsLoadData(Double, Vector3, Quaternion, Vector3)
Initializes a new RsLoadData instance with the specified parameters.
Declaration
public RsLoadData(double mass, Vector3 cog, Quaternion aom, Vector3 inertia)
Parameters
Type | Name | Description |
---|---|---|
Double | mass | The weight of the load. |
Vector3 | cog | The center of gravity of a tool load expressed in the wrist coordinate system. |
Quaternion | aom | The orientation of the coordinate system defined by the inertial axes of the tool load. |
Vector3 | inertia | The moment of inertia of the load around the x-, y- and z-axis of the tool load or payload coordinate system. |
Properties
Aom
The orientation of the coordinate system defined by the inertial axes of the tool load. Expressed in the wrist coordinate system as a quaternion (q1, q2, q3, q4). If a stationary tool is used, it means the inertial axes for the tool holding the work object.
Declaration
public Quaternion Aom { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
Remarks
The orientation of the tool load coordinate system must coincide with the orientation of the wrist coordinate system. It must always be set to 1, 0, 0, 0.
Examples
Get/Set Aom.
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();
}
Cog
The center of gravity of a tool load expressed in the wrist coordinate system. If a stationary tool is used, it means the center of gravity for the tool holding the work object.
Declaration
public Vector3 Cog { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Examples
Get/Set Cog.
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();
}
Inertia
The moment of inertia of the load around the x-, y- and z-axis of the tool load or payload coordinate system.
Declaration
public Vector3 Inertia { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Examples
Get/Set Inertia.
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();
}
Mass
Gets or Sets the weight of the load.
Declaration
public double Mass { get; set; }
Property Value
Type | Description |
---|---|
Double |
Examples
Get/Set Mass.
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();
}
Methods
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Another object to compare to. |
Returns
Type | Description |
---|---|
Boolean | True if obj and this instance are the same type and represent the same value; otherwise, false. |
Overrides
Examples
Equals.
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();
}
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Operators
Equality(RsLoadData, RsLoadData)
Compares the two RsLoadData objects for equality.
Declaration
public static bool operator ==(RsLoadData lhs, RsLoadData rhs)
Parameters
Type | Name | Description |
---|---|---|
RsLoadData | lhs | The first object to compare. |
RsLoadData | rhs | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | True if lhs and rhs represent the same values; otherwise, false. |
Examples
.
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();
}
Inequality(RsLoadData, RsLoadData)
Compares the two RsLoadData objects for inequality.
Declaration
public static bool operator !=(RsLoadData lhs, RsLoadData rhs)
Parameters
Type | Name | Description |
---|---|---|
RsLoadData | lhs | The first object to compare. |
RsLoadData | rhs | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | True if lhs and rhs represent different values; otherwise, false. |
Examples
Inequality.
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();
}