Mitsubishi Electric MELSEC iQ-R Series Reference page 47

Array handling function block library reference, programmable controller
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

FB details
Item
Relevant devices
Language to use
Number of steps
FB dependence
Functional description
Description
CPU module
Engineering tool
 (The internal program of this FB is not open to the public.)
646 steps
The number of steps of the FB embedded in a program depends on the CPU module used, the input/output definitions, and
the options setting of GX Works3. For the options setting of GX Works3, refer to the GX Works3 Operating Manual.
No dependence
(1) As i_bEN (execution command) turns on, this FB checks if two sets of input array data are matched.
(2) The target input array data sets for comparison are read from the file register (ZR), starting from the address specified
by i_udInAry1Addr (input array data 1 start address) and starting from the address specified by i_udInAry2Addr (input
array data 2 start address). This FB reads each set of input array data for the number of points specified by i_udSize
(number of data points).
(3) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of input array data in
i_uDataType (data type selection).
(4) Specify the number of data points for arrays where the comparison is performed in i_udSize (number of data points).
When 1: Double Word [signed] or 2: Single-precision real number is specified by i_uDataType (data type selection), file
register (ZR) areas twice as many as the setting value of i_udSize (number of data points) are required.
(5) The comparison result is stored in o_bResult (check result). The comparison processing is performed from the start
data of the specified address. If the mismatched data is detected, o_bOK (normal completion) turns on while o_bResult
(check result) is off (initial value) and the comparison processing ends. In such a case, the offset value of the file
register (ZR) areas where a mismatch occurs is stored in o_udOutAryNum (number of output data points). When the
data sets are perfectly matched, o_bResult (check result) and o_bOK (normal completion) turn on. In such a case,
o_udOutAryNum (number of output data points) is the setting value of i_udSize (number of data points).
■Example 1
When the input array data 1 and 2 are perfectly matched, the output result is as follows. (Data type: Word [signed], number
of data: 10)
ZR0
ZR1
Array data 1
13
48
ZR50
ZR51
Array data 2
13
48
When the input array data 1 and input array data 2 of the above tables are used, the result of the comparison processing is
as follows.
• o_bOK (normal completion) turns on.
• o_bResult (check result) turns on.
• As the number of data, 10 is stored in o_udOutAryNum (number of output data points).
■Example 2
When the input array data 1 and 2 are not matched, the output result is as follows. (Data type: Word [signed], number of
data: 10)
ZR0
ZR1
Array data 1
13
48
ZR50
ZR51
Array data 2
13
48
When the input array data 1 and input array data 2 of the above tables are used, the result of the comparison processing is
as follows.
• o_bOK (normal completion) turns on.
• o_bResult (check result) remains off.
As the offset of the mismatched data, 3 is stored in o_udOutAryNum (number of output data points). In the above example,
data are not matched in the fourth, sixth, and ninth areas. The offset value of the mismatched data that are detected at first
is stored in o_udOutAryNum (number of output data points). Thus, 3 is stored.
MELSEC iQ-R series
GX Works3 of version 1.015R or later
ZR2
ZR3
ZR4
ZR5
21
-10
-38
1
ZR52
ZR53
ZR54
ZR55
21
-10
-38
1
ZR2
ZR3
ZR4
ZR5
21
-10
-38
1
ZR52
ZR53
ZR54
ZR55
21
-12
-38
2
2.8 M+ArrayHandling_Compare_R
ZR6
ZR7
ZR8
ZR9
35
40
3
-10
ZR56
ZR57
ZR58
ZR59
35
40
3
-10
ZR6
ZR7
ZR8
ZR9
35
40
3
-10
ZR56
ZR57
ZR58
ZR59
35
40
-5
-10
2 DETAILS OF THE FB LIBRARY
2
45

Advertisement

Table of Contents
loading

Table of Contents