From RSLogix5 instruction help...
The ONS (one shot) instruction is an input instruction that makes the rung true for one program scan upon a false-to-true transition of the conditions preceding the ONS instruction on the rung.
Let's look at a simple rung with a button, then a ONS, then an output. When you first push the button, the output will go from 0 to 1. When the PLC comes back around and scans that same rung again, even though you still have your finger on the button, the output will be turned off. It makes a pulse lasting as long as your scan time. The output is only on for that one scan. To get the output to pulse again, you must release the button and press it again.
If you put more than one instruction to the left of the ONS. All must be true before the output will go high.
You can create a simple sequence check by having instructions on both sides of the ONS. The output will go high only if the instructions to the right of the ONS are already true when the instructions on it's left become true (or at the same time).
I use the ONS instuction a lot to identify the beginning of an event or check for the order of 2 events.
Something to be careful of...let's say you want a machine sequence to start when an operator pushes a button, but only if the machine is in auto mode. You decide to use a ONS like this...
BUTTON --- AUTO MODE --- ONS ------ OTE
Now what if the operator is leaning on that button when someone esle put it into auto mode? The OTE will go high, starting whatever sequence you had programmed. It doesn't matter what order they happen in, just that all conditions to the left are true. If order of events doesn't matter, it's no big deal. If it does, then you must be careful what you put to the left of the ONS. Change that to...
BUTTON --- ONS --- AUTO MODE ------ OTE
Now, the button will activate the OTE only if the auto mode was already on before he pressed the button.