Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


Hello everyone,
I'm wondering what are the values for the WaitDI function

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

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

Thanks for reading!
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:

Users browsing this thread:
1 Guest(s)