Справочник Пользователя для Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G

Скачать
Страница из 936
317
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
12 Data Operation – FNC 40 to FNC 49
12.2 FNC 41 – DECO / Decode
11
FN
C
30
-FN
C
39
R
otati
on and 
Shi
ft
12
FNC4
0-F
NC4
9
D
ata O
per
ati
on
13
FN
C
50-FN
C
59
H
igh S
pe
ed 
P
rocessing
14
FM
C
60-FN
C
69
H
andy 
In
st
ru
ct
ion
15
FNC7
0-F
NC7
9
Ex
ter
nal FX
 I/O
 
D
evice
16
FN
C
80-FN
C
89
Ext
ernal
 FX 
De
vic
e
17
FN
C
100-
FN
C
10
9
Da
ta
 
Transf
er 2
18
FN
C
110-
FN
C
139
Floati
ng Poi
nt
19
FN
C
14
0-F
N
C
149
Da
ta
 
O
per
at
ion 2
20
FN
C
150-
FN
C
159
Posit
ioning 
C
ont
ro
l
12.2
FNC 41 – DECO / Decode
Outline
This instruction converts numeric data into ON bit.
A bit number which is set to ON by this instruction indicates a numeric value.
1. Instruction format
2. Set data
3. Applicable devices
S
: This function is supported only in FX
3U
/FX
3UC
 PLCs.
Explanation of function and operation
1. 16-bit operation (DECO and DECOP)
One bit among 
 to 
+2
n
 
− 1 is set to ON according to the 
 value.
1) When 
 is a bit device (1 
≤ n ≤ 8)
The numeric value (expressed in 2
n
, 1 
≤ n ≤ 8) of a device specified by 
 is decoded to 
.
-When all bits of 
 are "0", the bit device 
 turns ON.
-When "n" is "8", 2
8
 points (= 256 bits which is the maximum value) are occupied.
Operand type
Description
Data type
Data to be decoded or word device number storing data
16-bit binary
Bit or word device number storing the decoding result
16-bit binary
n
Number of bits of device storing the decoding result (n = 1 to 8)
(No processing is executed in the case of "n = 0".)
16-bit binary
Oper-
and 
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special 
Unit
Index
Con-
stant
Real 
Number
Charac-
ter String
Pointer
X Y M T C S D….b KnX KnY KnM KnS T C D R U…\G… V Z Modify K H
E
"…"
P
3 3 3
3
3 3 3 3
S
3 3
3
3 3
3 3
3
3 3 3 3
S
3
n
3 3
P
FNC 41
DECO

Mnemonic
Operation Condition
16-bit Instruction
 7 steps DECO
DECOP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
S
1
 ‚
  S
  D
S
1
 ‚
  S
S
2
 ‚
  D
  
D
1
   
D
  
D
1
   
D
  
D
1
   
S
  
D
1
   
D
  
D
1
   
S
  
D
1
   
D
  
D
1
   
S
  
D
1
   
D
When           is M0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
← n
D ‚
Up to 256 bits (The number of occupied bits varies depending on the specified "n" value.)
Up to
M31
Up to
M63
Up to
M127
Up to
M255
K1
K2
K3
K4
K5
K6
K7
K8
Turns ON when all
bits of           are OFF.
0 0 0 0 1 1 1 0
1
2
4
8
16
32
64
128
← 2
n
S ‚
8 bits
b0
b1
b2
b3
b4
b5
b6
b7
M255
M0
M1
M2
M3
M4
M5
M6
M7
M8
M9
M10
M11
M12
M13
M14
M15
b8
b9
b10
b11
b12
b13
b14
b15
When           is D0
When it is Y, M or S
(1 
≤ n ≤ 8)
Command
input
FNC 41
DECO
S ‚
D ‚
n
Ignored
When "n" is "8"
S ‚