345
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
FNC3
0-F
NC3
9
R
otati
on and
Shif
t
12
FNC4
0-F
NC4
9
D
ata
O
per
ati
on
13
FN
C
50-FN
C
59
H
igh Speed
Pr
ocess
ing
14
FM
C
60-
FN
C
69
H
andy
In
st
ru
ct
ion
15
FNC7
0-F
N
C7
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
109
Da
ta
Transf
er 2
18
FN
C
110-
FN
C
139
Fl
oati
ng Poi
nt
19
FN
C
140
-F
N
C
14
9
Da
ta
O
per
ati
on 2
20
FN
C
150-
FN
C
159
Posit
ioning
C
ontr
ol
Caution
• When a device number is exceeded, "n" is handled as a smaller value in the possible range.
• Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DMEAN D0 D100 R0", "n" is [R1, R0].
Error
When "n" is any value outside the range from "1" to "64", an operation error (M8067) is caused.
Program example
The data of D0, D1 and D2 are summed, divided by "3", and then stored to D10.
X000
S
D
(D 0) + (D 1) + (D 2)
FNC 45
MEAN
D 0
D 10
K 3
n
(D 10)
3