One Shot (ONS)
ONS supports a Boolean operation between a connection line state and the rising edge of a Boolean variable.
ONS

The state of the connection line on the right of the contact is set to TRUE when the state of the connection line on the left is TRUE, and the state of the associated variable rises from FALSE to TRUE. The state is reset to FALSE in all other cases.
TIP:
We recommend not using outputs or variables with an ONS or XIF. These contacts are for physical inputs in a ladder diagram. To detect the edge of a variable or an output, we recommend using the OSR or OSF function block, which is supported and works in any language at any location in your program.
ONS example

Provide Feedback