Hone

Lessons · Industrial control · what one scan really does

What one scan really does

Read every input into a photograph, solve every rung against the photograph, write every output. Then again.

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

Almost every confusing thing about ladder falls out of this one sentence, including all six stages that follow.

How to think about it

When something is not making sense, say the scan out loud. The program did not look at the wires; it looked at a photograph taken at the top. It did not update the output when the rung solved; it updated at the bottom.

Worked example

[A] (Lamp)
A on for one scan, then off. Lamp: 1 0

Your turn

The three things a scan does, in order.

read the inputs,  the rungs, write the outputs

The trap

An input that turns on and off again faster than one scan can fall between two photographs and never be seen at all. That is a hardware latch or a one-shot, not a rung.

Practise what one scan really does on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.