7-23
Section
Special Math Instructions
474
ue will be stored in DM 0500. The offset from the beginning of the search of the
word containing the maximum value will be stored in DM 0501.
00000
MAX(––)
DM 0000
200
DM 0500
Address
Instruction
Operands
00000
LD
00000
00001
MAX(––)
DM
0000
200
DM
0500
DM 0000
10 words
IR 200
IR 201
IR 202
IR 203
IR 204
IR 205
IR 206
IR 207
IR 208
IR 209
DM 0500
DM 0501
Maximum value
Offset of word containing maximum value: 2 words
Maximum value
If there are two words containing
the maximum value, the one found
first will be stored in DM 0501.
3F2A
51C3
E02A
7C9F
2A20
A827
2A20
E02A
C755
94DC
4010
E02A
0002
7-23-3
FIND MINIMUM – MIN(––)
R
1
: First word in range
IR, SR, AR, DM, HR, TC, LR
C
: Control data
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
@MIN(––)
C
R
1
D
D
: Destination word
IR, SR, AR, DM, HR, LR
MIN(––)
C
R
1
D
Limitations
This instruction is available in the
CPM2A/CPM2C only
.
N must be BCD between 0001 to 9999.
R
1
and R
1
+N–1 must be in the same data area.
DM 6144 to DM 6655 cannot be used for D.
Description
When the execution condition is OFF, MIN(––) is not executed. When the execu-
tion condition is ON, MIN(––) searches the range of memory from R
1
to R
1
+N–1
for the address that contains the minimum value and outputs the minimum value
to the destination word (D).
The address is identified differently for the DM area:
1, 2, 3...
1. For an address in the DM area, the word address is written to C+1. For ex-
ample, if the address containing the minimum value is DM 0114, then #0114
is written in D+1.