Mitsubishi Electric MELDAS 60 Series Programming Manual page 183

Plc programming
Hide thumbs Also See for MELDAS 60 Series:
Table of Contents

Advertisement

Program example
(1) Program to decode the three bits 0 to 2 of R20, and turn the bits corresponding in D100 ON.
X0
10
B15B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0 0
0 0
R20
B15B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
D100
Does not change
(Note 1)
The D100 bit 0 turns ON when the B0 to B2 of R20 are 0.
(Note 2)
The D100 details 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
8
(2
= 256 bits) ON.
X0
10
B15B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0 0
R20
B255
D100
to
D115
DECO
R20
0 1
0 0 0 0
0
Interpreted as 0
0
1
0
Only bit 6 of bits 0 to 7 is turned ON.
DECO
R20
0 0
0 0
1 1 0 0
interpreted as 0
B48 B47
0
0
0
0
0 0
0
D115
D103
Does not change
Coding
No. of
D100
K3
steps
10
11
16
0
1
1
1
0
When bit 0 to 2 data is binary and 6.
0
0
0
0
0
Coding
No. of
D100
K8
steps
10
11
16
1
0
0
0 0
1
When bit 0 to 7 data is binary and 33.
B34B33B32 B31
0
0
0 0
1
0 0
0
D102
Only bit 33 of bits 0 to 255 is turned ON.
- 175 -
DECO
Com-
Device
mand
LD
X0
DECO
R20
D100
Com-
Device
mand
LD
X0
DECO
R20
D100
B17 B16B15
B2 B1 B0
0
0
0 0
0
0
0
D101
D100
K3
K8
0 0
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents