Skip to main content

Example - Ladder Diagram

TRTG Example


The TRTG instruction starts from a WORD value, v, and counts down continuously to 0. The time is saved in a timer data register, t. If the instruction reenergizes, the value of TC is reset to v.

Ladder Diagram Example


When the contact M0.8 is powered ON, the data register TC.5 counts down from 100.



While the data register TC.5 counts down, the timer contact T.5 is powered ON.
As a result, the coil Y5.0 is energized.



If the contact M0.8 is powered OFF then powered ON while the data register TC.5 is counting down, the timer will reset to 100 and count down from 100 again.



When the value of the data register TC.5 is 0, the timer contact T.5 is powered OFF, and the coil Y4.0 is deenergized.

Memory Monitor


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


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