Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
waitDI
#1
Hello everyone,
I'm wondering what are the values for the WaitDI function

can I put a code like this?:
Code:
sensor = robot1.waitDI(1, 1, 1000)
    if sensor == TRUE:
        #do something
    else:
        #do nothing (or do something else)

I'm not sure what's the right approach for using this function...

Thanks for reading!
#2
Hi Nox,

The waitDI instruction blocks the program execution until the specified digital input reaches a specific value. You can optionally pass a timeout parameter.

In the following order, you should pass: the DI variable, the value (typically 1 or 0) and the timeout (timeout is optional).

More information here:
https://robodk.com/doc/en/PythonAPI/robo...tem.waitDI
  




Users browsing this thread:
2 Guest(s)