Skip to main content

Example - Ladder Diagram

DSUB


The DSUB instruction subtracts a DWORD value, S2, from a DWORD value, S1, and saves the difference in an assigned DWORD data register, D.

Ladder Diagram Example


When M0.1 is powered ON, the DWORD data register, D6, is subtracted from the DWORD data register, D3, and the difference is saved in the DWORD data register, D9.


Memory Monitor

DSUBP


The DSUBP one-shot instruction subtracts a DWORD value, S2, from a DWORD value, S1, and saves the difference in an assigned DWORD data register, D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When M0.1 is powered ON, the DWORD data register, D6, is subtracted from the DWORD data register, D3, and the difference is saved in the DWORD data register, D9.


Memory Monitor