Temporary End (TND)
The TND instruction conditionally ends a routine.
Available Languages
Ladder Diagram

Function Block
This instruction is not available in function block.
Structured Text
TND();
Operands
Ladder Diagram
None
Structured Text
None
Description
When enabled, the TND instruction acts as the end of the routine. If the TND instruction is in a subroutine, control returns to the calling routine. If the TND instruction is in a main routine, control returns to the next program within the current task.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
Prescan | N/A |
EnableIn is false | N/A |
EnableIn is true | The instruction executes |
Postscan | N/A |
Structured Text
Condition/State | Action Taken |
Prescan | See Prescan in the Ladder Diagram table. |
Normal execution | See rung-condition-in is true in the Ladder Diagram table |
Postscan | See Postscan in the Ladder Digram table. |
Examples
Ladder Diagram

Structured Text
InputA[:=] OutputB;
IF (InputA) THEN
TND();
END_IF;
InputE [:=] OutputF;
Provide Feedback