306
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
12.6
FNC 45 – MEAN / Mean
Outline
This instruction obtains the mean value of data.
1. Instruction format
2. Set data
3. Applicable devices
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 rounded down.
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 rounded down.
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 acquired by averaging
16- or 32-bit binary
n
Number of data to be averaged
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
3
3
3
3
3
3 3 3 3
3
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
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......