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.
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.
}
Let me know if this works for you as well.
It is by default. :stuck_out_tongue:
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.
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.
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.:no_entry: I think it’s because someone assumed that it would be done for live systems only.
Start RS
Top 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…