Example - Ladder Diagram
MIN
The MIN instruction searches n number of WORD data registers, starting at S, for the minimum possible value. The result of the search is saved in 3 assigned WORD data registers starting at D.
Ladder Diagram Example
When the contact, M1.0 is ON (1), the instruction finds the minimum WORD value of 3 data registers, D0, D1, and D2.
The smallest value found is saved in D4.
The position in which the data register was found is saved in D5.
The total amount of times the number is found is saved in D6.
Result
![]()
MINP
The MINP one-shot instruction searches n number of WORD data registers, starting at S, for the minimum possible value. The result of the search is saved in 3 assigned WORD data registers starting at D.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
When the contact, M1.1 is ON (1), the instruction finds the minimum WORD value of 5 data registers, D6, D7, D8, D9, and D10.
The smallest value found is saved in D12.
The position in which the data register was found is saved in D13.
The total amount of times the number is found is saved in D14.
Result
![]()