Mitsubishi Electric MELSEC-Q/L Programming Manual page 370

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

Advertisement

• The constant designated by (S2) can be between -32768 and 32767 (BIN 16-bit data).
b15
S1
0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1
S1
+ 1
0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0
S1
+ 2
1
0
1 0 1
S1
+(n 2)
0 0 0 0 1 1
+(n 1)
S1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1
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 (S1), (S2), or (D).
The ranges of devices starting from the one specified in (S1) and (D) overlap
by n points (except when the same device is specified in (S1) and (D)).
The ranges of devices starting from the one specified in (S2) and (D) overlap
by n points (except when the same device is specified in (S2) and (D)).
Program example
• The following program performs a logical sum 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
D100
0
0
0
0
1
0
1
D101
0
0
1
1
0
0
1
D102
1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0
7 APPLICATION INSTRUCTIONS
368
7.1 Logical Operation Instructions
b8
b7
b0
0
1 0 1 0 1
0
1 0 1
0
n
1 1
0 0 0 0 1 1
1 1
b15
b8
D
0 0
1 1 1 1 1 1 1 1 1 1
D
+ 1
0 0 0 0
1 1 1 1 1 1 1 1 1
D
+ 2
1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0
D
+(n 2)
0 0
0 0 1 1 1 1
+(n 1)
D
1 1 0 0 1 1 1 1
b7
b0
0
1
0
1
0
1
0
1
0
OR
1
0
0
1
1
0
0
1
1
b15
b8
b7
D200
0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0
D201
0 0
1 1 1 1 1 1 1 1 1 1
D202
1 1
0 0
1 1 1 1
0 0 1 1 1 1 1 1
b15
b8 b7
OR
S2
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
b7
b0
0 0 1 1
0
1
0
n
1 1 1 1
1 1
1 1
1 1 1 1
0 0 1 1
Q00J/
Q00/
Q01
[List Mode]
Step
b15
b8
b7
R0
0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
R1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
R2
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
b0
0 0
1 1
D0
b0
QnH
QnPH
QnPRH
Instruction
Device
b0
3
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents