Skip to main content

Example - Ladder Diagram

WSUM


The WSUM instruction performs a summation (repeated addition) starting at the WORD data register, S, through n number of data registers (S+n). The sum is stored in an assigned DWORD data register, D.

Ladder Diagram Example


When M0.0 is powered ON, the WORD data registers, D10, D11, D12, and D13, are added together, and the sum is saved in the WORD data register, D15.


Memory Monitor

WSUMP


The WSUMP one-shot instruction performs a summation (repeated addition) starting at the WORD data register, S, through n number of data registers (S+n). The sum is stored in an assigned DWORD data register, D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When M0.0 is powered ON, the WORD data registers, D10, D11, D12, and D13, are added together, and the sum is saved in the WORD data register, D15.


Memory Monitor