Mitsubishi Electric MELSEC FX3U Programming Manual page 338

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Program example
1. When setting bit devices to ON according to the value of a data register
The value of D0 (whose current value is "14" in this example) is decoded to M0 to M15.
M8000
FNC 41
DECO
Up to
Up to
...
M255
M127
M255
Up to 256 bits (The number of occupied bits varies depending on the specified "n" value.)
• When the value of b0 to b3 of D0 is "14 (= 0 + 2 + 4 + 8)", M14 (which is the 15th from M0) becomes "1"
(turn ON).
• When the value of D0 is "0", M0 becomes "1" (turns ON).
• When "n" is set to "K4", either one point among M0 to M15 turns ON according to the value of D0 (0 to 15).
• By changing "n" from K1 to K8, D0 can correspond to numeric values from 0 to 255.
However, because the device range of
should not be used for another control.
2. Turning ON the bit out of word devices according to the contents of bit devices
The value expressed by X000 to X002 is decoded to D0 (X000 and X001 are ON, and X002 is OFF in this
example.).
M8000
FNC 41
DECO
• When the values expressed by X000 to X002 are "3 (= 1 + 2 + 0)", b3 (which is the 4th from b0) becomes
1 (turns ON).
• When all of X000 to X002 are "0" (OFF), b0 becomes "1" (turns ON).
336
S
D
n
D 0
M 0
K 4
b15
Up to
Up to
...
...
M63
M31
0
1
0
M
M
M
15
14
13
S
D
n
X000
D0
K3
Ignored
(D0 b4 to b15)
...
7
6
5
4
0 0 0 0 1 1 1 0
K8
K7
K6
K5
0
0
0
0
0
0
0
0
M
M
M
M9
M8
M7
M6
M5
12
11
10
is occupied for decoding accordingly, such device range
D
D
1
0
0
0
0
0
0
0
0
b15
b14
b13
b12
b11
b10
b9
b8
All of these bits are
"0" (OFF).
12 Data Operation – FNC 40 to FNC 49
12.2 FNC 41 – DECO / Decode
4 bits
(D0 b0 to b3)
3
2
1
b0
S
When the value of b0 to
b3 of D0 is "14"
← 2
n
← n = K4
K4
K3
K2
K1
Turns ON when D0 is K0.
0
0
0
0
0
D
When
M4
M3
M2
M1
M0
X2
X1
X0
0 1 1
S
← 2
K3
K2
K1
Turns ON when all
bits of
0
0
0
0
1
0
0
0
b7
b6
b5
b4
b3
b2
b1
b0
is M0
n
← n
S
are OFF.
D
=D0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents