Mitsubishi Electric MELSEC iQ-R Series Reference page 20

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

Advertisement

Item
Functional description
2 DETAILS OF THE FB LIBRARY
18
2.3 M+ArrayHandling_PointMul_R
Description
(1) As i_bEN (execution command) turns on, this FB performs the multiplication between the input array data and the
multiplication value.
■Example 1
When 3 is input as the multiplication 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 multiplication 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
If an underflow or an overflow occurs during operation when word or double word is specified by i_uDataType (data type
selection), the operation result is as follows.
Word [signed]
Overflow
Underflow
Double word [signed]
Overflow
Underflow
(2) The input array data of the multiplication 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 multiplication 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 22 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).
ZR1
1
ZR10001
3
ZR2
1
ZR10002
3
Effective data range: -32768 to 32767
7FFFH(32767) × 0003H(3)
= (1)7FFDH(32765)
Overflow data (1) are discarded.
8000H(-32768) × 0003H(3)
= (1)8000H(-32768)
Underflow data (1) are discarded.
Effective data range: -2147483648 to 2147483647
7FFFFFFFH(2147483647) × 00000003H(3)
= (1)7FFFFFFDH(2147483645)
Overflow data (1) are discarded.
80000001H(-2147483647) × 00000003H(3)
= (1)80000003H(-2147483645)
Underflow data (1) are discarded.
ZR998
ZR999
32767
-32768
ZR10998
ZR10999
32765
-32768
ZR1996
ZR1998
2147483647
-2147483647
ZR11996
ZR11998
2147483645
-2147483645

Advertisement

Table of Contents
loading

Table of Contents