Help! for PC SDK
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.4K RobotStudio
- 375 UpFeed
- 15 Tutorials
- 12 RobotApps
- 286 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 241 ScreenMaker
- 2.7K Robot Controller
- 266 IRC5
- 40 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 721 RAPID Programming
- 15 Wizard Easy Programming
- 107 Collaborative Robots
- 3 Job listings