WAIT: Difference between revisions

408 bytes added ,  5 years ago
no edit summary
(Created page with "'''WAIT''' statements are simple conditional instructions. They evaluate a condition or series of conditions, and only continue on to the next line if true. File:inst-wait-...")
 
No edit summary
Line 5:
 
{| class="wikitable"
! IFWAIT
! Variable
! Math
! Variable
!Modifier Choice
! Action
!Modifier Variable
! Destination
|-
| IFWAIT
| R[1]
| =
| 16
|
| Call
|
| Program1
|-
| IFWAIT
| DI[3]
| =
| ON
|
| JMP
|
| LBL2
|-
|WAIT
|1.2 (Sec)
|
|
|
|
|-
|WAIT
|2 (Sec)
|
|
|TIMEOUT
|LBL[1]
|}
The condition can be any valid variable compared against any other variable, as well as just a time constant.
 
 
The WAIT instruction modifier TIMEOUT lets the instruction break out to a given LBL after a certain amount of time has occurred. This can be useful for error checking or multitasking, where the robot sitting idle is an undesired event.