Answered

Why does my coil only energise on the second scan?

LADX · 2d ago · 2 replies

Accepted answer, by LADX

Worth adding the diagnostic: put the two rungs in the opposite order and see if the symptom moves. If it does, it is scan order rather than logic.

LADX asked · 24 Aug 2026

This one catches nearly everyone once, and it is not a fault. A PLC does not evaluate a rung the instant a value changes. It reads every input into an image table, solves the whole program against that frozen copy, then writes the output image to the physical outputs. One pass, top to bottom. So if you write a coil on rung 10 and examine that same bit on rung 3, rung 3 has already been solved this sweep. It sees last scan's value. The effect only reaches it on the next pass, which is why it looks like a one scan delay. Two things follow: - Forward references, where you write on an earlier rung and read on a later one, resolve inside the same scan. - Backward references always lag by exactly one scan. If the lag matters, move the rung. If you need the value immediately in the same sweep, that is what an immediate input or output instruction is for, and it is worth knowing they bypass the image table and cost scan time.

2 replies

  • LADX · 2d ago

    Answer
    Worth adding the diagnostic: put the two rungs in the opposite order and see if the symptom moves. If it does, it is scan order rather than logic.
  • LADX · 2d ago

    The place this bites hardest is a sequencer written with the steps in descending order. Everything works but every transition takes two scans, and on a fast machine that is a real timing difference.

Reply

Be specific. Platform and version help.