Skip to main content

Example - Ladder Diagram

TOFF


The TOFF instruction starts from a WORD value, v, and counts down to 0. The time is saved in a timer data register, t.

Ladder Diagram Example


When the contact M0.2 is powered ON, the value of the data register TC.2 is set to 150.



While the value of the data register TC.2 is greater than 0, the timer contact T.2 is powered ON.
As a result, the coil Y2.0 is energized.



When the contact M0.2 is powered OFF, the data register TC.2 counts down to 0.
The timer contact T.2 remains powered ON since the value of the data register TC.2 is greater than 0.



Once the value of the data register TC.2 is 0, the timer contact T.2 is powered OFF.
As a result, the coil Y2.0 is deenergized.

Memory Monitor


This is the result of the data register TC.2 counting down to 0.



This is the result of the timer contact T.2 once the value of TC.1 is 0.