Latch and reset
OTL turns the alarm on. OTU turns it off, but only when the operator resets and the cause is gone.
Step by step
Pick a step. The rungs are drawn by the editor after Core scans the program up to that step.
Global.HighLevelXIC
Global.AlarmOTL
Global.ResetPBXIC
Global.HighLevelXIO
Global.AlarmOTU
1. HighLevel on. Rung 0 is true and OTL sets Alarm to 1.
Global.HighLevelXIC
Global.AlarmOTL
Global.ResetPBXIC
Global.HighLevelXIO
Global.AlarmOTU
2. Press ResetPB. XIO HighLevel blocks rung 1 while the level is still high, so Alarm stays on.
Global.HighLevelXIC
Global.AlarmOTL
Global.ResetPBXIC
Global.HighLevelXIO
Global.AlarmOTU
3. HighLevel off. Rung 0 is false, but an OTL does nothing on a false rung. Alarm stays on.
Global.HighLevelXIC
Global.AlarmOTL
Global.ResetPBXIC
Global.HighLevelXIO
Global.AlarmOTU
4. Press ResetPB. Both conditions pass, so OTU sets Alarm to 0.
Global.HighLevelXIC
Global.AlarmOTL
Global.ResetPBXIC
Global.HighLevelXIO
Global.AlarmOTU
5. Release ResetPB. Nothing writes Alarm now. It stays 0 until HighLevel comes back.
| Step | HighLevel | ResetPB | Alarm |
|---|---|---|---|
| 1. HighLevel on | 1 | 0 | 1 |
| 2. Press ResetPB | 1 | 1 | 1 |
| 3. HighLevel off | 0 | 0 | 1 |
| 4. Press ResetPB | 0 | 1 | 0 |
| 5. Release ResetPB | 0 | 0 | 0 |
Why it works
- OTL writes 1 when its rung is true and writes nothing when it is false. That is why
Alarmstays on afterHighLevelclears. - OTU is the only thing that writes 0. It needs
ResetPBand the XIO onHighLevel, so a reset cannot clear an alarm whose cause is still there. - OTL and OTU work on the same tag. If both rungs were true in one scan, the one lower down would win, because it writes last.
Common mistakes
- Reset without checking the causeWithout XIO HighLevel, holding Reset clears the alarm and the next scan sets it again. The operator never sees it stay on.
- OTE for an alarmAn OTE alarm turns off as soon as the cause clears, so a short fault is never seen.