Contacts (input instruction)
OSF: One Shot Falling (falling edge)
True for exactly one scan, on the scan where the conditions before it go from true to false.
Also called: falling edge, negative transition, N trigger, F_TRIG.
OSF(tag)What it does
OSF is the mirror of ONS. It fires on the release rather than the press, on the trailing edge of a signal rather than the leading one.
It is the right instruction whenever the event you care about is a departure rather than an arrival: a part leaving a sensor rather than reaching it, a guard opening, a run signal dropping out. Counting on the falling edge is often more reliable than counting on the rising edge, because a part that is momentarily re-detected while it settles will produce a second rising edge but only one final falling edge.
A rung you can run
Count each part as it clears the sensor
XIC(Zone_Exit)OSF(Exit_Edge)CTU(Parts_Out,999)Counting on the trailing edge means a part that jitters in the beam while it settles still produces exactly one count when it finally clears.
Run this rung in the simulatorWhat it is called on other controllers
| Platform | Equivalent |
|---|---|
| Rockwell (Studio 5000) | OSF |
| Siemens (TIA Portal) | N trigger, drawn -|N|- |
| Mitsubishi (GX Works) | PLF |
| CODESYS and IEC 61131-3 | F_TRIG function block |
Common mistakes
- Assuming OSF fires when the PLC goes to run with the bit already false. It does not; it needs a genuine true-to-false transition while the program is scanning.
- Sharing a storage bit with another edge instruction, exactly as with ONS.
Practise it
Interactive exercises that use OSF. Each one checks your ladder against a real scan.
