372
MAX, MAXP, DMAX, DMAXP
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Program Example
(1) The following program subtracts, when X1C is turned ON, the data stored at D100 to D103 from the data stored at R0 to
R3, and searches in the results of subtraction for the maximum value, then, stores it at D200 to D202.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program searches for the maximum value from the32-bit data at D0 to D7, and stores it at D100 to D103
when X20 is turned ON.
[Ladder Mode]
[List Mode]
[Operation]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The points specified in n exceed those of the corresponding device
specified in .
4101
The device specified by in exceeds the range of the corresponding
device.
––
––
––
––
S
D
Step
Instruction
Device
-679
(
BIN
)
4321
(
BIN
)
D100
5432
(
BIN
)
4444
(
BIN
)
5000
(
BIN
)
D101
D102
D103
b0
b15
R0
R1
R2
R3
b0
b15
D150
D151
D152
D153
b0
b15
1432
D200
2
1
D201
D202
Maximum value
Location
Q
uantit
y
4
D0
5000
(
BIN
)
4000
(
BIN
)
4000
(
BIN
)
6000
(
BIN
)
1432
(
BIN
)
444
(
BIN
)
-1000
(
BIN
)
Step
Instruction
Device
-3235
(
BIN
)
8744740
D101
,
D100
3
1
D102
D103
3786213
(
BIN
)
D1
,
D0
8744740
(
BIN
)
7141821
(
BIN
)
D3
,
D2
D5
,
D4
D7
,
D6