Mean, Meanp Calculation Of Averages For 16-Bit Data; Dmean, Dmeanp - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

7.5.15
MEAN, MEANP
Calculation of averages for 16-bit data

DMEAN, DMEANP

Calculation of averages for 32-bit data
7.5.15
MEAN, MEANP, DMEAN, DMEANP
MEAN, DMEAN
MEANP, DMEANP
: 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)
Setting
Internal Devices
Data
Bit
––
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
and then stores the result into 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
and then stores the result into the device specified by
S
+1,
S
+3,
S
+2n 1,
(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.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an error code is stored into
SD0.
Error
code
4100
The value specified in n is other than 0 to 32767.
The points specified in n exceed those of the corresponding device
4101
specified in
.
S
Command
Command
R, ZR
Word
Bit
S
S
+1
n
S
+2
S
+n 1
S
S
+2
S
+2n 2
Error details
MEAN, MEANP, DMEAN, DMEANP
High
Basic
performance
• QnU(D)(H)CPU, QnUDE(H)CPU: The serial number (first five
digits) is "10102" or later.
indicates an instruction symbol of MEAN/DMEAN.
S
P
S
J
\
U
\G
Word
––
––
.
D
D
Average value
.
D
Average value
n
Q00J/
Q00/
QnH
Q01
––
––
––
––
Ver.
Process
LCPU
Redundant
Universal
D
n
D
n
Constants
Zn
Other
K, H
––
––
D
+1,
D
QnPH QnPRH
QnU
––
––
––
––
1
2
3
4
4
––
––
6
––
7
,
S
8
,
S
LCPU
381

Advertisement

Table of Contents
loading

Table of Contents