RsRobTarget Class |
Namespace: ABB.Robotics.RobotStudio.Stations
public sealed class RsRobTarget : RsDataDeclaration
The RsRobTarget type exposes the following members.
Name | Description | |
---|---|---|
RsRobTarget |
Creates and initializes a new RsRobTarget object.
|
Name | Description | |
---|---|---|
Attributes |
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.) | |
Children |
Enumerates all child objects.
(Inherited from ProjectObject.) | |
ConfigurationData |
Gets or sets the ConfigurationData of the robtarget.
| |
ConfigurationStatus |
Gets or sets the ConfigurationStatus of the robtarget.
| |
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 the Transform that defines the position of the robtarget relative to a RsWorkObject.
| |
IsInline |
Gets or sets whether the robtarget will be decalared inline in the RAPID when synchronized.
| |
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 DataDeclaration
(Inherited from RsDataDeclaration.) | |
Parent |
Returns the objects parent, if it has one.
(Inherited from ProjectObject.) | |
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.) |
Name | Description | |
---|---|---|
Copy | (Overrides RsDataDeclarationCopy.) | |
Equals | (Inherited from Object.) | |
FindObjects |
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.) | |
GetExternalAxes |
Gets the ExternalAxisValues of the robtarget.
| |
GetHashCode | (Inherited from Object.) | |
GetReferencingInstructions |
Returns all RsInstructions that are referencing this DataDeclaration.
(Inherited from RsDataDeclaration.) | |
GetType | (Inherited from Object.) | |
SetConfiguration |
Sets the configuration values of the robtarget.
| |
SetExternalAxes |
Sets the ExternalAxisValues of the robtarget.
| |
SetExternalAxisValue |
Sets a single external axis value of the robtarget in RAPID units.
| |
ToString | (Inherited from ProjectObject.) |
Project.UndoContext.BeginUndoStep("RsRobTargetExample"); try { // NOTE: This example requires a station containing an IRB_140 and a running VC. Station station = Station.ActiveStation; // Create a RobTarget, that corresponds to the home position of a IRB_140. RsRobTarget myRobTarget = new RsRobTarget(); // Set the name of the RobTarget. myRobTarget.Name = station.ActiveTask.GetValidRapidName("Target", "_", 10); // Set the position and rotation of the RobTarget. myRobTarget.Frame.X = 0.50629; myRobTarget.Frame.Y = 0; myRobTarget.Frame.Z = 0.67950; myRobTarget.Frame.RX = Globals.DegToRad(180); // From ABB.Robotics.Math myRobTarget.Frame.RY = Globals.DegToRad(60); myRobTarget.Frame.RZ = Globals.DegToRad(180); // Add the RobTarget to the DataDeclarations of the ActiveTask. station.ActiveTask.DataDeclarations.Add(myRobTarget); // Set the RobTarget not to be an inline declaration. myRobTarget.IsInline = false; // Create an RsTarget for the RobTarget, to give it a graphical representation and use it to get configs. RsTarget myRsTarget = new RsTarget(station.ActiveTask.ActiveWorkObject, myRobTarget); myRsTarget.Name = myRobTarget.Name; // Add it to the ActiveTask. station.ActiveTask.Targets.Add(myRsTarget); bool includeTurns = true; //get the turns also = all solutions // Get all the solutions for the RobTarget using the mechanism. ConfigurationData[] myConfs = station.ActiveTask.Mechanism.GetAllConfigurations(myRsTarget, station.ActiveTask.ActiveTool, includeTurns); if (myConfs.Length > 0) { // There is at least one configuration for the RobTarget, use the first. myRobTarget.ConfigurationData = myConfs[0]; // Set the ConfigurationStatus as defined, since there is a valid config. myRobTarget.ConfigurationStatus = ConfigurationStatus.Defined; // Output the config. Logger.AddMessage(new LogMessage("The configuration of RobTarget: '" + myRobTarget.Name + "' is: '[" + myRobTarget.ConfigurationData.Cf1 + ", " + myRobTarget.ConfigurationData.Cf4 + ", " + myRobTarget.ConfigurationData.Cf6 + ", " + myRobTarget.ConfigurationData.Cfx + "]'")); } else { // Could not find any valid configurations fo the RobTarget. // Set the configuration status to no solutions. myRobTarget.ConfigurationStatus = ConfigurationStatus.NoSolutions; // Output a message. Logger.AddMessage(new LogMessage("There are no configuration for robtarget: '" + myRobTarget.Name + "'")); } } catch { Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback); throw; } finally { Project.UndoContext.EndUndoStep(); }