Class RsMoveInstruction
Represents a RAPID instruction for moving the robot to a specified target in a specified manner.
Implements
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("MoveInstructionCall")]
public sealed class RsMoveInstruction : RsInstruction, ISupportCopy, IGfxObject
Remarks
The Name property corresponds to the name of the RAPID instruction and should not be changed.
Constructors
RsMoveInstruction(RsTask, String, String, MotionType, String, String, String)
Initializes a new instance of the RsMoveInstruction class, which is based on the specified instruction description and template.
Declaration
public RsMoveInstruction(RsTask task, string processDefinitionName, string processTemplateName, MotionType motionType, string wobjName, string toPointName, string toolName)
Parameters
Type | Name | Description |
---|---|---|
RsTask | task | The task to create the Move Instruction for. |
String | processDefinitionName | The name of the process definition of the Move Instruction. |
String | processTemplateName | The name of the process template of the Move Instruction. |
MotionType | motionType | The MotionType of the Move Instruction. |
String | wobjName | The name of the work object of the Move Instruction. |
String | toPointName | The name of the to point ,i.e. the name of a RobTarget in the station, of the Move Instruction. |
String | toolName | The name of the tool of the Move Instruction. |
Examples
Create Move Instruction.
Project.UndoContext.BeginUndoStep("RsMoveInstructionCreate");
try
{
#region RsMoveInstructionCreateStep1
Station station = Station.ActiveStation;
#endregion
// First import a robot (a mechanism) and add it to the station.
// NOTE: Uncomment the following lines and use them insted of the third line with the load command.
// GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load(lib, true);
#region RsMoveInstructionCreateStep2
GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load("IRB140_6_81_C_G_03.rslib", true);
Mechanism mechGfx = (Mechanism)mechLib.RootComponent.CopyInstance();
mechGfx.Name = "IRB140_6_81_C_G_03";
station.GraphicComponents.Add(mechGfx);
#endregion
// Set the active task to the mechanism task.
#region RsMoveInstructionCreateStep3
station.ActiveTask = mechGfx.Task;
#endregion
// Create a WorkObject and add it to the ActiveTask.
#region RsMoveInstructionCreateStep4
RsWorkObject myWobj = new RsWorkObject();
myWobj.Name = station.ActiveTask.GetValidRapidName("myWobj", "_", 1);
station.ActiveTask.DataDeclarations.Add(myWobj);
#endregion
// Create a ToolData and add it to the ActiveTask.
#region RsMoveInstructionCreateStep5
RsToolData myTool = new RsToolData();
myTool.Name = station.ActiveTask.GetValidRapidName("myTool", "_", 1);
station.ActiveTask.DataDeclarations.Add(myTool);
#endregion
// Create a new RobTarget and add it to the ActiveTask.
#region RsMoveInstructionCreateStep6
RsRobTarget toPoint = new RsRobTarget();
toPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(toPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep7
RsTarget myRsTarget = new RsTarget(myWobj, toPoint);
myRsTarget.Name = toPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget);
#endregion
// Create a PathProcedure.
#region RsMoveInstructionCreateStep8
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
#endregion
// Create a linear move instruction using the move definition and the default template.
#region RsMoveInstructionCreateStep9
RsMoveInstruction myMoveL = new RsMoveInstruction
(station.ActiveTask, "Move", "Default",
MotionType.Linear, myWobj.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveL);
#endregion
// Create a new RobTarget to use as cirPoint and add it to the ActiveTask.
#region RsMoveInstructionCreateStep10
RsRobTarget cirPoint = new RsRobTarget();
cirPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
cirPoint.Frame.X = cirPoint.Frame.X + 0.10;
cirPoint.Frame.Z = cirPoint.Frame.Z + 0.10;
station.ActiveTask.DataDeclarations.Add(cirPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep11
RsTarget myRsTarget_2 = new RsTarget(myWobj, cirPoint);
myRsTarget_2.Name = cirPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget_2);
#endregion
// Create a circular move instruction.
#region RsMoveInstructionCreateStep12
RsMoveInstruction myMoveCirc = new RsMoveInstruction(station.ActiveTask,
"Move", "Default", myWobj.Name, cirPoint.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveCirc);
#endregion
// Create a joint target to be able to create a MoveAbsJ move instruction.
#region RsMoveInstructionCreateStep13
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = station.ActiveTask.GetValidRapidName("myJointTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(myJointTarget);
#endregion
// Set the robot axis values.
#region RsMoveInstructionCreateStep14
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
#endregion
// Create a MoveAbsJ move instruction (this only makes sense if there is a mechanism in the station).
#region RsMoveInstructionCreateStep15
RsMoveInstruction myMoveAbsJ =
new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", myJointTarget.Name);
myPath.Instructions.Add(myMoveAbsJ);
#endregion
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
RsMoveInstruction(RsTask, String, String, String)
Creates and initializes a new RsMoveInstruction object that uses a joint position, no consideration is made regarding tool or workobject
Declaration
public RsMoveInstruction(RsTask task, string processDefinitionName, string processTemplateName, string jointTargetName)
Parameters
Type | Name | Description |
---|---|---|
RsTask | task | The task to create the Move Instruction for |
String | processDefinitionName | The name of the process definition of the Move Instruction |
String | processTemplateName | The name of the process template of the Move Instruction |
String | jointTargetName | The name of a joint target in the station |
Examples
Create Move Instruction
Project.UndoContext.BeginUndoStep("RsMoveInstructionCreate");
try
{
#region RsMoveInstructionCreateStep1
Station station = Station.ActiveStation;
#endregion
// First import a robot (a mechanism) and add it to the station.
// NOTE: Uncomment the following lines and use them insted of the third line with the load command.
// GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load(lib, true);
#region RsMoveInstructionCreateStep2
GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load("IRB140_6_81_C_G_03.rslib", true);
Mechanism mechGfx = (Mechanism)mechLib.RootComponent.CopyInstance();
mechGfx.Name = "IRB140_6_81_C_G_03";
station.GraphicComponents.Add(mechGfx);
#endregion
// Set the active task to the mechanism task.
#region RsMoveInstructionCreateStep3
station.ActiveTask = mechGfx.Task;
#endregion
// Create a WorkObject and add it to the ActiveTask.
#region RsMoveInstructionCreateStep4
RsWorkObject myWobj = new RsWorkObject();
myWobj.Name = station.ActiveTask.GetValidRapidName("myWobj", "_", 1);
station.ActiveTask.DataDeclarations.Add(myWobj);
#endregion
// Create a ToolData and add it to the ActiveTask.
#region RsMoveInstructionCreateStep5
RsToolData myTool = new RsToolData();
myTool.Name = station.ActiveTask.GetValidRapidName("myTool", "_", 1);
station.ActiveTask.DataDeclarations.Add(myTool);
#endregion
// Create a new RobTarget and add it to the ActiveTask.
#region RsMoveInstructionCreateStep6
RsRobTarget toPoint = new RsRobTarget();
toPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(toPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep7
RsTarget myRsTarget = new RsTarget(myWobj, toPoint);
myRsTarget.Name = toPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget);
#endregion
// Create a PathProcedure.
#region RsMoveInstructionCreateStep8
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
#endregion
// Create a linear move instruction using the move definition and the default template.
#region RsMoveInstructionCreateStep9
RsMoveInstruction myMoveL = new RsMoveInstruction
(station.ActiveTask, "Move", "Default",
MotionType.Linear, myWobj.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveL);
#endregion
// Create a new RobTarget to use as cirPoint and add it to the ActiveTask.
#region RsMoveInstructionCreateStep10
RsRobTarget cirPoint = new RsRobTarget();
cirPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
cirPoint.Frame.X = cirPoint.Frame.X + 0.10;
cirPoint.Frame.Z = cirPoint.Frame.Z + 0.10;
station.ActiveTask.DataDeclarations.Add(cirPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep11
RsTarget myRsTarget_2 = new RsTarget(myWobj, cirPoint);
myRsTarget_2.Name = cirPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget_2);
#endregion
// Create a circular move instruction.
#region RsMoveInstructionCreateStep12
RsMoveInstruction myMoveCirc = new RsMoveInstruction(station.ActiveTask,
"Move", "Default", myWobj.Name, cirPoint.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveCirc);
#endregion
// Create a joint target to be able to create a MoveAbsJ move instruction.
#region RsMoveInstructionCreateStep13
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = station.ActiveTask.GetValidRapidName("myJointTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(myJointTarget);
#endregion
// Set the robot axis values.
#region RsMoveInstructionCreateStep14
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
#endregion
// Create a MoveAbsJ move instruction (this only makes sense if there is a mechanism in the station).
#region RsMoveInstructionCreateStep15
RsMoveInstruction myMoveAbsJ =
new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", myJointTarget.Name);
myPath.Instructions.Add(myMoveAbsJ);
#endregion
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
RsMoveInstruction(RsTask, String, String, String, String, String, String)
Creates and initializes a new RsMoveInstruction object with circular motiontype
Declaration
public RsMoveInstruction(RsTask task, string processDefinitionName, string processTemplateName, string wobjName, string cirPointName, string toPointName, string toolName)
Parameters
Type | Name | Description |
---|---|---|
RsTask | task | The task to create the Move Instruction for |
String | processDefinitionName | The name of the process definition of the Move Instruction |
String | processTemplateName | The name of the process template of the Move Instruction |
String | wobjName | The name of the work object of the Move Instruction |
String | cirPointName | The name of the cir point ,i.e. the name of a RobTarget in the station, of the Move Instruction |
String | toPointName | The name of the to point ,i.e. the name of a RobTarget in the station, of the Move Instruction |
String | toolName | The name of the tool of the Move Instruction |
Examples
Create Move Instruction
Project.UndoContext.BeginUndoStep("RsMoveInstructionCreate");
try
{
#region RsMoveInstructionCreateStep1
Station station = Station.ActiveStation;
#endregion
// First import a robot (a mechanism) and add it to the station.
// NOTE: Uncomment the following lines and use them insted of the third line with the load command.
// GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load(lib, true);
#region RsMoveInstructionCreateStep2
GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load("IRB140_6_81_C_G_03.rslib", true);
Mechanism mechGfx = (Mechanism)mechLib.RootComponent.CopyInstance();
mechGfx.Name = "IRB140_6_81_C_G_03";
station.GraphicComponents.Add(mechGfx);
#endregion
// Set the active task to the mechanism task.
#region RsMoveInstructionCreateStep3
station.ActiveTask = mechGfx.Task;
#endregion
// Create a WorkObject and add it to the ActiveTask.
#region RsMoveInstructionCreateStep4
RsWorkObject myWobj = new RsWorkObject();
myWobj.Name = station.ActiveTask.GetValidRapidName("myWobj", "_", 1);
station.ActiveTask.DataDeclarations.Add(myWobj);
#endregion
// Create a ToolData and add it to the ActiveTask.
#region RsMoveInstructionCreateStep5
RsToolData myTool = new RsToolData();
myTool.Name = station.ActiveTask.GetValidRapidName("myTool", "_", 1);
station.ActiveTask.DataDeclarations.Add(myTool);
#endregion
// Create a new RobTarget and add it to the ActiveTask.
#region RsMoveInstructionCreateStep6
RsRobTarget toPoint = new RsRobTarget();
toPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(toPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep7
RsTarget myRsTarget = new RsTarget(myWobj, toPoint);
myRsTarget.Name = toPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget);
#endregion
// Create a PathProcedure.
#region RsMoveInstructionCreateStep8
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
#endregion
// Create a linear move instruction using the move definition and the default template.
#region RsMoveInstructionCreateStep9
RsMoveInstruction myMoveL = new RsMoveInstruction
(station.ActiveTask, "Move", "Default",
MotionType.Linear, myWobj.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveL);
#endregion
// Create a new RobTarget to use as cirPoint and add it to the ActiveTask.
#region RsMoveInstructionCreateStep10
RsRobTarget cirPoint = new RsRobTarget();
cirPoint.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
cirPoint.Frame.X = cirPoint.Frame.X + 0.10;
cirPoint.Frame.Z = cirPoint.Frame.Z + 0.10;
station.ActiveTask.DataDeclarations.Add(cirPoint);
#endregion
// Create a graphic representation of the RobTarget and RsTarget.
#region RsMoveInstructionCreateStep11
RsTarget myRsTarget_2 = new RsTarget(myWobj, cirPoint);
myRsTarget_2.Name = cirPoint.Name;
station.ActiveTask.Targets.Add(myRsTarget_2);
#endregion
// Create a circular move instruction.
#region RsMoveInstructionCreateStep12
RsMoveInstruction myMoveCirc = new RsMoveInstruction(station.ActiveTask,
"Move", "Default", myWobj.Name, cirPoint.Name, toPoint.Name, myTool.Name);
myPath.Instructions.Add(myMoveCirc);
#endregion
// Create a joint target to be able to create a MoveAbsJ move instruction.
#region RsMoveInstructionCreateStep13
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = station.ActiveTask.GetValidRapidName("myJointTarget", "_", 1);
station.ActiveTask.DataDeclarations.Add(myJointTarget);
#endregion
// Set the robot axis values.
#region RsMoveInstructionCreateStep14
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
#endregion
// Create a MoveAbsJ move instruction (this only makes sense if there is a mechanism in the station).
#region RsMoveInstructionCreateStep15
RsMoveInstruction myMoveAbsJ =
new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", myJointTarget.Name);
myPath.Instructions.Add(myMoveAbsJ);
#endregion
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Properties
Color
Gets or sets the color of the path segment that this instruction corresponds to
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Name
Gets or Sets the name of the Move Instruction
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Overrides
Examples
Get/Set Name
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
ProcessDefinitionName
Gets the name of the Process Definition of the Move Instruction
Declaration
public string ProcessDefinitionName { get; }
Property Value
Type | Description |
---|---|
String |
Examples
Get ProcessDefinitionName
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
ProcessTemplateName
Gets the name of the Process Template of the Move Instruction
Declaration
public string ProcessTemplateName { get; }
Property Value
Type | Description |
---|---|
String |
Examples
Get ProcessTemplateName
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Reachable
Gets whether the robot can reach the target(s) in the Move Instruction.
Declaration
public ReachabilityState Reachable { get; set; }
Property Value
Type | Description |
---|---|
ReachabilityState |
Remarks
The value is automatically updated when instruction or target properties change. This property is not undoable.
Thickness
Gets or sets the thickness (in pixels) of the line, in the graphics, leading to the the Move Instruction
Declaration
public double Thickness { get; set; }
Property Value
Type | Description |
---|---|
Double |
Examples
Get Thickness
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Visible
Gets or sets if the graphical representation of this instruction should be visible.
Declaration
public bool Visible { 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
GetAllRobTargets()
Gets all RsRobTargets referenced by the instruction.
Declaration
public IEnumerable<RsRobTarget> GetAllRobTargets()
Returns
Type | Description |
---|---|
IEnumerable<RsRobTarget> |
GetCirPointArgument()
Gets the RsInstructionArgument corresponding to the CirPoint argument of the instruction.
Declaration
public RsInstructionArgument GetCirPointArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetCirPointArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetCirRobTarget()
Gets the RsRobTarget corresponding to the CirPoint argument of the instruction.
Declaration
public RsRobTarget GetCirRobTarget()
Returns
Type | Description |
---|---|
RsRobTarget | A RsRobTarget if there is a CirPoint argument, otherwise null. |
GetProcessTemplate()
Gets the RsProcessTemplate corresponding to the to process template argument of the Move Instruction.
Declaration
public RsProcessTemplate GetProcessTemplate()
Returns
Type | Description |
---|---|
RsProcessTemplate | The RsProcessTemplate. |
Examples
GetProcessTemplate.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetToJointPosArgument()
Gets the RsInstructionArgument corresponding to the ToJointPos argument of the instruction.
Declaration
public RsInstructionArgument GetToJointPosArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetToJointPosArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetToJointTarget()
Gets the RsJointTarget corresponding to the ToJointPos argument of the instruction.
Declaration
public RsJointTarget GetToJointTarget()
Returns
Type | Description |
---|---|
RsJointTarget |
GetToolArgument()
Gets the RsInstructionArgument corresponding to the to Tool argument of the instruction.
Declaration
public RsInstructionArgument GetToolArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetToolArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetToolData()
Gets the RsToolData corresponding to the to Tool argument of the instruction.
Declaration
public RsToolData GetToolData()
Returns
Type | Description |
---|---|
RsToolData |
GetToPointArgument()
Gets the RsInstructionArgument corresponding to the ToPoint argument of the instruction.
Declaration
public RsInstructionArgument GetToPointArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetToPointArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetToRobTarget()
Gets the RsRobTarget corresponding to the ToPoint argument of the instruction.
Declaration
public RsRobTarget GetToRobTarget()
Returns
Type | Description |
---|---|
RsRobTarget |
GetViaPointArgument()
Gets the RsInstructionArgument corresponding to the to ViaPoint argument of the Move Instruction.
Declaration
public RsInstructionArgument GetViaPointArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetViaPointArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetViaRobTarget()
Gets the RsRobTarget corresponding to the ViaPoint argument of the instruction.
Declaration
public RsRobTarget GetViaRobTarget()
Returns
Type | Description |
---|---|
RsRobTarget | A RsRobTarget if there is a ViaPoint argument, otherwise null. |
GetWObjArgument()
Gets the RsInstructionArgument corresponding to the WObj argument of the instruction.
Declaration
public RsInstructionArgument GetWObjArgument()
Returns
Type | Description |
---|---|
RsInstructionArgument | The RsInstructionArgument. |
Examples
GetWObjArgument.
Project.UndoContext.BeginUndoStep("RsMoveInstructionProperties");
try
{
Station station = Station.ActiveStation;
// Create a move instruction in the constructor examples.
RsMoveInstruction myMove = (RsMoveInstruction)station.ActiveTask.FindPathProcedureFromModuleScope("myPath", "").Instructions[0];
// Set the color of the move instruction to yellow.
myMove.Color = Color.Yellow;
// Make the thickness of the move instruction twice as thick.
myMove.Thickness = myMove.Thickness * 2;
// Output some info regarding the move instruction.
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessDefinitionName '" + myMove.ProcessDefinitionName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction has ProcessTemplateName '" + myMove.ProcessTemplateName + "'"));
Logger.AddMessage(new LogMessage("The Move Instruction '" + myMove.Name + "' has '" + myMove.InstructionArguments.Count + "' Instruction Arguments"));
RsInstructionArgument myCirPointArg = myMove.GetCirPointArgument();
if (myCirPointArg != null)
{
Logger.AddMessage(new LogMessage("CirPointArg Name: '" + myCirPointArg.Name + "' Value: '" + myCirPointArg.Value + "'"));
}
RsProcessTemplate myProcTempl = myMove.GetProcessTemplate();
if (myProcTempl != null)
{
Logger.AddMessage(new LogMessage("ProcessTemplate Name: '" + myProcTempl.Name + "' ActiveMotionType: '" + myProcTempl.ActiveMotionType + "'"));
}
RsInstructionArgument myToJointPosArg = myMove.GetToJointPosArgument();
if (myToJointPosArg != null)
{
Logger.AddMessage(new LogMessage("ToJointPosArg Name: '" + myToJointPosArg.Name + "' Value: '" + myToJointPosArg.Value + "'"));
}
RsInstructionArgument myToolArg = myMove.GetToolArgument();
if (myToolArg != null)
{
Logger.AddMessage(new LogMessage("ToolArg Name: '" + myToolArg.Name + "' Value: '" + myToolArg.Value + "'"));
}
RsInstructionArgument myToPointArg = myMove.GetToPointArgument();
if (myToPointArg != null)
{
Logger.AddMessage(new LogMessage("ToPointArgument Name: '" + myToPointArg.Name + "' Value: '" + myToPointArg.Value + "'"));
}
RsInstructionArgument myViaPointArg = myMove.GetViaPointArgument();
if (myViaPointArg != null)
{
Logger.AddMessage(new LogMessage("ViaPointArg Name: '" + myViaPointArg.Name + "' Value: '" + myViaPointArg.Value + "'"));
}
RsInstructionArgument myWObjArgument = myMove.GetWObjArgument();
if (myWObjArgument != null)
{
Logger.AddMessage(new LogMessage("WObjArgument Name: '" + myWObjArgument.Name + "' Value: '" + myWObjArgument.Value + "'"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
GetWorkObject()
Gets the RsWorkObject corresponding to the WObj argument of the instruction.
Declaration
public RsWorkObject GetWorkObject()
Returns
Type | Description |
---|---|
RsWorkObject |
Highlight(Color)
Sets a temporary color of the graphical representation.
Declaration
public void Highlight(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color |
JumpTo()
Jumps the mechanism, of corresponding task, to the position of the move instruction
Declaration
olete("Use JumpToAsync() instead")]
public bool JumpTo()
Returns
Type | Description |
---|---|
Boolean | True if the operation is successfull, otherwise false. |
Examples
JumpTo.
// NOTE: This example requires a station containing an IRB_140 and a running VC.
Project.UndoContext.BeginUndoStep("RsMoveInstructionMovementMethods");
try
{
Station station = Station.ActiveStation;
// Create a PathProcedure to add the move instructions to.
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
// Create a joint target corresponding to the robots home position.
RsJointTarget myHomeJointTarget = new RsJointTarget();
myHomeJointTarget.Name = "myHomeJT";
station.ActiveTask.DataDeclarations.Add(myHomeJointTarget);
// Set the robot axis values.
RobotAxisValues rbHomeAxis = new RobotAxisValues();
rbHomeAxis.Rax_1 = 0;
rbHomeAxis.Rax_2 = 0;
rbHomeAxis.Rax_3 = 0;
rbHomeAxis.Rax_4 = 0;
rbHomeAxis.Rax_5 = 30;
rbHomeAxis.Rax_6 = 0;
myHomeJointTarget.SetRobotAxes(rbHomeAxis, false);
// Create another joint target to jump and move to.
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = "myJointTarget";
station.ActiveTask.DataDeclarations.Add(myJointTarget);
// Set the robot axis values.
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
// Create a move instruction.
RsMoveInstruction myMoveAbsJ = new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", "myJointTarget");
myPath.Instructions.Add(myMoveAbsJ);
// Jump to the move instruction 'myMoveAbsJ'.
if (myMoveAbsJ.JumpTo())
{
Logger.AddMessage(new LogMessage("The robot jumped successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The JumpTo command failed!"));
}
// Jump the robot to its home postition.
myHomeJointTarget.JumpTo();
// Move to the move instruction 'myMoveAbsJ'
if (myMoveAbsJ.MoveTo())
{
Logger.AddMessage(new LogMessage("The robot moved successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The MoveTo command failed!"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
JumpTo(Boolean)
Declaration
olete("Use JumpToAsync() instead")]
public bool JumpTo(bool updateController)
Parameters
Type | Name | Description |
---|---|---|
Boolean | updateController |
Returns
Type | Description |
---|---|
Boolean |
JumpToAsync(Boolean)
Jumps the mechanism, of corresponding task, to the position of the move instruction. Optionally updates the joint values in the virtual controller. Updating the joint values in the controller is time consuning compared to only updating the Mechanism joint value. If you need to frequently call this method, it is recomended to update the joint values in the controller, only for the last call.
Declaration
public Task<bool> JumpToAsync(bool updateController)
Parameters
Type | Name | Description |
---|---|---|
Boolean | updateController | Specifies if the joint values in the controller shall be updated in addition to the joint values of the mechanism. |
Returns
Type | Description |
---|---|
Task<Boolean> | True if the operation is successful, otherwise false. |
Examples
// NOTE: This example requires a station containing an IRB_140 and a running VC.
Project.UndoContext.BeginUndoStep("RsMoveInstructionMovementMethods");
try
{
Station station = Station.ActiveStation;
// Create a PathProcedure to add the move instructions to.
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
// Create a joint target corresponding to the robots home position.
RsJointTarget myHomeJointTarget = new RsJointTarget();
myHomeJointTarget.Name = "myHomeJT";
station.ActiveTask.DataDeclarations.Add(myHomeJointTarget);
// Set the robot axis values.
RobotAxisValues rbHomeAxis = new RobotAxisValues();
rbHomeAxis.Rax_1 = 0;
rbHomeAxis.Rax_2 = 0;
rbHomeAxis.Rax_3 = 0;
rbHomeAxis.Rax_4 = 0;
rbHomeAxis.Rax_5 = 30;
rbHomeAxis.Rax_6 = 0;
myHomeJointTarget.SetRobotAxes(rbHomeAxis, false);
// Create another joint target to jump and move to.
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = "myJointTarget";
station.ActiveTask.DataDeclarations.Add(myJointTarget);
// Set the robot axis values.
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
// Create a move instruction.
RsMoveInstruction myMoveAbsJ = new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", "myJointTarget");
myPath.Instructions.Add(myMoveAbsJ);
// Jump to the move instruction 'myMoveAbsJ'.
if (myMoveAbsJ.JumpTo())
{
Logger.AddMessage(new LogMessage("The robot jumped successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The JumpTo command failed!"));
}
// Jump the robot to its home postition.
myHomeJointTarget.JumpTo();
// Move to the move instruction 'myMoveAbsJ'
if (myMoveAbsJ.MoveTo())
{
Logger.AddMessage(new LogMessage("The robot moved successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The MoveTo command failed!"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
JumpToAsync(Boolean, ConfigurationMode)
Jumps the mechanism, of corresponding task, to the position of the move instruction. Optionally updates the joint values in the virtual controller. Updating the joint values in the controller is time consuning compared to only updating the Mechanism joint value. If you need to frequently call this method, it is recomended to update the joint values in the controller, only for the last call.
Declaration
public Task<JumpResult> JumpToAsync(bool updateController, ConfigurationMode configurationMode)
Parameters
Type | Name | Description |
---|---|---|
Boolean | updateController | Specifies if the joint values in the controller shall be updated in addition to the joint values of the mechanism. |
ConfigurationMode | configurationMode | Specifies how the arm configuration stored in the target shall be used. In this case this method returns true only if the mechanism can move to the specified target with its specified arm configuration. Only valid for RsRobTargets. |
Returns
Type | Description |
---|---|
Task<JumpResult> | True if the operation is successful, otherwise false. |
Examples
// NOTE: This example requires a station containing an IRB_140 and a running VC.
Project.UndoContext.BeginUndoStep("RsMoveInstructionMovementMethods");
try
{
Station station = Station.ActiveStation;
// Create a PathProcedure to add the move instructions to.
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
// Create a joint target corresponding to the robots home position.
RsJointTarget myHomeJointTarget = new RsJointTarget();
myHomeJointTarget.Name = "myHomeJT";
station.ActiveTask.DataDeclarations.Add(myHomeJointTarget);
// Set the robot axis values.
RobotAxisValues rbHomeAxis = new RobotAxisValues();
rbHomeAxis.Rax_1 = 0;
rbHomeAxis.Rax_2 = 0;
rbHomeAxis.Rax_3 = 0;
rbHomeAxis.Rax_4 = 0;
rbHomeAxis.Rax_5 = 30;
rbHomeAxis.Rax_6 = 0;
myHomeJointTarget.SetRobotAxes(rbHomeAxis, false);
// Create another joint target to jump and move to.
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = "myJointTarget";
station.ActiveTask.DataDeclarations.Add(myJointTarget);
// Set the robot axis values.
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
// Create a move instruction.
RsMoveInstruction myMoveAbsJ = new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", "myJointTarget");
myPath.Instructions.Add(myMoveAbsJ);
// Jump to the move instruction 'myMoveAbsJ'.
if (myMoveAbsJ.JumpTo())
{
Logger.AddMessage(new LogMessage("The robot jumped successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The JumpTo command failed!"));
}
// Jump the robot to its home postition.
myHomeJointTarget.JumpTo();
// Move to the move instruction 'myMoveAbsJ'
if (myMoveAbsJ.MoveTo())
{
Logger.AddMessage(new LogMessage("The robot moved successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The MoveTo command failed!"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
MoveTo()
Declaration
olete("Use MoveToAsync instead")]
public bool MoveTo()
Returns
Type | Description |
---|---|
Boolean |
MoveTo(ArrayList)
Declaration
olete("Use MoveToAsync instead")]
public bool MoveTo(ArrayList logMessageList)
Parameters
Type | Name | Description |
---|---|---|
ArrayList | logMessageList |
Returns
Type | Description |
---|---|
Boolean |
MoveTo(List<SyncLogMessage>)
Declaration
olete("Use MoveToAsync instead")]
public bool MoveTo(List<SyncLogMessage> logMessageList)
Parameters
Type | Name | Description |
---|---|---|
List<SyncLogMessage> | logMessageList |
Returns
Type | Description |
---|---|
Boolean |
MoveToAsync()
Moves the mechanism, of corresponding task, to the position of the move- instruction using its settings. A temporary RAPID program is created on the controller and is executed.
Declaration
public Task<bool> MoveToAsync()
Returns
Type | Description |
---|---|
Task<Boolean> | True if the operation succeeded, false if there was an error executing the RAPID program. Any other error will raise an exception. |
Examples
MoveTo.
// NOTE: This example requires a station containing an IRB_140 and a running VC.
Project.UndoContext.BeginUndoStep("RsMoveInstructionMovementMethods");
try
{
Station station = Station.ActiveStation;
// Create a PathProcedure to add the move instructions to.
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
// Create a joint target corresponding to the robots home position.
RsJointTarget myHomeJointTarget = new RsJointTarget();
myHomeJointTarget.Name = "myHomeJT";
station.ActiveTask.DataDeclarations.Add(myHomeJointTarget);
// Set the robot axis values.
RobotAxisValues rbHomeAxis = new RobotAxisValues();
rbHomeAxis.Rax_1 = 0;
rbHomeAxis.Rax_2 = 0;
rbHomeAxis.Rax_3 = 0;
rbHomeAxis.Rax_4 = 0;
rbHomeAxis.Rax_5 = 30;
rbHomeAxis.Rax_6 = 0;
myHomeJointTarget.SetRobotAxes(rbHomeAxis, false);
// Create another joint target to jump and move to.
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = "myJointTarget";
station.ActiveTask.DataDeclarations.Add(myJointTarget);
// Set the robot axis values.
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
// Create a move instruction.
RsMoveInstruction myMoveAbsJ = new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", "myJointTarget");
myPath.Instructions.Add(myMoveAbsJ);
// Jump to the move instruction 'myMoveAbsJ'.
if (myMoveAbsJ.JumpTo())
{
Logger.AddMessage(new LogMessage("The robot jumped successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The JumpTo command failed!"));
}
// Jump the robot to its home postition.
myHomeJointTarget.JumpTo();
// Move to the move instruction 'myMoveAbsJ'
if (myMoveAbsJ.MoveTo())
{
Logger.AddMessage(new LogMessage("The robot moved successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The MoveTo command failed!"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
MoveToAsync(List<SyncLogMessage>)
Moves the mechanism, of corresponding task, to the position of the move- instruction using its settings. A temporary RAPID program is created on the controller and is executed. The temporary RAPID program is created by using RapidSync. The synchronization log is returned from this overload.
Declaration
public Task<bool> MoveToAsync(List<SyncLogMessage> logMessageList)
Parameters
Type | Name | Description |
---|---|---|
List<SyncLogMessage> | logMessageList | The list of log messages from the underlying RapidSync operation. |
Returns
Type | Description |
---|---|
Task<Boolean> | True if the operation succeeded, false if there was an error executing the RAPID program. Any other error will raise an exception. |
Examples
MoveTo.
// NOTE: This example requires a station containing an IRB_140 and a running VC.
Project.UndoContext.BeginUndoStep("RsMoveInstructionMovementMethods");
try
{
Station station = Station.ActiveStation;
// Create a PathProcedure to add the move instructions to.
RsPathProcedure myPath = new RsPathProcedure("myPath");
station.ActiveTask.PathProcedures.Add(myPath);
// Create a joint target corresponding to the robots home position.
RsJointTarget myHomeJointTarget = new RsJointTarget();
myHomeJointTarget.Name = "myHomeJT";
station.ActiveTask.DataDeclarations.Add(myHomeJointTarget);
// Set the robot axis values.
RobotAxisValues rbHomeAxis = new RobotAxisValues();
rbHomeAxis.Rax_1 = 0;
rbHomeAxis.Rax_2 = 0;
rbHomeAxis.Rax_3 = 0;
rbHomeAxis.Rax_4 = 0;
rbHomeAxis.Rax_5 = 30;
rbHomeAxis.Rax_6 = 0;
myHomeJointTarget.SetRobotAxes(rbHomeAxis, false);
// Create another joint target to jump and move to.
RsJointTarget myJointTarget = new RsJointTarget();
myJointTarget.Name = "myJointTarget";
station.ActiveTask.DataDeclarations.Add(myJointTarget);
// Set the robot axis values.
RobotAxisValues rbAxis = new RobotAxisValues();
rbAxis.Rax_1 = 70.0000000000001;
rbAxis.Rax_2 = -30;
rbAxis.Rax_3 = 30;
rbAxis.Rax_4 = -55.0000000000001;
rbAxis.Rax_5 = 40;
rbAxis.Rax_6 = 10;
myJointTarget.SetRobotAxes(rbAxis, false);
// Create a move instruction.
RsMoveInstruction myMoveAbsJ = new RsMoveInstruction(station.ActiveTask, "MoveAbs", "Default", "myJointTarget");
myPath.Instructions.Add(myMoveAbsJ);
// Jump to the move instruction 'myMoveAbsJ'.
if (myMoveAbsJ.JumpTo())
{
Logger.AddMessage(new LogMessage("The robot jumped successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The JumpTo command failed!"));
}
// Jump the robot to its home postition.
myHomeJointTarget.JumpTo();
// Move to the move instruction 'myMoveAbsJ'
if (myMoveAbsJ.MoveTo())
{
Logger.AddMessage(new LogMessage("The robot moved successfully!"));
}
else
{
Logger.AddMessage(new LogMessage("The MoveTo command failed!"));
}
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
ResetHighlight()
Resets the graphical representation to the default color.
Declaration
public void ResetHighlight()