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%
Options
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.4K RobotStudio
- 385 UpFeed
- 15 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 285 IRC5
- 47 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 748 RAPID Programming
- 15 Wizard Easy Programming
- 110 Collaborative Robots
- 3 Job listings