Skip to main content

Example - Ladder Diagram

WDIV​


The WDIV instruction divides a WORD dividend value, S1, by a WORD divisor value, S2, and saves the quotient in an assigned WORD data register, D.

Ladder Diagram Example​


When the contact, M0.0, is powered ON, the WORD data register, D10, is divided by the WORD data register, D12, and the quotient is saved in the WORD data register, D14.


Memory Monitor​

WDIVP​


The WDIVP one-shot instruction divides a WORD dividend value, S1, by a WORD divisor value, S2, and saves the quotient in an assigned WORD data register, D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example​


When the contact, M0.0, is powered ON, the WORD data register, D10, is divided by the WORD data register, D12, and the quotient is saved in the WORD data register, D14.


Memory Monitor​