Mitsubishi MELSEC-Q/L Programming Manual page 331

Table of Contents

Advertisement

(2) The constant designated by
b15
b8
S1
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
S1
+ 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
+ 2
S1
S1
+(n 2)
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
+(n 1)
S1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
D
D
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.
Error
code
The points specified in n exceed those of the corresponding device
specified in
,
, or
S1
S2
The ranges of devices starting from the one specified in
overlap by n points (except when the same device is specified in
4101
).
D
The ranges of devices starting from the one specified in
overlap by n points (except when the same device is specified in
).
D
Program Example
(1) The following program performs an exclusive NOR operation on the data stored at D100 to D102 and the data stored at
R0 to R2 when X20 is turned ON, and stores the operation result into the area starting from D200.
[Ladder Mode]
[Operation]
b15
b8
b7
D100
0
0
0
0
0
1
1
1
1
1
D101
0
1
0
1
0
1
0
1
0
1
D102
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
D200
D201
D202
can be between -32768 and 32767 (BIN 16-bit data).
S2
b7
b0
n
XNR
b15
b8
b7
D
0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
D
+ 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
D
+ 2
1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0
+(n 2)
1 1
0 0 0 0 1 1
1 1 0 0
+(n 1)
0 0 0 0 0 0 0 0
1 1 1 1
Error details
.
D
[List Mode]
Step
b0
b15
0
0
0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1
1
1
R0
XNR
0
1
0
1
0
1
R1
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
R2
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
b15
b8 b7
b0
1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1
0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
b15
b8b7
S2
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
b0
n
0 0
1 1
1 1 1 1
Q00J/
Q00/
QnH
Q01
and
S1
D
and
S1
and
S2
D
and
S2
Instruction
b8 b7
b0
D0
3
BKXNR, BKXNRP
b0
QnPH QnPRH
QnU
Device
1
2
3
4
4
6
7
LCPU
8
329

Advertisement

Table of Contents
loading

Table of Contents