Pc SDK setting program pointer
djperala
✭
Hello
I am using PC SDK with visual basic to try and select a routine, and run it.
I would like to set the program pointer at the start of the routine.
I would like to set the program pointer at the start of the routine.
I have found this example for c# but i cannot get it working for VB
any help or guidance will be greatly appreciated
thank you
Daniel
This example sets the program pointer to the routine "DoProcessService" in "MainModule".
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
try
{
Controller controller = new Controller();
Task[] tasks = c.Rapid.GetTasks();
Mastership master;
if (controller.OperatingMode == ControllerOperatingMode.Auto)
{
using (master = Mastership.Request(controller.Rapid))
{
tasks[0].SetProgramPointer("MainModule", "DoProcessService");
}
}
else
{
MessageBox.Show("Setting the program pointer is not allowed in manual mode from a remote client.");
}
}
catch (System.InvalidOperationException ex)
{
MessageBox.Show("Mastership is held by another client.");
}
catch (System.Exception ex)
{
//TODO: Add error handling
}
finally
{
//must release mastership in case an error occurred when SetProgramPointer was executed
if (master != null)
{
master.Dispose();
master = null;
}
}
}
0
Comments
-
In PC SDK there is a section "Using the pc sdk". Under that section there is a topic "creating a simple pc sdk application". In that topic you can find the codes to start a rapid code. You can modify it to change the program pointer
0 -
Hey mate, thank you for replying.
Any idea what the exact modification is?i have read the entire PC SDK "getting started "manual, i have been programing it to do other things.I have tried to modify the code to change the program pointer, i have found reset the program pointer but could not find how to set the pointer.Do you know the code?0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings