Mitsubishi Electric MELSEC-Q/L Programming Manual page 443

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4101
The points specified in n exceed those of the corresponding device specified
in (S).
4101
The points of the device specified in (D) exceed those of the corresponding
device.
Program example
• 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]
[Operation]
b15
b0
D100
4321 (BIN)
D101
5432 (BIN)
D102
4444 (BIN)
D103
5000 (BIN)
D0
4
• The following program searches for the maximum value from the 32-bit data at D0 to D7, and stores it at D100 to D103
when X20 is turned ON.
[Ladder Mode]
[Operation]
D1, D0
3786213 (BIN)
D3, D2
-3235 (BIN)
D5, D4
8744740 (BIN)
D7, D6
7141821 (BIN)
b15
b0
R0
D150
5000 (BIN)
R1
D151
4000 (BIN)
R2
D152
4000 (BIN)
R3
6000 (BIN)
D153
D101, D100
8744740
D102
D103
Q00J/
QnH
Q00/
Q01
[List Mode]
Step
Instruction
b15
b0
-679 (BIN)
1432 (BIN)
444 (BIN)
-1000 (BIN)
D200
1432
D201
2
D202
1
[List Mode]
Step
Instruction
3
1
7 APPLICATION INSTRUCTIONS
QnPH
QnPRH
QnU
LCPU
Device
Maximum value
Location
Quantity
Device
7.5 Data Processing Instructions
7
441

Advertisement

Table of Contents
loading

Table of Contents