Mitsubishi Electronics C6 Home Safety Product User Manual


 
8. Function Commands
DCML, DCMLP
- 213 -
Program example
(1) Program to invert X0 to X1F data and to transmit the results to D0, 1.
Coding
No. of
steps
Com-
mand
Device
10 LD M200
11 DCML K8X0 D0
K8X0DCML
D0
M200
10
14
このビットはすべて
0とみなします。
0100 011100101100
X1B X8 X7 X0
1011 100011010011
b7 b0
1111
b8
D0,1
b31 b28 b27 b24
のビット数< のビット数のとき
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
0
0 1
1
1
0 0
1
0 1 1 0 0
1 0
1
1
1 0
0
0
1 1
0
1 0 0
1
1
1 1
1
1
b31
b28b27 b24 b8b7
b0
X1B
X8X7 X0
D0, 1
(2) Program to invert M16 to M35 data and to transmit the results to Y40 to Y63.
Coding
No. of
steps
Com-
mand
Device
10 LD M200
11 DCML K5M16 K6Y40
K5M16
DCML K6Y40
M200
10
14
このビットはすべて
0とみなします。
0100 011100101100
M35 M24M23 M16
10 11 100011010011
Y47 Y40
1111
Y63 Y48Y56
のビット数< のビット数のとき
S
D
When the number of bits at S is less than the number of bits at D:
0 1
0
0
0 1
1
1
0 0
1
0 1 1 0 0
1 0
1
1
1 0
0
0
1 1
0
1 0 0
1
1
1 1
1
1
There bits are all
read as "0"
Y63
Y56
Y48 Y47 Y40
M35
M16
M24 M23
(3) Program to invert D0, 1 data when X3 turns ON and to transmit the results to D16, 17.
Coding
No. of
steps
Com-
mand
Device
10 LD X3
11 DCMLP D0 D16
D0
DCMLP D16
X3
10
20
1011 100011010011
b7 b0
11
11
b8
D16,17
0100 111 1 11
b7 b0
00
00
b8
D0,1
b31 b24
b31 b24
000000
0 1
0
0
0 1
1
1
0 0
1
0 1 1
0
0
0 0
0
0
1 0
1
1
1 0
0
0
1 1
0
1 0 0
1
1
1 1
1
1
b31
b24
b8 b7 b0
b31
b24
b8 b7 b0
D0, D1
D16, D17