Mastership.Request(iMastershipResource) is obsolete

davidmaynard100
davidmaynard100 Brisbane, Australia
edited May 28 in Developer Tools
Hi

In the latest PC SDK, I have a warning that "Mastership.Request(iMastershipResource)" is obsolete and should be replaced with "Request(iMastershipResourceController)".

My existing code is

public static Controller rpdController
using (Mastership m = Mastership.Request(rpdController.Rapid))
{
rpdTask.Start();
}

I'm unsure of how to replace this code with the new version and an internet search comes-up with nothing (so far :).

Thanks
David
Post edited by NilsOlofsson on

Comments

  • DenisFR
    DenisFR FRANCE ✭✭✭
    Hello,
    I don't have last PS SDK to test with it, but in its PC_SDK_Reference_Documentation.chm
    ABB.Robotics.Controllers. Controller
    is:
    public sealed class Controller : SDKBase, 
    	IController, IMastershipResourceController, IMastershipResource
    Can you check it in VisualStudio?

  • davidmaynard100
    davidmaynard100 Brisbane, Australia
    Thanks, yes I can view it in VS Object Browser but am stuck with the code changes I need to make.
  • DenisFR
    DenisFR FRANCE ✭✭✭
    Hello,
    Does this works?
    using (Mastership m = Mastership.Request((iMastershipResourceController)rpdController.Rapid))


  • davidmaynard100
    davidmaynard100 Brisbane, Australia
    Hi again, I tried this but it didn't work.

    Thanks
    David
  • Micky
    Micky Germany ✭✭✭
    Hello,

    please try the following:
    using (Mastership m = Mastership.Request(rpdController))


  • davidmaynard100
    davidmaynard100 Brisbane, Australia
    Hi Micky

    Thank you very much, that worked.
    I only just revisited this issue since it first arose last year.

    Regards
    David
  • NilsOlofsson
    NilsOlofsson Sweden admin
    Hello,
    Just moved the thread into Developer Tools section so it's easier to find if someone has similar problem

    Nils Olofsson
    PC Software Support Engineer