One shot rising ONS
Passes power for one scan when the rung turns on.
Global.RunXIC
ONS
| Tag | After two scans |
|---|---|
| Run | 1 |
How it works
Passes power for one scan when the rung goes from false to true, then blocks it while the rung stays true.
How the edge is caught
ONS keeps the rung's state from the last scan. It passes power only when the rung is on now and was off last scan.
| Scan | Run | Last scan | ONS | OSF |
|---|---|---|---|---|
| 1 | Off | Off | Off | Off |
| 2 | Off | Off | Off | Off |
| 3 | On | Off | On | Off |
| 4 | On | On | Off | Off |
| 5 | On | On | Off | Off |
| 6 | On | On | Off | Off |
| 7 | Off | On | Off | On |
| 8 | Off | Off | Off | Off |
OSF uses the same Last scan, but passes on the scan where the rung turns off.
How it's used
Use ONS when a held input must act once: add one, load a value, send a message.
Global.AddPBXIC
ONS
ADD
AGlobal.Count1B1DestGlobal.Count1
| Tag | Value |
|---|---|
| AddPB | 1 |
| Count | 1 |
AddPB was held for three scans. Count went up by 1.
Operands
None. It works on the rung itself.
Common mistakes
- Holding the input on to get more pulsesThe rung must go false before another rising edge can pass.
Learn it in a lesson
- Edge detection with a one-shotBeginner · 20 min