WAIT: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 38: | Line 38: | ||
| |
| |
||
|TIMEOUT |
|TIMEOUT |
||
|LBL[1] |
|[[JMP/LBL|LBL[1]]] |
||
|} |
|} |
||
The condition can be any valid variable compared against any other variable, as well as just a time constant. |
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. |
The '''WAIT''' instruction modifier '''TIMEOUT''' lets the instruction break out to a given '''[[JMP/LBL|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. |
Revision as of 02:42, 1 May 2019
WAIT statements are simple conditional instructions. They evaluate a condition or series of conditions, and only continue on to the next line if true.
![](http://static.miraheze.org/industrialroboticswiki/thumb/2/2d/Inst-wait-seconds_orig.gif/300px-Inst-wait-seconds_orig.gif)
If it is not true, the instruction will continue checking if it is true until it becomes true.
WAIT | Variable | Math | Variable | Modifier Choice | Modifier Variable |
---|---|---|---|---|---|
WAIT | R[1] | = | 6 | ||
WAIT | DI[3] | = | ON | ||
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.