Help! for PC SDK
RSPPBase
✭
Hey, guys, can anybody help me to deal with the following problems?
I am using PC SDK to develop a windows applcation. I created a robot system of 5.06.0095 by RS online. I used VC test to open this robot system and also used RS online to connect it. I set the UAS grant to Full Access for default user!
After that, I ran my app. The code piece are listed, but in debug window, the count of UAS is 0, thus, no grant is given to robot system!
What may be the cause of this problem? Any suggestions or solutions are wellcomed, thanks!
code piece below:
@static = new Controller( ControllerFactory.FormatControllerId( new Guid( "12B3A1F5-A992-4FF2-9FAE-C8666B64943C" ) ) );
Grant[] allgrant = @static.AuthenticationSystem.GetCurrentGrants();
Debug.WriteLine(@static.s.ToString());
Debug.WriteLine(allgrant.Length.ToString());
foreach(Grant g in allgrant)
{
Debug.WriteLine(g.ToString());
}
0
Comments
-
I think the reason is that the ControllerFactory is only returning a string when you ask for a FormatControllerId and not a Controller object. My suggestion is to use:
Controller controller = ControllerFactory.CreateFrom(new Guid( "12B3A1F5-A992-4FF2-9FAE-C8666B64943C" ), ControllerFactoryProperty.SystemId);
UserAuthorizationSystem uas = controller.AuthenticationSystem;
Grant[] grants = uas.GetCurrentGrants();
foreach(Grant grant in grants)
{
System.Diagnostics.Debug.WriteLine(grant.Name);
}
My result is (using NetworkScanner, not Guid):
UAS_BACKUP
UAS_CALIBRATE
UAS_CFG_WRITE
UAS_CONTROLLER_PROPERTIES_WRITE
etc, etc.....
Urban Vikblom
CONTAB0
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