Mitsubishi Electric MELSEC-Q/L Programming Manual page 364

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 0 0 1 1 0 0 1 1 0 0 1 1
S1
+ 1
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
S1
+ 2
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
S1
+ (n 2)
+ (n 1)
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
S1
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 product 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
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1
D101
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
D102
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
7 APPLICATION INSTRUCTIONS
362
7.1 Logical Operation Instructions
b8
b0
b7
n
BKAND
b15
b8
D
0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1
D
+ 1
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
D
+ 2
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
D
+ (n 2)
0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1
+ (n 1)
D
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
b7
b0
R0
BKAND
R1
R2
b15
b8
b7
D200
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
D201
0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
D202
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
b15
b8 b7
S2
1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1
b7
b0
n
Q00J/
Q00/
Q01
[List Mode]
Step
b15
b8
b7
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
b0
D0
3
b0
QnH
QnPH
QnPRH
Instruction
Device
b0
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents