6 - 85 6 - 85
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
[Operation Errors]
(1) There are no operation errors associated with the CML(P) or DCML(P) instructions.
[Program Example]
(1) The following program inverts the data from X0 to X7, and transfers result to D0.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
These bits are all read as 0
D0
11010000
X7 X0
00101111
b7 b0
1 1111111
b15 b8
When the number of bits at is less than the number of bits at
S D
(2) The following program inverts the data at M16 to M23, and transfers the result to Y40 to Y47.
[Ladder Mode] [List Mode]
Device
Instruction
Steps
These bits are all read as 0
When the number of bits at is less than the number of bits at
S D
10100011
Y47 Y40
1 111
Y4B Y48
01011100
M23 M16
(3) The following program inverts the data at D0 when X3 is ON, and stores the result at D16.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
D16
10101111
b7 b
0 1011011
b15 b8
010100001 0100100
D0
b7 b
b15 b8
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com