Calculation Of Averages For 16-Bit Or 32-Bit Data (Mean(P),Dmean(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

7.5.15
Calculation of averages for 16-bit or 32-bit data
(MEAN(P),DMEAN(P))
MEAN(P),DMEAN(P)
MEAN,DMEAN
MEANP,DMEANP
Setting
Data
S
D
n
Function
MEAN(P)
(1) This instruction calculates the mean of 16-bit BIN data stored in n-point devices starting from
the device specified by
(2) If the value calculated is not integer, this instruction will drop the number of decimal places.
(3) If the value specified by n is 0, the instruction will be not processed.
DMEAN(P)
(1) This instruction calculates the mean of 32-bit BIN data stored in n-point devices starting from
the device specified by
S
+1,
S
+3,
+2n−1,
S
(2) If the value calculated is not integer, this instruction will drop the number of decimal places.
(3) If the value specified by n is 0, the instruction will be not processed.
Command
Command
: Head number of the devices where the data to be averaged are stored (BIN16/32 bits)
S
: Head number of the devices where the average will be stored (BIN 16/32 bits)
D
n
: Number of data or number of the devices where the number of data are stored(Setting range: 1 to 32767)
(BIN 16 bits)
Internal Devices
R, ZR
Bit
Word
––
––
––
, and then stores the result into the device specified by
S
S
+1
S
n
+2
S
+n−1
S
, and then stores the result into the device specified by
S
S
S
+2
+2n−2
S
High
Basic
performance
• QnU(D)(H)CPU: The serial number (first five digits) is "10102" or later.
• QnUDE(H)CPU: The serial number (first five digits) is "10102" or later.
indicates an instruction symbol of MEAN/DMEAN.
P
J
\
U
\G
Bit
Word
––
––
D
Average value
D
Average value
n
MEAN(P),DMEAN(P)
Ver.
Process
Redundant
Universal
S
D
n
S
D
n
Constants
Zn
K, H
––
––
.
D
.
D
+1,
D
1
2
LCPU
3
4
6
6
7
Other
––
8
––
––
7-103

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents