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

Скачать
Страница из 936
327
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
12 Data Operation – FNC 40 to FNC 49
12.6 FNC 45 – MEAN / Mean
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.6
FNC 45 – MEAN / Mean
Outline
This instruction obtains the mean value of data.
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 (MEAN and MEANP)
The mean value of "n" 16-bit data from 
 is stored to 
.
• The sum is obtained as algebraic sum, and divided by "n".
• The remainder is ignored.
2. 32-bit operation (DMEAN and DMEANP)
The mean value of "n" 32-bit data from [
+1, 
] is stored to [
+1, 
].
• The sum is obtained as algebraic sum, and divided by "n".
• The remainder is ignored.
Operand type
Description
Data type
Head word device number storing data to be averaged
16- or 32-bit binary
Word device number storing the mean value result
16- or 32-bit binary
n
Number of data to be averaged (1 
≤ n ≤ 64)
16- or 32-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
S
3 3
3
n
3 3
3 3
DMEAN
DMEANP
Mnemonic
Operation Condition
P
FNC 45
MEAN
D
16-bit Instruction
7 steps MEAN
MEANP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
13 steps
Continuous
Operation
Pulse (Single)
Operation
S
1
 ‚
  S
  D
S
1
 ‚
  S
S
2
 ‚
  D
  
D
1
   
S
  
D
1
   
D
Command
input
FNC 45
MEAN
n
S ‚
D ‚
n
S ‚
S ‚
S ‚
+           + 1 + 
……… +           + n − 1
D ‚
  
D
1
   
S
  
D
1
   
S
  
D
1
   
D
  
D
1
   
D
[          + 1,          ] + [          + 3,          + 2] + 
……… + [{          + n × 2 − 1}, {          + n × 2 − 2}]
[          + 1,          ]
Command
input
FNC 45
DMEAN
n
S ‚
D ‚
n
S ‚
S ‚
S ‚
S ‚
S ‚
S ‚
D ‚
D ‚