Mitsubishi Electric MELSEC iQ-R Series Reference page 52

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
50
2.9 M+ArrayHandling_Copy_R
Description
CPU module
Engineering tool
 (The internal program of this FB is not open to the public.)
648 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 copies data.
■Example
When the FB is executed for the copy source 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
0
(2) The target copy source array data for processing is read from the file register (ZR), starting from the address specified
by i_udSourceAryAddr (copy source array data start address). This FB reads the 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_udDestAryAddr (copy destination array data start address).
(4) Set the following so that the copy source array data areas and the copy destination array data areas are not
overlapped.
 i_udSourceAryAddr (copy source array data start address)
 i_udDestAryAddr (copy destination array data start address)
 i_udSize (number of data points)
If some areas of copy source array data and copy destination 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 52 List of error codes)
(5) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of copy source array
data and the copy destination array data in i_uDataType (data type selection).
(6) Specify the number of data points for an array where the copy 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.
(7) It takes multiple scans until the copy processing is completed. Thus, do not change the target copy source array data
until the processing is completed. The number of points with the copy completed is output to o_udOutAryNum (number
of output data points). When the processing is completed, o_bOK (normal completion) turns on.
(8) 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 52 List of error codes)
(9) 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 52 List of error codes)
(10)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 52 List of error codes)
(11)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 52 List of error codes)
The results of the processing 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
1
ZR10001
1
ZR998
ZR999
998
999
ZR10998
ZR10999
998
999

Advertisement

Table of Contents
loading

Table of Contents