Class RsProcessTemplate
An RsProcessTemplate is an instance of a process definition. It contains a collection of 1-3 RsInstructionTemplates. The templates corresponds to the RsMoveInstructionDescriptions of the RsProcessDefinition that the RsProcessTemplate is a memeber of.
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("MoveInstructionTemplateGroup")]
public sealed class RsProcessTemplate : ProjectObject
Examples
RsProcessTemplate example.
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
Station station = Station.ActiveStation;
// Create a new RsProcessDefinition.
RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");
// Name it "SearchL".
myProcDef.Name = "SearchL";
// Create a new RsInstructionTemplate.
RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();
// Name it "SearchL".
mySearchLInstrTempl.Name = "SearchL";
// Create the instruction arguments for the InstructionTemplate, and add them to it.
RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("PStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Sup", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Signal", "di1");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Flanks", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SearchPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ToPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ID", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Speed", "v1000");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("V", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("T", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Tool", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("WObj", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Corr", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
// Create a RsProcessTemplate using the RsInstructionTemplate.
// Use null arguments since it does not support circular or joint motions.
RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);
// Name it "Default".
myDefaultSearchLProcTempl.Name = "Default";
// Set the ActiveMotionType to linear.
myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;
// Add the process template to the ProcessDefinition.
myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);
// Set the process template as the ActiveProcessTemplate.
myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];
// Finally add the ProcessDefinition to the ActiveTask.
station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Constructors
RsProcessTemplate(RsInstructionTemplate, RsInstructionTemplate, RsInstructionTemplate)
Creates and initializes a new RsProcessTemplate object.
Declaration
public RsProcessTemplate(RsInstructionTemplate jointInstructionTemplate, RsInstructionTemplate linearInstructionTemplate, RsInstructionTemplate circularInstructionTemplate)
Parameters
Type | Name | Description |
---|---|---|
RsInstructionTemplate | jointInstructionTemplate | The RsInstructionTemplate corresponding to the joint motion type of the RsMoveInstructionDescription. |
RsInstructionTemplate | linearInstructionTemplate | The RsInstructionTemplate corresponding to the linear motion type of the RsMoveInstructionDescription. |
RsInstructionTemplate | circularInstructionTemplate | The RsInstructionTemplate corresponding to the circular motion type of the RsMoveInstructionDescription. |
Examples
Create RsProcessTemplate.
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
Station station = Station.ActiveStation;
// Create a new RsProcessDefinition.
RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");
// Name it "SearchL".
myProcDef.Name = "SearchL";
// Create a new RsInstructionTemplate.
RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();
// Name it "SearchL".
mySearchLInstrTempl.Name = "SearchL";
// Create the instruction arguments for the InstructionTemplate, and add them to it.
RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("PStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Sup", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Signal", "di1");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Flanks", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SearchPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ToPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ID", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Speed", "v1000");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("V", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("T", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Tool", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("WObj", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Corr", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
// Create a RsProcessTemplate using the RsInstructionTemplate.
// Use null arguments since it does not support circular or joint motions.
RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);
// Name it "Default".
myDefaultSearchLProcTempl.Name = "Default";
// Set the ActiveMotionType to linear.
myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;
// Add the process template to the ProcessDefinition.
myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);
// Set the process template as the ActiveProcessTemplate.
myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];
// Finally add the ProcessDefinition to the ActiveTask.
station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Properties
ActiveMotionType
Gets or Sets the ActiveMotionType.
Declaration
public MotionType ActiveMotionType { get; set; }
Property Value
Type | Description |
---|---|
MotionType |
Examples
Gets/Sets ActiveMotionType.
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
Station station = Station.ActiveStation;
// Create a new RsProcessDefinition.
RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");
// Name it "SearchL".
myProcDef.Name = "SearchL";
// Create a new RsInstructionTemplate.
RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();
// Name it "SearchL".
mySearchLInstrTempl.Name = "SearchL";
// Create the instruction arguments for the InstructionTemplate, and add them to it.
RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("PStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Sup", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Signal", "di1");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Flanks", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SearchPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ToPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ID", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Speed", "v1000");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("V", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("T", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Tool", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("WObj", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Corr", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
// Create a RsProcessTemplate using the RsInstructionTemplate.
// Use null arguments since it does not support circular or joint motions.
RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);
// Name it "Default".
myDefaultSearchLProcTempl.Name = "Default";
// Set the ActiveMotionType to linear.
myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;
// Add the process template to the ProcessDefinition.
myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);
// Set the process template as the ActiveProcessTemplate.
myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];
// Finally add the ProcessDefinition to the ActiveTask.
station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
Methods
GetTemplate(MotionType)
Gets the RsProcessTemplate corresponding to the supplied MotionType.
Declaration
public RsInstructionTemplate GetTemplate(MotionType motionType)
Parameters
Type | Name | Description |
---|---|---|
MotionType | motionType | The MotionType to find corresponding template for |
Returns
Type | Description |
---|---|
RsInstructionTemplate | The RsProcessTemplate that corresponds to the MotionType, if there is none the it returns Null. |
Examples
GetTemplate.
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
Station station = Station.ActiveStation;
// Create a new RsProcessDefinition.
RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");
// Name it "SearchL".
myProcDef.Name = "SearchL";
// Create a new RsInstructionTemplate.
RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();
// Name it "SearchL".
mySearchLInstrTempl.Name = "SearchL";
// Create the instruction arguments for the InstructionTemplate, and add them to it.
RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("PStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Sup", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Signal", "di1");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Flanks", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SearchPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ToPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ID", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Speed", "v1000");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("V", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("T", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Tool", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("WObj", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Corr", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
// Create a RsProcessTemplate using the RsInstructionTemplate.
// Use null arguments since it does not support circular or joint motions.
RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);
// Name it "Default".
myDefaultSearchLProcTempl.Name = "Default";
// Set the ActiveMotionType to linear.
myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;
// Add the process template to the ProcessDefinition.
myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);
// Set the process template as the ActiveProcessTemplate.
myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];
// Finally add the ProcessDefinition to the ActiveTask.
station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
SetTemplate(MotionType, RsInstructionTemplate)
Sets the supplied RsProcessTemplate as corresponding to the supplied MotionType.
Declaration
public void SetTemplate(MotionType motionType, RsInstructionTemplate instructionTemplate)
Parameters
Type | Name | Description |
---|---|---|
MotionType | motionType | MotionType to associate the supplied RsInstructionTemplate with. |
RsInstructionTemplate | instructionTemplate | The RsInstructionTemplate to associate with the supplied MotionType |
Examples
SetTemplate.
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
Station station = Station.ActiveStation;
// Create a new RsProcessDefinition.
RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");
// Name it "SearchL".
myProcDef.Name = "SearchL";
// Create a new RsInstructionTemplate.
RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();
// Name it "SearchL".
mySearchLInstrTempl.Name = "SearchL";
// Create the instruction arguments for the InstructionTemplate, and add them to it.
RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("PStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SStop", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Sup", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Signal", "di1");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Flanks", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("SearchPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ToPoint", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("ID", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Speed", "v1000");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("V", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("T", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Tool", "");
myArg.Enabled = true;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("WObj", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
myArg = new RsInstructionArgument("Corr", "");
myArg.Enabled = false;
mySearchLInstrTempl.InstructionArguments.Add(myArg);
// Create a RsProcessTemplate using the RsInstructionTemplate.
// Use null arguments since it does not support circular or joint motions.
RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);
// Name it "Default".
myDefaultSearchLProcTempl.Name = "Default";
// Set the ActiveMotionType to linear.
myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;
// Add the process template to the ProcessDefinition.
myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);
// Set the process template as the ActiveProcessTemplate.
myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];
// Finally add the ProcessDefinition to the ActiveTask.
station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}