678
8 APPLICATION INSTRUCTION
8.22 Data Operation Instruction
Calculating the mean value of 32-bit data
DMEAN(P)(_U)
These instructions calculate the mean value of the (n) point(s) of 32-bit data units starting from the one specified by (s), and
store the operation result in (d).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• These instructions calculate the mean value of the (n) point(s) of 32-bit data starting from the one specified by (s), and store
the operation result in a device specified by (d).
• 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.
Ladder diagram
Structured text
ENO:=DMEAN(EN,s,n,d);
ENO:=DMEANP(EN,s,n,d);
ENO:=DMEAN_U(EN,s,n,d);
ENO:=DMEANP_U(EN,s,n,d);
FBD/LD
Operand
Description
Range
Data type
Data type (label)
(s)
DMEAN(P)
Head device number where the mean value target data are
stored
32-bit signed binary
ANY32_S
DMEAN(P)_U
32-bit unsigned binary
ANY32_U
(d)
DMEAN(P)
Head device number storing mean value
32-bit signed binary
ANY32_S
DMEAN(P)_U
32-bit unsigned binary
ANY32_U
(n)
Number of data or the device number storing the number of
data
1 to 65535
16-bit unsigned binary
ANY16
EN
Execution condition
Bit
BOOL
ENO
Execution result
Bit
BOOL
Operand
Bit
Word
Double word Indirect
specification
Constant
Others
X, Y, M, L, SM,
F, B, SB, S
T, ST, C, D, W,
SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(d)
(n)
(1): Mean
(s)
(d)
(n)
EN
ENO
s
d
n
(n)
(d)+1, (d)
(s)+1, (s)
(s)+3, (s)+2
(s)+(2n-1), (s)+(2n-2)
(1)
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......