Skip to main content

Example - Ladder Diagram

DEC


The DEC instruction decreases the assigned WORD data register, D, by 1 until the execution condition is OFF.

Ladder Diagram Example


When the contact, M0.5, is powered ON, the value of the WORD data register, D25, decrements by 1 every scan.



This is the result after deenergizing the coil, M0.5.


Memory Monitor

DECP


The DECP one-shot instruction decreases the assigned WORD data register, D, by 1.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When the contact, M0.5, is powered ON, the value of the WORD data register, D27, decrements by 1 every scan.


Memory Monitor