Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
327
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
12 Data Operation – FNC 40 to FNC 49
12.6 FNC 45 – MEAN / Mean
11
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High Speed
Processing
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
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 FX3U/FX3UC 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
XYMTCSD.b KnX KnY KnM KnS T C D R U\G VZModifyKH E ""P
33333333 S 3
3333333 S 33 3
n 33 33
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