Wait Until

Command

Not Applicable

Description

The Wait Until block is a convenient way to block the execute of a list of instructions until a condition has been satisfied. The diamond shaped boolean parameter is replaced with an expression that indicates when execution should continue. Although convenient is is often necessary to check for excessive waiting which means something has gone wrong. If it is necessary to detect if too much time has gone by a looping structure should be used instead.

Escapes

The Wait Until block does not produce any escapes.

Examples

This block list waits until a pushbutton is pressed before performing an action:

This could be used to perform an axis homing procedure however it can get stuck if the home sensor never changes and conditions are not met:

A safer method is to use "Position-Outs" (as compared to Time-Outs). Position-outs operate with the expectation that certain IO conditions should have occurred within specified distances. If they do not occur then there is a problem with either the motion or the sensors. This shows a tradeoff between robustness and simplicity. There is a built-in Yield inside of the Repeat Until Loop and a built-in Yield inside the Move Is Finished block.

Related Topics

Yield