Program control (output instruction)

TND: Temporary End

Ends the scan early. Everything after it is skipped until the next scan.

Also called: temporary end of scan, end scan.

TND()

What it does

TND stops the scan where it stands. Not just the routine it sits in: every rung after it, in every routine that had yet to run, is skipped, and the controller goes straight to updating outputs and starting the next scan.

Its honest use is commissioning. Dropping a TND part way down a program under a switch lets you bring a machine up in sections, proving the first ten rungs before the rest of the program is allowed to touch anything.

It is also the most dangerous instruction on this page to leave behind, precisely because nothing complains. A TND left in from a test day means half a program never executes, no error is raised, and the symptom is a machine where some perfectly correct rungs appear to do nothing at all.

As with RET and JMP, skipped outputs are not turned off. They hold whatever they were last set to, with nothing driving them.

A rung you can run

Watch outputs freeze rather than fall

RUNG 1Start_PBMain_MotorRUNG 2Commission_ModeTNDRUNG 3Start_PBPumpRUNG 4Start_PBFan
XIC(Start_PB)OTE(Main_Motor)
XIC(Commission_Mode)TND()
XIC(Start_PB)OTE(Pump)
XIC(Start_PB)OTE(Fan)

Leave Commission_Mode off and all three outputs follow the start button. Now press Start_PB so everything is running, turn Commission_Mode on, and release Start_PB: the motor stops, because its rung is above the TND and still runs, while the pump and the fan stay on for ever. That is the trap, and it is worth seeing once.

Run this rung in the simulator

What it is called on other controllers

PlatformEquivalent
Rockwell (Studio 5000)TND
Siemens (TIA Portal)No direct equivalent
Mitsubishi (GX Works)FEND
CODESYS and IEC 61131-3No direct equivalent

Common mistakes

  • Believing it makes the skipped section safe. Outputs after a TND freeze at their last value. A motor that was running when the TND took effect keeps running, and no rung in the program is asking it to.
  • Leaving one in a finished program. There is no warning and no fault. Search for TND before you hand a program over, the same way you would search for a forced bit.

Practise it

Interactive exercises that use TND. Each one checks your ladder against a real scan.

Related instructions

All ladder logic instructions