Mitsubishi MELSEC-Q/L Programming Manual page 264

Table of Contents

Advertisement

CML, CMLP, DCML, DCMLP
Program Example
(1) The following program inverts the data from X0 to X7, and transfers result to D0.
[Ladder Mode]
[Operation]
These bits are all regarded as 0.
(2) The following program inverts the data at M16 to M23, and transfers the result to Y40 to Y47.
[Ladder Mode]
[Operation]
These bits are all regarded as 0.
(3) The following program inverts the data at D0 when X3 is ON, and stores the result at D16.
[Ladder Mode]
[Operation]
b15
b8
b7
D0
1
1
0
1
1
0
0 1
1 0 1 0 1 1 1 1
b15
b8
b7
D16
0
0
1
0
0
1
1 0
0 1 0 1 0 0 0 0
(4) The following program inverts the data at X0 to X1F, and transfers results to D0 and D1.
[Ladder Mode]
262
[List Mode]
Step
If "Number of bits of
S
< Number of bits of
X7
1 1 0 1 0 0 0 0
b15
b8
b7
D0
1
1
1
1
1
1
1 1
0 0 1 0 1 1 1 1
[List Mode]
Step
S
If "Number of bits of
< Number of bits of
M23
M16
0 1 0 1 1 1 0 0
Y4B Y48
Y40
Y47
1
1
1 1
1 0 1 0 0 0 1 1
[List Mode]
Step
b0
b0
[List Mode]
Step
Device
Instruction
"
D
X0
b0
Instruction
Device
"
D
Instruction
Device
Device
Instruction

Advertisement

Table of Contents
loading

Table of Contents