Skip to main content

Example - Ladder Diagram

EDIV


The EDIV instruction divides a REAL dividend value, S1, by a REAL divisor value, S2, and saves the result in an assigned REAL data register, D. The quotient is saved in the data register, D, and the remainder is saved in the data register, D+1.

Ladder Diagram Example


When the contact, M0.0, is powered ON, the REAL data register, D1, is divided by the REAL data register, D3, and the result is saved in the REAL data register, D5.
The quotient is saved in the data register, D5, and the remainder is saved in the data register, D6.


Memory Monitor

EDIVP


The EDIVP instruction divides a REAL dividend value, S1, by a REAL divisor value, S2, and saves the result in an assigned REAL data register, D. The quotient is saved in the data register, D, and the remainder is saved in the data register, D+1.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When the contact, M0.0, is powered ON, the REAL data register, D1, is divided by the REAL data register, D3, and the result is saved in the REAL data register, D5.
The quotient is saved in the data register, D5, and the remainder is saved in the data register, D6.


Memory Monitor