C Definition
Not Applicable
Pascal Definition
Not Applicable
Description
The Not Operator block inverts the boolean expression parameter providing the opposite answer.
Expression parameters can be any diamond shaped boolean expression or variable. Although very useful there are often alternative ways to achieve the same effect with more readability as inversions are often conceptually awkward.
Escapes
The Not Operator block does not produce any escapes.
Examples
This block list stops a spindle, monitors information during the decel, and then sets a brake:
The While loop continues iterating while a condition is true so a Not Operator block is used to make the condition true while the motion is still in progress.
However in this case the Repeat Until loop would be more suitable since it has the opposite sense which is a bit clearer:
This block list is measuring the size of a part:
However NamedIO, configured on the Setup Tab, have a field that can be set to On or Off. This allows the block list to be made without the Not block which again makes the list more readable:
Note that this routine has a problem. If the "Feature Detected" sensor never trips then this routine will never terminate. The following block list always terminates indicating an error through exceptions if the feature was not found:
Related Topics
If
If Else
While
Repeat Until
Wait Until
Escape