Mitsubishi Electric MELSEC iQ-R Series Reference page 42

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
FB compilation method
FB operation
2 DETAILS OF THE FB LIBRARY
40
2.7 M+ArrayHandling_Reverse_R
Description
CPU module
Engineering tool
 (The internal program of this FB is not open to the public.)
638 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 sorts an array in reverse order.
■Example
When the FB is executed for the input array data in word [signed] (number of data points: 1000), the output result is as
follows.
ZR0
Stored value
0
Output result
ZR10000
Stored value
1
(2) The target input array data for processing is 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 processing 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).
(4) 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 43 List of error codes)
(5) Specify Word [signed], Double Word [signed], Single-precision real number, Word [unsigned], or Double Word
[unsigned] as the data type of input array data and output array data in i_uDataType (data type selection).
(6) It takes multiple scans until the sorting processing is completed. Thus, do not change the target input array data until
the processing is completed. The number of points with the sort completed is output to o_udOutAryNum (number of
output data points). When the processing is completed, o_bOK (normal completion) turns on.
(7) If a value out of the range is set in i_udSize (number of data points), o_bErr (error completion) turns on and the
processing of the FB is interrupted. In addition, 105H is stored in o_uErrId (error code). For the error code, refer to the
list of error codes. ( Page 43 List of error codes)
(8) If a value out of the range is set in i_uDataType (data type selection), o_bErr (error completion) turns on and the
processing of the FB is interrupted. In addition, 103H is stored in o_uErrId (error code). For the error code, refer to the
list of error codes. ( Page 43 List of error codes)
(9) When a single-precision real number is set in i_uDataType (data type selection) and the value stored in the file register
(ZR) is not a single-precision real number, o_bErr (error completion) turns on and the processing of the FB is
interrupted. In addition, 200H is stored in o_uErrId (error code). For the error code, refer to the list of error codes. (
Page 43 List of error codes)
(10)If i_bEN (execution command) is turned off before o_bOK (normal completion) or o_bErr (error completion) turns on,
o_bErr (error completion) turns on in one scan. In addition, 205H is stored in o_uErrId (error code) in one scan. For the
error code, refer to the list of error codes. ( Page 43 List of error codes)
The results of the operation that has been completed before i_bEN (execution command) is turned off remain stored in
the file register (ZR).
Subroutine type
Pulse execution type (multiple scan execution type)
MELSEC iQ-R series
GX Works3 of version 1.015R or later
ZR1
999
ZR10001
998
ZR998
ZR999
998
1
ZR10998
ZR10999
999
0

Advertisement

Table of Contents
loading

Table of Contents