Mitsubishi Electric MELSEC iQ-R Series Reference page 7

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.)
853 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 addition between the input array data and the addition
value.
■Example 1
When 1 is input as the addition value and this FB is executed for the array data in word [signed], the output result is as
follows.
ZR0
Stored value
0
Output result
ZR10000
Stored value
1
■Example 2
When 1 is input as the addition 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
1
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 addition 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 addition 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 9 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).
MELSEC iQ-R series
GX Works3 of version 1.015R or later
ZR1
1
ZR10001
2
ZR2
1
ZR10002
2
Effective data range: -32768 to 32767
7FFFH(32767) + 0001H(1)
= 8000H(-32768)
8000H(-32768) + FFFFH(-1)
= (1)7FFFH(32767)
Underflow data (1) are discarded.
Effective data range: -2147483648 to 2147483647
7FFFFFFFH(2147483647) + 00000001H(1)
= 80000000H(-2147483648)
80000000H(-2147483648) + FFFFFFFFH(-1)
= (1)7FFFFFFFH(2147483647)
Underflow data (1) are discarded.
ZR998
ZR999
32767
-32768
ZR10998
ZR10999
-32768
-32767
ZR1996
ZR1998
2147483647
-2147483648
ZR11996
ZR11998
-2147483648
-2147483647
2 DETAILS OF THE FB LIBRARY
2.1 M+ArrayHandling_PointAdd_R
2
5

Advertisement

Table of Contents
loading

Table of Contents