Mitsubishi Electric MELSEC-Q/L Programming Manual page 307

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

Advertisement

Program example
• 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.
• 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.
• 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
S
If "Number of bits of
< Number of bits of
X7
1 1 0 1 0 0 0 0
b7
b15
b8
D0
1
1
1
1
1
1
1 1
0 0 1 0 1 1 1 1
S
If "Number of bits of
< Number of bits of
M23
M16
0 1 0 1 1 1 0 0
Y4B Y48
Y47
Y40
1
1
1 1
1 0 1 0 0 0 1 1
b0
b0
[List Mode]
Instruction
Step
D
"
X0
b0
[List Mode]
Instruction
Step
D
"
[List Mode]
Instruction
Step
Device
Device
Device
6 BASIC INSTRUCTIONS
6.4 Data Transfer Instructions
6
305

Advertisement

Table of Contents
loading

Table of Contents