Skip to main content

Example - Ladder Diagram

DMIN


The DMIN instruction searches n number of DWORD data registers, starting at S, for the minimum possible value. The result of the search is saved in 4 assigned DWORD data registers starting at D.

Ladder Diagram Example


When the contact, M1.5 is ON (1), the instruction finds the minimum DWORD value of 4 data registers, D15, D17, D19, and D21.
The smallest value found is saved in D24.
The position in which the data register was found is saved in D26.
The total amount of times the number is found is saved in D27.


Result

DMINP


The DMINP one-shot instruction searches n number of DWORD data registers, starting at S, for the minimum possible value. The result of the search is saved in 4 assigned DWORD data registers starting at D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When the contact, M1.6 is ON (1), the instruction finds the minimum DWORD value of 3 data registers, D30, D32, and D34.
The smallest value found is saved in D37.
The position in which the data register was found is saved in D39.
The total amount of times the number is found is saved in D40.


Result