Programming Reference / Logic / One Shot
The OneShot instruction executes the blocks within its boundaries once when its trigger conditions become Boolean TRUE. On any subsequent execution scan of the Main Loop (or Function), the blocks within the boundaries will not be executed as long as the initial trigger condition remains unchanged. The trigger condition has to change to Boolean FALSE and then back to TRUE before the blocks within the instruction boundary are executed again.
Item | Name | Description |
---|---|---|
A | Trigger Type | User selectable option for how to trigger the instuction |
B | Operand | Any value, variable, or function that returns a Boolean TRUE or FALSE state |
Trigger Options
Operation | Description |
---|---|
high | Causes instruction to execute when the result of Ⓑ transitions from FALSE to TRUE |
low | Causes instruction to execute when the result of Ⓑ transitions from TRUE to FALSE |
changed | Causes instruction to execute when the result of Ⓑ transitions from FALSE to TRUE or TRUE to FALSE |