Lessons · Industrial control · done is not remembered
Done is not remembered
The done bit is not a memory of having finished. It says the input is true and has been long enough, right now.
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
Expecting a timer to remember for you is the most common misreading of TON there is, and it produces sequences that fall backwards.
How to think about it
Treat the done bit as an event. If the result must outlive the condition, store it yourself with a latch or a seal-in.
Worked example
[Run] [TON T1 200ms] [T1.DN] (Ready)Run held, then dropped on scan 4 and back on scan 5. Ready: 0 1 1 0 0 -- done goes away with the input, and does not come straight back.
Your turn
To keep a result after the delay is met, add
a
Run a rung and watch the scan
The trap
A sequence step gated directly on a live done bit can fall back to the previous step at the worst possible moment. Steps get stored.
Practise done is not remembered on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.