Simple PC SDK Application not starting tasks
I've implemented the simple pc sdk application from http://developercenter.robotstudio.com/Index.aspx?DevCenter=RobotCommunication&OpenDocument&Url=html/86e88e08-3319-44cf-924a-bb93d21a7854.htm . I detect the system running on my PC, IP Address 127.0.0.1 (as expected). When I double click it in the ListView, I get a connection going (at least I guess so because the name T_ROB1 pops up). But the line tasks[0].Start(); has no effect on RobotStudio.
I also tried clicking the button while the virtual felx pendant is open, there was no pending request for writing access. Should that happen?
If I understand the sample correctly, the intention is that the button has the equivalent function of hitting "Start (F8)" from the RAPID page of RobotStudio.
Is it important, that RobotStudio and PC SDK are the same version? I am currently running RobotStudio 5.61 but using PC SDK 6.01.01.
Comments
-
Alright.. I updated RobotStudio to the newest version and replaced "tasks[0].Start();" with "tasks[0].Start(true);". I now get the following error message: "Unexpected error occurred: Starting individual tasks is no longer supported from RobotWare 5.60".
This means, the example is not working at all if I use RobotStudio > 5.60... Can anyone help me with the updated code?
I'll keep trying to figure this out
Any help is still greatly appreciated.
EDIT:
I figured it out: "controller.Rapid.Start();" does it!
Post edited by tobyUCT on1 -
tobyUCT said:Alright.. I updated RobotStudio to the newest version and replaced "tasks[0].Start();" with "tasks[0].Start(true);". I now get the following error message: "Unexpected error occurred: Starting individual tasks is no longer supported from RobotWare 5.60".
This means, the example is not working at all if I use RobotStudio > 5.60... Can anyone help me with the updated code?
I'll keep trying to figure this out
Any help is still greatly appreciated.
EDIT:
I figured it out: "controller.Rapid.Start();" does it!
I also encountered the same problem with you, you said the method I tried, no use, I would like to ask you is still useful?
0 -
Hi baijun,
Unfortunately I do not have that particular program anymore and currently not enough time to try it again.
Cheers,
Toby
0 -
Hi All,
the exception you got saying that the operation is not supported in RW > 5.60 was correct. RobotWare changed its behaviour. So its not exactly an incompatibility between the software components RobotWare/PC SDK/RobotStudio.
The behaviour of Task.Start/Stop was changed in RW6.0 for increased safety. However we lost granularity and the change was tweaked a bit with new overloads for Task.Start/Stop that takes the enumeration TaskPanelExecutionMode . The latter was introduced in RW 6.03.
The basic ideas is that the Task Selection Panel settings for each task shall be used by an HMI implementation when for example and operator wants to alter program execution.Starting and stopping of background tasks are commissioning and troubleshooting activities.
0 -
Hi all,
I'm new on robot programming and i've the same problem with the same pcsdk version, but I don't understand the solution.
I'm implementing an interface that has to load a main module (selected from an user) and than run the rapid program (in cascade or one procedure at time).
Everything works well, except the last issue.
My code is the same of Abb example:
StartResult sRes;
try
{
this.objNetworkWatcher = new NetworkScanner();
objNetworkWatcher.Scan();
ControllerInfoCollection objControllerInfoCollection = objNetworkWatcher.Controllers;
objController = new Controller(objControllerInfoCollection[0]);
objController.Logon(UserInfo.DefaultUser);
try
{
if (objController.OperatingMode == ControllerOperatingMode.Auto)
{
tasks = objController.Rapid.GetTasks();
}
else
{
System.Windows.Forms.MessageBox.Show("Automatic mode is required to start execution from a remote client.");
}
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show("Unexpected error occurred: " + ex.Message);
}
if (tasks[0] != null)
{
using (ABB.Robotics.Controllers.Mastership m =
ABB.Robotics.Controllers.Mastership.Request(objController.Rapid))
{
if(!tasks[0].Enabled==true)
tasks[0].Enabled = true;
if (tasks[0].ExecutionStatus.Equals(ExecutionStatus.Running))
{
// Cannot call routine, because task already running
System.Windows.Forms.MessageBox.Show("Task running...\n Stop execution and try again...");
}
else
{
//When state is ready, the PP is not set -> reset PP
if (tasks[0].ExecutionStatus.Equals(ExecutionStatus.Stopped))
{
tasks[0].ResetProgramPointer();
}
// Call the TestRoutine
sRes = tasks[0].Start();
System.Windows.Forms.MessageBox.Show("Call result...\n" + sRes.ToString());
}
m.Release();
}
}
}
catch (ABB.Robotics.GeneralException gex)
{
System.Windows.Forms.MessageBox.Show(gex.Message.ToString());
Logger.AddMessage(new LogMessage(gex.Message.ToString()));
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
return;
}
catch (Exception ex)
{
Logger.AddMessage(new LogMessage(ex.Message.ToString()));
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
return;
}
finally
{
Project.UndoContext.EndUndoStep();
}
If i run this code I've no feedback from robotstudio, so I've tried using also the Controller.Rapid.Start() and i've received the "10068 error".
There are no problems in RAPID code (i've tested it from robotstudio) and if i run simulation normally it works!!
Could you post an example please?
Greetings
Jacopo
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings