Mitsubishi Electric MELSEC iQ-R Series Reference page 26

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
2 DETAILS OF THE FB LIBRARY
24
2.4 M+ArrayHandling_PointDiv_R
Description
CPU module
Engineering tool
 (The internal program of this FB is not open to the public.)
922 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 performs the division between the input array data and the division
value.
■Example 1
When 3 is input as the division value and this FB is executed for the input array data in word [signed], the output result is as
follows.
ZR0
Stored value
0
Output result
ZR10000
Stored value
0
■Example 2
When 3 is input as the division value and this FB is executed for the input array data in double word [signed], the output
result is as follows.
ZR0
Stored value
0
Output result
ZR10000
Stored value
0
(2) The input array data of the division target values are read from the file register (ZR), starting from the address specified
by i_udInAryAddr (input array data start address). This FB reads input array data for the number of points specified by
i_udSize (number of data points).
(3) The division value is read from the file register (ZR) of the address specified by i_udInPointAddr (input value address).
(4) The operation results are stored in the file register (ZR) for the number of points specified by i_udSize (number of data
points), starting from the address specified by i_udOutAryAddr (output array data start address).
(5) Set the following so that the input array data areas and the output array data areas are not overlapped.
 i_udInAryAddr (input array data start address)
 i_udOutAryAddr (output array data start address)
 i_udSize (number of data points)
If some areas of input array data and output array data are overlapped, o_bErr (error completion) turns on and the
processing of the FB is interrupted. In addition, 209H is stored in o_uErrId (error code). For the error code, refer to the
list of error codes. ( Page 28 List of error codes)
However, if the same value is set for i_udInAryAddr (input array data start address) and i_udOutAryAddr (output array
data start address), the operation is processed normally. The operation results overwrite data in the file register (ZR),
starting from the area specified by i_udInAryAddr (input array data start address).
(6) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of input array data, the
division value, and output array data in i_uDataType (data type selection).
(7) Specify the number of data points for an array where the division 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.
(8) It takes multiple scans until the division is completed. When the input array data before the operation is changed during
the operation processing, the operation processing is executed with the changed data. The number of points with the
operation completed is output to o_udOutAryNum (number of output data points). When the division is completed,
o_bOK (normal completion) turns on.
MELSEC iQ-R series
GX Works3 of version 1.015R or later
ZR1
1
ZR10001
0
ZR2
1
ZR10002
0
ZR998
ZR999
32767
-32768
ZR10998
ZR10999
10922
-10922
ZR1996
ZR1998
2147483647
-2147483648
ZR11996
ZR11998
715827882
-715827882

Advertisement

Table of Contents
loading

Table of Contents