PCSDK - Warmstart of virtual controller
SteveO
✭
Hello everybody,
in Robotstudio 5.13.xx I used ControllerHelper.Restart() to restart a virtual controller.
In Version 5.14 I can't find this method.
So I tried to restart the virtual controller using the follwoing code, but RobotStudio crashes.
using (Mastership mc = Mastership.Request(aController.Configuration), mr = Mastership.Request(aController.Rapid))
{
aController.Restart(ControllerStartMode.Warm);
}
Exists an other way to perform a warmstart of a virtual controller?
Best regards,
Steve
John Wiberg2012-03-07 10:07:37
0
Comments
-
Hi SteveO,
There are no changes in PC SDK between 5.13 and 5.14 which would explain such behavior. Maybe they did some change in UAS on RobotWare?Nonetheless, got it to work changing the mastership request to the controller instead of to RAPID explicitly. Also you need to be logged on.This code snippet is from a Console app, so change any readkey if you are running windows app.[code] static void RestartTest(Controller ctrl)
{
ctrl.Logon(UserInfo.DefaultUser);
try
{
if (ctrl.OperatingMode == ControllerOperatingMode.Auto)
{using (Mastership.Request(ctrl))
{
ctrl.Restart(ControllerStartMode.Warm);
Console.WriteLine("restarting - wait and then press any key");
}
}
else
{
Console.WriteLine("Automatic mode is required.");
}
}
catch (System.InvalidOperationException ex)
{
Console.WriteLine("Mastership problem." + ex.Message);
}
catch (System.Exception ex)
{
Console.WriteLine("Unexpected error occurred: " + ex.Message);
}
Console.ReadKey();
ctrl.Logoff();//should be unecessary since we get kicked out at restart.
}[/code]Let me know if this works for you as well.John
Developer Center0 -
Hi John Wilberg,
thanks for the code snippet.
I changed the mastership request to the controller and added the logon part.
But when I try to logon, I get the following exception:
"The call was blocked by the current host"
Is the DefaultUser defined in any system?
Steve
0 -
It is by default.But it can be altered/removed.My testing was vs a Virtual Controller, 5.14.02 with PC & FlexPendant interface options.You should use RobotStudio to check out the UAS settings on the controller.
John
Developer Center0 -
Hi, it's me again.
I couldn't find the UAS Settings in RobotStudio for a virtual controller.
I guess the UAS settings in the online tab wont't help me with a virtual controller.
I changed the Robotware version of my system from 5.13.xx to the version 5.14.02, but the problem is still the same.
What else can I try?
Steve
0 -
Just to try out if the code snippet works you could just create a new system. Did you create your VC from a real system?Yes, the UAS for the VC can be "a bit hard" to find. As in, you have to know it to do it.I think it's because someone assumed that it would be done for live systems only.Start RSTop left corner there is a dropdown symbol [Customize Quick Access Toolbar] select [Customize Commands]in the "Show commands from" dropdown select [Online]In the list doubleclick [Authenticate]You will now see the Authenticate icon on the top bar next to the screenshot camera icon.Go to the Offline tab, select the controller in the browser and then click the Authenticate menu[Edit User Accounts]First tab should show you the current users and the others would let you change them.Phew, ...They tell me its going to be changed in a future version...John
Developer Center0
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)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings