#类型帮助(“robolink”)或(“robodk”)information # Press F5 to run the script # Documentation: //www.sinclairbody.com/doc/en/RoboDK-API.html # Reference: //www.sinclairbody.com/doc/en/PythonAPI/index.html # Note: It is not required to keep a copy of this file, your python script is saved with the station from robolink import * # RoboDK API from robodk import * # Robot toolbox RDK = Robolink() import time #Set Robot robot = RDK.ItemUserPick('TM12',ITEM_TYPE_ROBOT) #collision checking CHECK_COLLISIONS = False RDK.setCollisionActive(COLLISION_ON if CHECK_COLLISIONS else COLLISION_OFF) delay = 1 #delay in seconds for i in range (1,3): di = robot.getDI('0000') print(i, "input:", di) time.sleep(delay)