LGF_CountArrayElements (FC / V1.0.0)

Overview

Author: Siemens Industry Support

Short description

Count the number of array elements and returns the number of elements zero based (Array[0..x] of Type).

Block Interface

LGF_CountArrayElements (FC)
Variant  array Ret_Val  DInt
    
   

Input parameter

IdentifierData type Description
arrayVariant Input array to check for number of elements

Output parameter

IdentifierData type Description
Ret_ValDInt Number of elements in array (zero based);
Returning `-1` if input variable is not type `array`;
Returning `-2` if input variable is type `bool`;

Status & Error codes

Code / ValueIdentifier / Description
-1RETURN_NO_ARRAY
No array is present at the input `array`
-2RETURN_NO_BOOL_ARRAYS_NOT_SUPPORTED
Boolean arrays not supported

Change log

Version & DateChange description
01.00.00Siemens Industry Support
10-06-2022First released version