Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 492

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Special Math Instructions
00000
7-23-3 FIND MINIMUM – MIN(––)
MIN(––)
C
R
1
D
Limitations
Description
1, 2, 3...
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.
DM 0000
IR 200
IR 201
IR 202
IR 203
IR 204
10 words
IR 205
IR 206
IR 207
IR 208
IR 209
DM 0500
DM 0501
Ladder Symbols
@MIN(––)
C
R
1
D
This instruction is available in the CPM2A/CPM2C only.
N must be BCD between 0001 to 9999.
R
and R
+N–1 must be in the same data area.
1
1
DM 6144 to DM 6655 cannot be used for D.
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
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. 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.
Address
Instruction
MAX(––)
00000
LD
DM 0000
00001
MAX(––)
200
DM 0500
4010
3F2A
Offset of word containing maximum value: 2 words
51C3
E02A
Maximum value
7C9F
2A20
A827
2A20
E02A
Maximum value
C755
94DC
E02A
0002
If there are two words containing
the maximum value, the one found
first will be stored in DM 0501.
Operand Data Areas
IR, SR, AR, DM, HR, TC, LR, #
R
: First word in range
1
IR, SR, AR, DM, HR, TC, LR
D: Destination word
IR, SR, AR, DM, HR, LR
Section
Operands
00000
DM
0000
200
DM
0500
C: Control data
to R
1
1
7-23
+N–1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?

Table of Contents