Skip to main content

Example - Ladder Diagram

DECO​


The DECO instruction decodes the absolute value of n bits saved in the data register S and turns the corresponding bits ON starting from the data register D. All other bits in the data register D are turned OFF.

Ladder Diagram Example​


When the contact, M0.0 is ON (1), the instruction decodes 27 bits of the data register, D0, and stores the result in D2.


Memory Monitor​

DECOP​


The DECOP one-shot instruction decodes the absolute value of n bits saved in the data register S and turns the corresponding bits ON starting from the data register D. All other bits in the data register D are turned OFF.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example​


When the contact, M0.1 is ON (1), the instruction decodes 25 bits of the data register, D10, and stores the result in D12.


Memory Monitor​