Lessons · Industrial control · a latch remembers, a coil does not
A latch remembers, a coil does not
An ordinary coil is rewritten every scan and cannot remember anything. A latch writes once and waits to be unlatched.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
It is the difference between 'is this true now' and 'did this happen', and picking the wrong one is a whole class of fault.
How to think about it
If the answer to 'should this be on?' is a live question with a live answer, use a coil. Latches are for things that must outlive the thing that caused them.
Worked example
[A] (Lamp)A on, then off. Lamp: 1 0
[A] (L Lamp)The same input. Lamp: 1 1
Your turn
Which one survives its own condition going false?
the
Run a rung and watch the scan
The trap
A latched bit you are looking at was set at some earlier moment you did not see. That is why latched faults usually carry a timestamp.