Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 67

Process control function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
■Operation processing
These functions output the intermediate value of the values input to the input variables IN[0] to IN[15] from the output variable
OUT1.
• They rearrange the input values in order from the smallest one to the largest one, and output the intermediate value of the
input values.
1, 3, 4, 5, 1  1, 1, 3, 4, 5
[Example]
In this case, 3 is output as the intermediate value.
• If the number of inputs is even, they output the smaller one from the output variable OUT1.
1, 3, 4, 5, 1, 4  1, 1, 3, 4, 4, 5
[Example]
In this case, 3 is output as the intermediate value.
They set the bit corresponding to the input value selected as the intermediate value from the input variables IN[0] to IN[NUM]
specified by the input number NUM to 1 and output the bit from the output variable OUT2. (When multiple intermediate values
are input, they set all the corresponding bits to 1 and output the bits from the output variable OUT2.)
[Example]
When the intermediate value of the input variables IN[0] to IN[3] is output
NUM
4
IN
IN[0]
14.5
IN[1]
13.0
IN[2]
16.5
IN[3]
10.5
IN[4]
0
:
:
IN[15]
0
■Operation result
• Function block without EN/ENO
Operation result
No operation error
Operation error
• Function block with EN/ENO
The execution conditions and operation results will be as follows.
Execution condition
EN
TRUE (operation execution)
FALSE (operation stop)
*1 If the value FALSE is output from ENO, the output data from this function block will be undefined. Create a program so that the
undefined value will not be used in operations.
Operation error
Error code
Description
(SD0)
3402H
Input 1 to 16 are subnormal numbers or NaN (not a number).
3405H
The number of inputs is less than 1 or greater than 16.
M+P_MID
OUT1
13.0
OUT2
2H
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0
0
Operation result
ENO
TRUE (no operation error)
FALSE (operation error)
*1
FALSE
0
0
0
0
0
0
0
0
OUT1, OUT2
Operation result output value
Undefined value
OUT1, OUT2
Operation result output value
*1
Undefined value
Undefined value
4 ANALOG VALUE SELECTION AND AVERAGE VALUE
4.3 Middle Value Selection (M+P_MID(_E))
0
0
0
0
1
0
IN[0]
IN[1]
IN[2]
:
IN[15]
4
65

Advertisement

Table of Contents
loading

Table of Contents