4
2 DETAILS OF THE FB LIBRARY
2.1 M+ArrayHandling_PointAdd_R
2 DETAILS OF THE FB LIBRARY
This chapter describes the details of the FB library.
2.1 M+ArrayHandling_PointAdd_R
Name
M+ArrayHandling_PointAdd_R
Overview
Labels to use
■Input labels
*1 The valid range varies depending on "Device/Label Memory Area Setting" of "CPU Parameter".
■Output labels
Item Description
Functional overview Adds a specified value to values of each element in a specified array.
Symbol
No. Variable name Name Data type Scope Description
(1) i_bEN Execution command Bit On or off On: The FB is activated.
Off: The FB is not activated.
(2) i_udSize Number of data
points
Double Word
[unsigned]
1 to 1000000 Specifies the number of data points for an array
where the addition is performed.
(3) i_udInAryAddr Input array data start
address
Double Word
[unsigned]
Valid device range
*1
Specifies the start address of the file register (ZR)
where the input array data of the addition target
values are stored.
(4) i_udInPointAddr Input value address Double Word
[unsigned]
Valid device range
*1
Specifies the address of the file register (ZR)
where the addition value is stored.
(5) i_udOutAryAddr Output array data
start address
Double Word
[unsigned]
Valid device range
*1
Specifies the start address of the file register (ZR)
where the operation results are to be stored.
(6) i_uDataType Data type selection Word [unsigned] 0 to 2 Specifies the data type of the data to be operated.
0: Word [signed]
1: Double Word [signed]
2: Single-precision real number
No. Variable name Name Data type Default value Description
(7) o_bENO Execution status Bit Off On: The execution command is on.
Off: The execution command is off.
(8) o_bOK Normal completion Bit Off The on state indicates that the addition has been
completed.
(9) o_udOutAryNum Number of output
data points
Double Word
[unsigned]
0 The number of output data points with their
addition completed is stored.
(10) o_bErr Error completion Bit Off The on state indicates that an error has occurred
in the FB.
(11) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
returned.
i_bENB:
i_udInPointAddrUD : o_bErr B:
M+ArrayHandling_PointAdd_R
o_udOutAryNum UD:
o_bOK B:
o_bENO B:
i_uDataTypeUW :
i_udOutAryAddrUD :
i_udInAryAddrUD :
i_udSizeUD :
(1) (7)
(8)
(9)
(10)
o_uErrId UW:
(11)
(2)
(3)
(4)
(5)
(6)