Mitsubishi Electric MELSEC iQ-R Series Reference

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

Quick Links

MELSEC iQ-R Array Handling Function Block
Library Reference
Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSEC iQ-R Series

  • Page 1 MELSEC iQ-R Array Handling Function Block Library Reference...
  • Page 3: Table Of Contents

    CONTENTS CHAPTER 1 OVERVIEW FB Library List ................2 System Configuration Example .
  • Page 4: Chapter 1 Overview

    OVERVIEW The FB library in this manual is for array handling. FB Library List The following table lists the FB library in this manual. Name Description M+ArrayHandling_PointAdd_R Adds a specified value to values of each element in a specified array. M+ArrayHandling_PointSub_R Subtracts a specified value from values of each element in a specified array.
  • Page 5 MEMO 1 OVERVIEW 1.2 System Configuration Example...
  • Page 6: Chapter 2 Details Of The Fb Library

    DETAILS OF THE FB LIBRARY This chapter describes the details of the FB library. M+ArrayHandling_PointAdd_R Name M+ArrayHandling_PointAdd_R Overview Item Description Functional overview Adds a specified value to values of each element in a specified array. Symbol M+ArrayHandling_PointAdd_R i_bEN o_bENO UD : i_udSize o_bOK UD :...
  • Page 7 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later Language to use  (The internal program of this FB is not open to the public.) Number of steps 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.
  • Page 8 Item Description Functional description (6) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of input array data, addition value, and output array data in i_uDataType (data type selection). (7) Specify the number of data points for an array where addition 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.
  • Page 9 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Addition handling Unexecuted Executing Unexecuted o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Addition handling Unexecuted o_udOutAryNum...
  • Page 10 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 11 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 2 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 12: M+Arrayhandling_Pointsub_R

    M+ArrayHandling_PointSub_R Name M+ArrayHandling_PointSub_R Overview Item Description Functional overview Subtracts a specified value from values of each element in a specified array. Symbol M+ArrayHandling_PointSub_R i_bEN o_bENO UD : i_udSize o_bOK UD : i_udInAryAddr o_udOutAryNum (10) UD : i_udInPointAddr o_bErr (11) UD : i_udOutAryAddr o_uErrId UW :...
  • Page 13 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later Language to use  (The internal program of this FB is not open to the public.) Number of steps 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.
  • Page 14 Item Description Functional description (6) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of input array data, the subtraction value, and output array data in i_uDataType (data type selection). (7) Specify the number of data points for an array where the subtraction 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.
  • Page 15 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Subtraction Unexecuted Executing Unexecuted handling o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Subtraction Unexecuted handling...
  • Page 16 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register. (3) The FB cannot be used in an interrupt program.
  • Page 17 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 2 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 18: M+Arrayhandling_Pointmul_R

    M+ArrayHandling_PointMul_R Name M+ArrayHandling_PointMul_R Overview Item Description Functional overview Multiplies values of each element in a specified array by a specified value. Symbol M+ArrayHandling_PointMul_R i_bEN o_bENO UD : i_udSize o_bOK UD : i_udInAryAddr o_udOutAryNum (10) UD : i_udInPointAddr o_bErr (11) UD : i_udOutAryAddr o_uErrId UW :...
  • Page 19 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later Language to use  (The internal program of this FB is not open to the public.) Number of steps 859 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.
  • Page 20 Item Description Functional 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.
  • Page 21 Item Description Functional description (6) Specify Word [signed], Double Word [signed], or Single-precision real number as the data type of input array data, the multiplication value, and output array data in i_uDataType (data type selection). (7) Specify the number of data points for an array where the multiplication 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.
  • Page 22 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Multiplication Unexecuted Executing Unexecuted handling o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Multiplication Unexecuted handling...
  • Page 23 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 24 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 2 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 25: M+Arrayhandling_Pointdiv_R

    M+ArrayHandling_PointDiv_R Name M+ArrayHandling_PointDiv_R Overview Item Description Functional overview Divides values of each element in a specified array by a specified value. Symbol M+ArrayHandling_PointDiv_R i_bEN o_bENO UD : i_udSize o_bOK UD : i_udInAryAddr o_udOutAryNum UD : i_udInPointAddr o_bErr (10) UD : i_udOutAryAddr o_uErrId (11)
  • Page 26 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later  (The internal program of this FB is not open to the public.) Language to use Number of steps 922 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.
  • Page 27 Item Description Functional description (9) 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 28 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Division handling Unexecuted Executing Unexecuted o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Division handling Unexecuted o_udOutAryNum...
  • Page 29 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 30 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 2 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 31: M+Arrayhandling_Abs_R

    M+ArrayHandling_Abs_R Name M+ArrayHandling_Abs_R Overview Item Description Functional overview Outputs absolute values of values of each element in a specified array. Symbol M+ArrayHandling_Abs_R i_bEN o_bENO UD : i_udSize o_bOK UD : : i_udInAryAddr o_udOutAryNum o_bErr UD : i_udOutAryAddr o_uErrId (10) UW : i_uDataType Labels to use ■Input labels...
  • Page 32 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later  (The internal program of this FB is not open to the public.) Language to use Number of steps 651 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.
  • Page 33 Item Description Functional description (1) As i_bEN (execution command) turns on, this FB calculates the absolute values. ■Example 1 When the FB is executed for the input array data in word [signed], the output result is as follows. ZR997 ZR998 ZR999 Stored value -32766...
  • Page 34 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Calculating Unexecuted Executing Unexecuted absolute value o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Calculating Unexecuted...
  • Page 35 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 36: M+Arrayhandling_Sort_R

    M+ArrayHandling_Sort_R Name M+ArrayHandling_Sort_R Overview Item Description Functional overview Outputs the result of sorting a specified array in ascending order. Symbol M+ArrayHandling_Sort_R i_bEN o_bENO UD : i_udSize o_bOK o_udOutAryNum UD : : i_udInAryAddr o_bErr UD : i_udOutAryAddr o_uErrId (10) UW : i_uDataType Labels to use ■Input labels...
  • Page 37 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later Language to use  (The internal program of this FB is not open to the public.) Number of steps 3572 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.
  • Page 38 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Sort (ascending) Unexecuted Executing Unexecuted o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Sort (ascending) Unexecuted o_udOutAryNum...
  • Page 39 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0 and LZ1. When using an interrupt program, do not use the corresponding index register.
  • Page 40 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 4 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 41: M+Arrayhandling_Reverse_R

    M+ArrayHandling_Reverse_R Name M+ArrayHandling_Reverse_R Overview Item Description Functional overview Outputs the result of sorting a specified array in reverse order. Symbol M+ArrayHandling_Reverse_R i_bEN o_bENO UD : i_udSize o_bOK UD : : i_udInAryAddr o_udOutAryNum o_bErr UD : i_udOutAryAddr o_uErrId (10) UW : i_uDataType Labels to use ■Input labels...
  • Page 42 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later  (The internal program of this FB is not open to the public.) Language to use Number of steps 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.
  • Page 43 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Sorting handling Unexecuted Executing Unexecuted in reverse o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Sorting handling...
  • Page 44 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 45 List of error codes Error code Description Action 103H A value out of the range is set in i_uDataType (data type selection). Review and correct the setting and then execute the FB again. Set a value of 0 to 4 in i_uDataType (data type selection). 105H A value out of the range is set in i_udSize (number of data points).
  • Page 46: M+Arrayhandling_Compare_R

    M+ArrayHandling_Compare_R Name M+ArrayHandling_Compare_R Overview Item Description Functional overview Compares two specified arrays. Symbol M+ArrayHandling_Compare_R i_bEN o_bENO UD : i_udSize o_bOK UD : i_udInAry1Addr o_udOutAryNum UD : i_udInAry2Addr o_bResult (10) UW : i_uDataType o_bErr (11) o_uErrId Labels to use ■Input labels Variable name Name Data type...
  • Page 47 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later Language to use  (The internal program of this FB is not open to the public.) Number of steps 646 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.
  • Page 48 Item Description Functional description (6) For the single-precision real number, data are compared by using the following formulas considering a rounding error. When S (difference) is smaller than E (tolerance) (S < E), the values of two data are regarded as matched. •...
  • Page 49 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Comparing Unexecuted Executing Unexecuted handling o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Comparing Unexecuted handling...
  • Page 50 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0. When using an interrupt program, do not use the corresponding index register.
  • Page 51: M+Arrayhandling_Copy_R

    M+ArrayHandling_Copy_R Name M+ArrayHandling_Copy_R Overview Item Description Functional overview Copies a specified array to specified storage locations. Symbol M+ArrayHandling_Copy_R i_bEN o_bENO UD : i_udSize o_bOK UD : : i_udSourceAryAddr o_udOutAryNum o_bErr UD : i_udDestAryAddr o_uErrId (10) UW : i_uDataType Labels to use ■Input labels Variable name Name...
  • Page 52 FB details Item Description Relevant devices CPU module MELSEC iQ-R series Engineering tool GX Works3 of version 1.015R or later  (The internal program of this FB is not open to the public.) Language to use Number of steps 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.
  • Page 53 Item Description Timing chart of Normal When i_udSize (number of data points) is 1000 points I/O signals completion i_bEN o_bENO Copy handling Unexecuted Executing Unexecuted o_udOutAryNum 1000 o_bOK o_bErr o_uErrId Error • Parameter error (error before execution) completion i_bEN o_bENO Copy handling Unexecuted o_udOutAryNum...
  • Page 54 Item Description Restrictions and precautions (1) This FB does not include the error recovery processing. Prepare the error recovery processing separately to suit the user's system and the expected operation. (2) This FB uses the long index register LZ0 and LZ1. When using an interrupt program, do not use the corresponding index register.
  • Page 55 MEMO 2 DETAILS OF THE FB LIBRARY 2.9 M+ArrayHandling_Copy_R...
  • Page 56: Instruction Index

    INSTRUCTION INDEX ....29 M+ArrayHandling_Abs_R ....44 M+ArrayHandling_Compare_R ....49 M+ArrayHandling_Copy_R .
  • Page 57 MEMO...
  • Page 58: Revisions

    Japanese manual number: BCN-P5999-0917-A This manual confers no industrial property rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 60 BCN-P5999-0918-A(1712)MEE MODEL: ARRAYHANDL-FBR-E HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice.

Table of Contents