Calculating The Mean Value Of 16-Bit Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Calculating the mean value of 16-bit data

MEAN(P)(_U)
These instructions calculate the mean value of the (n) point(s) of 16-bit data units starting from the one specified by (s), and
store the operation result in (d).
Ladder diagram
(s)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
MEAN(P)
Head device number where the mean value target data are
stored
MEAN(P)_U
(d)
MEAN(P)
Head device number storing mean value
MEAN(P)_U
(n)
Number of data or the device number storing the number of
data
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s)
(d)
(n)
Processing details
• These instructions calculate the mean value of the (n) point(s) of 16-bit data starting from the one specified by (s), and store
the operation result in a device specified by (d).
(s)
(s)+1
(s)+2
(s)+(n-1)
• The sum is obtained as algebraic sum, and divided by (n).
• The remainder is ignored.
Precautions
When a device number is exceeded, (n) is handled as a smaller value in the possible range.
Operation error
Error code
Description
(SD0/SD8067)
3405
The value stored in a device specified by (n) is 0.
7 APPLICATION INSTRUCTION
570
7.17 Data operation instruction
(d)
(n)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
Mean
(n)
Structured text
ENO:=MEAN(EN,s,n,d);
ENO:=MEANP(EN,s,n,d);
Range
1 to 65535
Double word Indirect
U\G
Z
LC
LZ
(d)
ENO:=MEAN_U(EN,s,n,d);
ENO:=MEANP_U(EN,s,n,d);
Data type
Data type (label)
16-bit signed binary
ANY16
16-bit unsigned binary
16-bit signed binary
ANY16
16-bit unsigned binary
16-bit unsigned binary
ANY16
Constant
specification
K, H
E
Others
$

Advertisement

Table of Contents
loading

Table of Contents