940
7 APPLICATION INSTRUCTIONS
7.20 Data Processing Instructions
Calculating the mean value of 32-bit binary data
DMEAN(P)(_U)
These instructions calculate the average value of the (n) points of 32-bit data in the devices starting from the specified one.
■Execution condition
■Descriptions, ranges, and data types
*1 When specifying setting data by using a label, define an array to secure enough operation area and specify an element of the array
label.
■Applicable devices
Ladder ST
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
Instruction Execution condition
DMEAN
DMEAN_U
DMEANP
DMEANP_U
Operand Description Range Data type Data type (label)
(s) DMEAN(P) Start device where the data for calculating the
average value are stored
32-bit signed binary ANY32_S
*1
DMEAN(P)_U 32-bit unsigned binary ANY32_U
*1
(d) DMEAN(P) Start device for storing the average value 32-bit signed binary ANY32_S
DMEAN(P)_U 32-bit unsigned binary ANY32_U
(n) Number of data, or the device number where the
number of data is stored
0 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,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s)
(d)
(n)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)