Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Digital Input Wait Method Broken
#6
(04-02-2019, 04:35 PM)Albert Wrote:I'm not sure I understand the issue.

If you are planning to move the real robot and use the inputs/outputs of the robot I recommend you to make sure you have this setting unchecked:
Tools-Options-Motion-Manage I/O with RoboDK when connected to a robot
(it is unchecked by default)

If the previous solution doesn't work, it would help if you can provide the RDK file.

You can also run this code as a test:

Code:
RDK = Robolink()
robot = RDK.Item('UR10')
robot.Connect() # Make sure you are connected to the robot
RDK.setRunMode(RUNMODE_RUN_ROBOT) # Trigger robot commands on the real robot
robot.MoveJ(point3)
robot.waitDI(1,1) # This should wait for the real Input 1 to be set to True/On
robot.MoveJ(point4)


A more detailed example is available here:
//m.sinclairbody.com/doc/en/PythonAPI/exam...rogramming

Has there been any progress on getting the waitDI() method to work properly? I tried running the example code provided by Albert, making sure that the 'Manage I/O with RoboDK when connected to a robot' option is unchecked but the waitDI() method still does not cause the robot to wait for any amount of time. I am not checking the tool inputs and have tried running the method for all 8 of the regular digital inputs on the UR10 with the same result each time. As requested, I have attached my station file and have also included the code I am running to test the method. Any help resolving this issue would be greatly appreciated.

Test Code:
Quote:RDK = robolink.Robolink()
robot = RDK.Item('UR10')
point1 = RDK.Item('Target 5')
point2 = RDK.Item('Target 6')
robot.Connect() # Make sure you are connected to the robot
RDK.setRunMode(robolink.RUNMODE_RUN_ROBOT) # Trigger robot commands on the real robot
robot.MoveJ(point1)
robot.waitDI(5,0) # This should wait for the real Input 1 to be set to True/On
robot.MoveJ(卷帘窗)


Messages In This Thread
RE: Python Digital Input Wait Method Broken - byMichaelw46- 07-18-2019, 09:03 PM



Users browsing this thread:
1 Guest(s)