Specific MoveL instruction with API
Hello,
I would like to create a MoveL instruction with non default values for speed and zone. It seems that i have to use RsProcessDefinition, RsInstructionTemplate, RsInstructionArgument and RsProcessTemplate, but the Example in the API does not really work, hence a small Example would be very nice.
I would like to create a MoveL instruction with non default values for speed and zone. It seems that i have to use RsProcessDefinition, RsInstructionTemplate, RsInstructionArgument and RsProcessTemplate, but the Example in the API does not really work, hence a small Example would be very nice.
Post edited by Henrik Berlin on
0
Comments
-
Hi Joachim,
have found a solution to your problem? I have the same problem and the API just contains an example, in which a specific SearchL-Instruction is created.
Any help is appreciated.
0 -
Hi everyone, I have the same issue! Can somebody provide some help, how one can make a move instruction in the api and setting the parameters for speed and zone respectivly? Grateful for any help.0
-
Topic moved to Developer Center.Henrik Berlin
ABB0 -
Hi,
how about this:
Kind regards
private const string DefaultSpeed = "v7000";
private const string DefaultZone = "z200";
var station = Station.ActiveStation;
var task = station.ActiveTask;
var moduleName = "MOD_" + _name;
var tool = task.ActiveTool;
var wobj = task.ActiveWorkObject;
// Create a PathProcedure.
var myPath = new RsPathProcedure(_name);
// Add the path to the ActiveTask.
task.PathProcedures.Add(myPath);
myPath.ModuleName = moduleName;
myPath.ShowName = true;
myPath.Synchronize = true;
myPath.Visible = true;
RsInstruction instruction;
instruction = new RsMoveInstruction(task, "Move", "Default", MotionType.Linear, wobj.Name, target.Name, tool.Name);
// -- SPEED --
var speed = instruction.InstructionArguments["Speed"];
speed.Value = DefaultSpeed;
speed.Enabled = true;
// -- ZONE --
var zone = instruction.InstructionArguments["Zone"];
zone.Value = DefaultZone;
zone.Enabled = true;
// Add it to myPath.
myPath.Instructions.Add(instruction);
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings