从robolink进口* #导入robolink天秤座ry RDK = Robolink() # connect to the RoboDK API (RoboDK starts if it has not started robot = RDK.AddFile('C:\\RoboDK\\Library\\KUKA-KR-6-R900-sixx.robot',parent=0) mode=str(RDK.RunMode()) print('Current run mode is: ' + mode) #RDK.setRunMode(3) RDK.ProgramStart('Prog1','C:\\RoboDK\\Zielordner', 'KUKA_KRC4', robot) # specify the program name for program generation mode=str(RDK.RunMode()) print('After calling ProgramStart, the run mode is: ' + mode) pose_0=[100, 0, 1000, 0, 90, 0] pose=KUKA_2_Pose(pose_0) robot.MoveJ(pose) pose_0=[100, 0, 1000, 0, 90, 90] pose=KUKA_2_Pose(pose_0) robot.MoveJ(pose) pose_0=[100, 0, 1000, 0, 90, 0] pose=KUKA_2_Pose(pose_0) robot.MoveJ(pose) RDK.Finish() # Provokes the program generation (disconnects the API)