Class RsMoveInstructionDescription
Defines the parameters and other properties of an RsMoveInstruction.
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("MoveInstructionDescription")]
public sealed class RsMoveInstructionDescription : RsInstructionDescription
Remarks
The Name property corresponds to the name of the RAPID instruction.
Constructors
RsMoveInstructionDescription(String, MotionType)
Creates and initializes a new RsMoveInstructionDescription object.
Declaration
public RsMoveInstructionDescription(string name, MotionType motionType)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the corresponding RAPID instruction. |
MotionType | motionType | The MotionType of the RsMoveInstructionDescription. |
Examples
Create a MoveInstructionDescription.
Project.UndoContext.BeginUndoStep("RsMoveInstructionDescriptionProperties");
try
{
// Instance active station.
Station station = Station.ActiveStation;
// Create a MoveInstructionDescription.
RsMoveInstructionDescription myMoveInstrDesc = new RsMoveInstructionDescription("SearchL", MotionType.Linear);
myMoveInstrDesc.InformationText = "Search Linear";
// Create InstructionPrameterGroups and InstructionParameters
// and add them to the group.
RsInstructionParameterGroup myIPG = new RsInstructionParameterGroup();
RsInstructionParameter myArg = new RsInstructionParameter("Stop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("PStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("SStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("Sup");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Signal");
myArg.AccessMode = ParameterAccessMode.Variable;
myArg.DataType = "signaldi";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Flanks");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("SearchPoint");
myArg.AccessMode = ParameterAccessMode.InOut;
myArg.DataType = "robtarget";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ToPoint");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "robtarget";
myArg.Optional = false;
myArg.PointType = RsPointType.ToPoint;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ID");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "identno";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Speed");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "speeddata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("V");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("T");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Tool");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "tooldata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("WObj");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "wobjdata";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Corr");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Add the InstructionDescription to the ActiveTask.
station.ActiveTask.InstructionDescriptions.Add(myMoveInstrDesc);
// Open the "Instruction Templates Manager" on the
// "Create" menu to verify that the description has been added.
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
RsMoveInstructionDescription(String, MotionType, Boolean)
Creates and initializes a new RsMoveInstructionDescription object.
Declaration
public RsMoveInstructionDescription(string name, MotionType motionType, bool useBrush)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the corresponding RAPID instruction. |
MotionType | motionType | The MotionType of the RsMoveInstructionDescription. |
Boolean | useBrush | Specifies if previous SetBrush instructions are used by the move instruction. |
Examples
Create a MoveInstructionDescription.
Project.UndoContext.BeginUndoStep("RsMoveInstructionDescriptionProperties");
try
{
// Instance active station.
Station station = Station.ActiveStation;
// Create a MoveInstructionDescription.
RsMoveInstructionDescription myMoveInstrDesc = new RsMoveInstructionDescription("SearchL", MotionType.Linear);
myMoveInstrDesc.InformationText = "Search Linear";
// Create InstructionPrameterGroups and InstructionParameters
// and add them to the group.
RsInstructionParameterGroup myIPG = new RsInstructionParameterGroup();
RsInstructionParameter myArg = new RsInstructionParameter("Stop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("PStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("SStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("Sup");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Signal");
myArg.AccessMode = ParameterAccessMode.Variable;
myArg.DataType = "signaldi";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Flanks");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("SearchPoint");
myArg.AccessMode = ParameterAccessMode.InOut;
myArg.DataType = "robtarget";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ToPoint");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "robtarget";
myArg.Optional = false;
myArg.PointType = RsPointType.ToPoint;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ID");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "identno";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Speed");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "speeddata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("V");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("T");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Tool");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "tooldata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("WObj");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "wobjdata";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Corr");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Add the InstructionDescription to the ActiveTask.
station.ActiveTask.InstructionDescriptions.Add(myMoveInstrDesc);
// Open the "Instruction Templates Manager" on the
// "Create" menu to verify that the description has been added.
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Properties
MotionType
Gets the MotionType of the move instruction.
Declaration
public MotionType MotionType { get; }
Property Value
Type | Description |
---|---|
MotionType |
Examples
Create a MoveInstructionDescription.
Project.UndoContext.BeginUndoStep("RsMoveInstructionDescriptionProperties");
try
{
// Instance active station.
Station station = Station.ActiveStation;
// Create a MoveInstructionDescription.
RsMoveInstructionDescription myMoveInstrDesc = new RsMoveInstructionDescription("SearchL", MotionType.Linear);
myMoveInstrDesc.InformationText = "Search Linear";
// Create InstructionPrameterGroups and InstructionParameters
// and add them to the group.
RsInstructionParameterGroup myIPG = new RsInstructionParameterGroup();
RsInstructionParameter myArg = new RsInstructionParameter("Stop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("PStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("SStop");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("Sup");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Signal");
myArg.AccessMode = ParameterAccessMode.Variable;
myArg.DataType = "signaldi";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Flanks");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("SearchPoint");
myArg.AccessMode = ParameterAccessMode.InOut;
myArg.DataType = "robtarget";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ToPoint");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "robtarget";
myArg.Optional = false;
myArg.PointType = RsPointType.ToPoint;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("ID");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "identno";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Speed");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "speeddata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("V");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myArg = new RsInstructionParameter("T");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "num";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Tool");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "tooldata";
myArg.Optional = false;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("WObj");
myArg.AccessMode = ParameterAccessMode.Persistent;
myArg.DataType = "wobjdata";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Create a new InstructionPrameterGroup.
myIPG = new RsInstructionParameterGroup();
myArg = new RsInstructionParameter("Corr");
myArg.AccessMode = ParameterAccessMode.In;
myArg.DataType = "switch";
myArg.Optional = true;
myIPG.InstructionParameters.Add(myArg);
myMoveInstrDesc.InstructionParameterGroups.Add(myIPG);
// Add the InstructionDescription to the ActiveTask.
station.ActiveTask.InstructionDescriptions.Add(myMoveInstrDesc);
// Open the "Instruction Templates Manager" on the
// "Create" menu to verify that the description has been added.
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
UseBrush
Gets or sets if previous SetBrush instructions are used by the move instruction.
Declaration
public bool UseBrush { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
AfterLoad(PimDocument)
Declaration
protected override void AfterLoad(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
GetInformationText()
Declaration
protected override string GetInformationText()
Returns
Type | Description |
---|---|
String |
Overrides
GetInstructionParameterGroups()
Declaration
protected override RsInstructionParameterGroupCollection GetInstructionParameterGroups()
Returns
Type | Description |
---|---|
RsInstructionParameterGroupCollection |
Overrides
SetInformationText(String)
Declaration
protected override void SetInformationText(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text |