
6F3B0253
7. Instructions
FUN 163
MIN
Minimum value
Expression
Input − [ A MIN (n) B ]− Output
Function
When the input is ON, this instruction searches for the minimum value from the table of sizen words starting with A, and stores the minimum value in B and the pointer indicating the position of the minimum value in B+1. The allowable range of the table size n is 1 to 64.
Execution condition
Input |
| Operation | Output |
OFF | No execution |
| OFF |
ON | Execution |
| ON |
Operand
| Name |
|
| Device |
|
|
|
|
|
|
|
| Register |
|
|
|
| Constant | Index | ||
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
| ||
A | Start of table |
|
|
|
|
|
| √ | √ | √ | √ |
| √ | √ | √ |
|
|
|
|
|
|
n | Table size |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 - 64 |
|
B | Result |
|
|
|
|
|
|
| √ |
| √ | √ | √ | √ | √ | √ | √ | √ |
|
|
|
Example
When R011 is ON, the minimum value is found from the register table D0200 to D0209 (10 words), and the minimum value is stored in D0510 and the pointer is stored in D0511.
D0200
D0201
D0202
D0203
D0204
D0205
D0206
D0207
D0208
D0209
100
10000
10
0
200
20000
20
Pointer
0
1
2 D0510
3 D0511
2
(Minimum value) (Pointer)
Note
•This instruction deals with the data as signed integer
•If there are two or more minimum value in the table, the lowest pointer is stored.
•If Index register K is used as operand B, the pointer data is discarded.
Basic Hardware and Function 227