Mitsubishi MELSEC QCPU Programming Manual page 165

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
[Program Example]
(1) The following program performs a comparison operation when X20 goes ON, comparing the
data for the number of points from D100 equivalent to the value stored in D0 with the data the
number of points from R0 equivalent to the value stored in D0, and stores the result from M10
onward.
[Ladder Mode]
b15- - - - - - - -b0
D100
1000
D101
2000
D102
3000
D103
4000
D0
(2) The following program performs a comparison operation when X1C goes ON, comparing the
constant K1000 with the data 4 points from D10, and stores the result in b4 to b7 of D0.
[Ladder Mode]
b15- - - - - - - -b0
1000
6 - 14
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
(BIN)
R0
(BIN)
R1 2000
= = = =
(BIN)
R2
(BIN)
R3
4
< >
(BIN)
b15- - - - - - - - - b7- - -b4- - - - b0
D0 prior to the operation
0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0
b15- - - - - - - - - b7- - -b4- - - - b0
D0 after the operation
0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0
[List Mode]
Instruction
Steps
b15- - - - - - - -b0
1000
(BIN)
(BIN)
5000
(BIN)
4000
(BIN)
[List Mode]
Steps
Instruction
0
LD
1
BKCMP<>P
6
b15- - - - - - - -b0
D10
2000
(BIN)
D11
1000
(BIN)
D12
1000
(BIN)
D13
2222
(BIN)
Bits already in this state
do not change
[See Function (6)]
MELSEC-Q/QnA
Device
M10
ON
M11
ON
M12
OFF
M13
ON
Device
X1C
K1000
D10
D0.4
K4
END
6 - 14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents