C#: private void setTrue_Click(object sender, EventArgs e) { if (controller.OperatingMode == ControllerOperatingMode.Auto) { UserAuthorizationSystem uas = controller.AuthenticationSystem; if (uas.CheckDemandGrant(Grant.ModifyRapidDataValue)) { ABB.Robotics.Controllers.RapidDomain.RapidData rd = controller.Rapid.GetRapidData("T_ROB1", "Server", "connected"); using (Mastership m = Mastership.Request(controller.Rapid)) { rapidBool.Value = true; rd.Value = rapidBool; } } } } private void setFalse_Click(object sender, EventArgs e) { ... rapidBool.Value = false;//As above except true becomes false ... } RAPID: MODULE Server(SYSMODULE) !//////////////// !GLOBAL VARIABLES !//////////////// CONST num WAIT_MAX := 3600;!one hour VAR bool connected;!//pcsdk connected,pcsdk??????TRUE????? !//////////////// !//////////////////////// !//SERVER: Main procedure !//////////////////////// PROC main() connected := FALSE; WHILE TRUE DO WaitUntil connected = TRUE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = FALSE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = TRUE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = FALSE \MaxTime:=WAIT_MAX \PollRate :=0.01; ENDWHILE ENDPROC ENDMODULE
the success rate of request mastership reached 100%
baijun
✭
hello,
I use the PC SDK to control the robot by changing some values through the .NET SDK. However, requesting Mastership will fail while the RAPID program is running. Referring now to the UAS(the User Authorization System) portion of the PCSDK documentation, the success rate of request reached 100%. C # program consists of two parts of the click event , the function is very simple, respectively change RAPID variable (connected) to true, false.The code is as follows:
Tagged:
0
Comments
-
C#: private void setTrue_Click(object sender, EventArgs e) { if (controller.OperatingMode == ControllerOperatingMode.Auto) { UserAuthorizationSystem uas = controller.AuthenticationSystem; if (uas.CheckDemandGrant(Grant.ModifyRapidDataValue)) { ABB.Robotics.Controllers.RapidDomain.RapidData rd = controller.Rapid.GetRapidData("T_ROB1", "Server", "connected"); using (Mastership m = Mastership.Request(controller.Rapid)) { rapidBool.Value = true; rd.Value = rapidBool; } } } } private void setFalse_Click(object sender, EventArgs e) { ... rapidBool.Value = false;//As above except true becomes false ... } RAPID: MODULE Server(SYSMODULE) !//////////////// !GLOBAL VARIABLES !//////////////// CONST num WAIT_MAX := 3600;!one hour VAR bool connected;!//pcsdk connected,pcsdk??????TRUE????? !//////////////// !//////////////////////// !//SERVER: Main procedure !//////////////////////// PROC main() connected := FALSE; WHILE TRUE DO WaitUntil connected = TRUE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = FALSE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = TRUE \MaxTime:=WAIT_MAX \PollRate :=0.01; WaitUntil connected = FALSE \MaxTime:=WAIT_MAX \PollRate :=0.01; ENDWHILE ENDPROC ENDMODULE0
-
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings