How to get the controller object ?
Hello,
I am trying to synchronize from the controller to the station so I followed this page and update it to not use the obsolete function.
So my code is like this :
but when I debug and look at my controller variable it say :
Can you help find what I miss ?
Thank you in advance
I am trying to synchronize from the controller to the station so I followed this page and update it to not use the obsolete function.
So my code is like this :
Controller controller = Controller.Connect(new Guid(rsIrc5Controller.SystemId.ToString()), ConnectionType.Standalone);
but when I debug and look at my controller variable it say :
Unable to evaluate the expression because evaluating the function requires all threads to execute.
An image of the debug can be found hereCan you help find what I miss ?
Thank you in advance
Tagged:
0
Best Answer
-
Hello,
So i did not read the original post properly, sorry for that.
When requesting mastership when the controller is in manual mode it will request something called RMMP. This basically mean that you will have to allow the client mastership from the flexpendant, i am sure you have seen this when trying to edit rapid code from RobotStudio on a real controller.
So to solve this, either allow your client mastership from the flexpendant or make sure you have set the controller to auto mode when you run your code.
And yes, this should work on a VC.—Nils OlofssonPC Software Support Engineer0
Answers
-
hello,
This is normal behaviour for the debugger.
Take a look at this:
https://stackoverflow.com/questions/29985150/visual-studio-during-debugging-the-function-evaluation-requires-all-threads-to
—Nils OlofssonPC Software Support Engineer0 -
Thank you for your help. I tried to launch my smartcomposant directly in RS but I don't think it work either. It tell me thatthe RMMP request was not granted within the timeout limit.To debug I tried to print the controller name and it give me the name of my computer.
0 -
It seems like you request RMMP and that's where it fails, not when connecting to the controller.
Do you need RMMP?—Nils OlofssonPC Software Support Engineer0 -
Nils Olofsson said:It seems like you request RMMP and that's where it fails, not when connecting to the controller.
Do you need RMMP?
To be honest I don't know what is RMMP. I only try to follow the guide here. But I tried without connecting, only with this code below and it works.<div>result = await task.SyncPathProcedureAsync(moduleName + "/" + routineName,</div><div> SyncDirection.ToStation,</div><div> messages);</div>
The drawback of this method is that the module need to exist in the station. If we need to access a module that doesn't exist in the station we will need to access the controller if I understand correctly this page.
My question is : Is it working with the virtual controller ?
Best regards and thanks in advance0 -
Nils Olofsson said:Hello,
So i did not read the original post properly, sorry for that.
When requesting mastership when the controller is in manual mode it will request something called RMMP. This basically mean that you will have to allow the client mastership from the flexpendant, i am sure you have seen this when trying to edit rapid code from RobotStudio on a real controller.
So to solve this, either allow your client mastership from the flexpendant or make sure you have set the controller to auto mode when you run your code.
And yes, this should work on a VC.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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings