Calculating The Mean Value Of 32-Bit Binary Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Motion module instructions, standard functions/ function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Calculating the mean value of 32-bit binary data

DMEAN(_U)
These instructions calculate the average value of the (n) points of 32-bit data in the devices starting from the specified one.
ST
ENO:=DMEAN(EN,s,n,d);
■Execution condition
Instruction
DMEAN
DMEAN_U
Setting data
■Descriptions, ranges, and data types
Operand
(s)
DMEAN
DMEAN_U
(d)
DMEAN
DMEAN_U
(n)
EN
ENO
*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/labels
Operand
(s)
(d)
(n)
Processing details
• These instructions calculate the average value of the (n) points of 32-bit binary data in the devices starting from the one
specified by (s), and stores the average value in the device specified by (d).
(s)+1, (s)
(s)+3, (s)+2
(s)+2(n)-1, (s)+2(n)-2
(1) Mean value
• If the calculation result is not an integer, the first decimal place is rounded down.
• When (n) is 0, the processing is not performed.
Operation error
There is no operation error.
8 DATA PROCESSING
100
8.1 Data Processing Instructions
Execution condition
Description
Start device where the data for calculating the average value are
stored
Start device for storing the average value
Number of data, or the device number where the number of data
is stored
Execution condition
Execution result
Bit
(1)
(n)
ENO:=DMEAN_U(EN,s,n,d);
Range
0 to 65535
Word
(d)+1, (d)
Data type
*1
ANY32_S
*1
ANY32_U
ANY32_S
ANY32_U
ANY16
BOOL
BOOL
Constant

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents