Mitsubishi Electronics C6 Home Safety Product User Manual


 
8. Function Commands
DECO, DECOP
- 283 -
Program example
(1) Program to decode the three bits 0 to 2 of R20, and turn the bits corresponding in D100 ON.
Coding
No. of
steps
Com-
mand
Device
10 LD X0
11 DECO R20 D100 K3
DECO
D100
R20
K3
X0
10
16
B15B14 B13 B12 B11B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
000001000000 0111
B15B14 B13 B12 B11B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0000 0100
When bit 0 to 2 data is binary and 6.
Interpreted as 0
Does not change
Only bit 6 of bits 0 to 7 is turned ON.
R20
D100
(Note 1) The D100 bit 0 turns ON when the R20 B0 to B2 is 0.
(Note 2) The D100 data remain the same even if X0 turns OFF.
(2) Program to decode the eight bits 0 to 7 of R20, and turn the bits corresponding in D100 to D115
(2
8
= 256 bits) ON.
Coding
No. of
steps
Com-
mand
Device
10 LD X0
11 DECO R20 D100 K8
DECO D100R20 K8
X0
10
16
B15B14B13B12B11B10B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
000000 1100 10 1000
B255 B48 B47 B34B33B32B31 B2 B1 B0
0100
0
000
When bit 0 to 7 data is binary and 33.
interpreted as 0
Does not change
Only bit 33 of bits 0 to 255 is turned ON.
R20
D100
B17B16B15
D100D101D102D103D115
00000 00000000
0000
D115