Mitsubishi Electronics C6 Home Safety Product User Manual


 
8. Function Commands
CML, CMLP
- 211 -
Program example
(1) Program to invert X0 to X7 data and to transmit the results to D0.
Coding
No. of
steps
Com-
mand
Device
10 LD M100
11 CML K2X0 D0
K2X0CML
D0
M100
10
14
このビットはすべて
0とみなします。
D0
のビット数< のビット数のとき
11010000
X7 X0
00101111
b7
b0
1 1111111
b15 b8
S
D
When the number of bits at S is less than the number of bits at D:
1 1
1
1
1 1
1
1
0 0
1
0 1 1 1 1
b8b7
b0
1 1
0
1 0 0 0 0
b15
D0
X7 X0
There bits are all
read as "0"
(2) Program to invert M16 to M23 data and to transmit the results to Y40 to Y47.
Coding
No. of
steps
Com-
mand
Device
10 LD M100
11 CML K2M16 K3Y40
K2M16
CML K3Y40
M100
10
14
このビットはすべて
0とみなします。
のビット数< のビット数のとき
10100011
Y47
Y40
1 111
Y4B
Y48
01011100
M23 M16
S D
When the number of bits at S is less than the number of bits at D:
There bits are all
read as "0"
0 1
0
1 1 1 0 0
M23
Y40
Y4B
Y48Y47
1 0
1
0 0 0 1 1
1 1
1
1
M16
(3) Program to invert D0 data when X3 turns ON and to transmit the results to D16.
Coding
No. of
steps
Com-
mand
Device
10 LD X3
11 CMLP D0 D16
D0
CMLP D16
X3
10
20
D16
10101111
b7 b0
0 1011011
b15 b8
010100001 0100100
D0
b7 b0b15 b8
1 1
0
1
1 0
0
1
1 0
1
0 1 1 1 1
0 0
1
0
0 1
1
0
0 1
0
1 0 0 0 0
b15 b8b7
b0
b15 b8b7
b0
D0
D16