LGF_MatrixCompare (FC / V3.0.1)

Overview

Author: Siemens Digital Industry

Short description

This function compares two matrices of the data type ARRAY[*,*] of LREAL of equal size.

If both matrices are identical, the return value of the function is set to TRUE.

Note
Note that all input matrices must have the same lower and upper limit, and, therefore, the same number of columns and rows.

Block Interface

LGF_MatrixCompare (FC)
   Ret_Val  Bool
    
   error  Bool
    
   status  Word
    
Array[*, *] of LReal  matrix1  Array[*, *] of LReal
       
Array[*, *] of LReal  matrix2  Array[*, *] of LReal
       
   

Output parameter

IdentifierData type Description
Ret_ValBool TRUE: Both matrices are identical.
errorBool FALSE: No error
TRUE: An error occurred during the execution of the FB
statusWord 16#0000-16#7FFF: Status of the FB
16#8000-16#FFFF: Error identification (see following Table)

In/Out parameter

IdentifierData type Description
matrix1Array[*, *] of LReal First Matrix
matrix2Array[*, *] of LReal Second Matrix

Status & Error codes

Code / ValueIdentifier / Description
16#0000STATUS_NO_ERROR
Execution finished without errors
16#8200ERR_MATR1_LOWBOUND_ROWS_MATR2_LOWBOUND_ROWS
Error: Matrix1 lower bound rows(Dim1) size is different with Matrix2 lower bound rows(Dim1)
16#8201ERR_MATR1_LOWBOUND_COLUMNS_MATR2_LOWBOUND_COLUMNS
Error: Matrix1 lower bound columns(Dim2) size is different with Matrix 2 lower bound columns(Dim2)
16#8202ERR_MATR1_UPPBOUND_ROWS_MATR2_UPPBOUND_ROWS
Error: Matrix1 upper bound rows(Dim1) size is different with Matrix2 upper bound rows(Dim1)
16#8203ERR_MATR1_UPPBOUND_COLUMNS_MATR2_UPPBOUND_COLUMNS
Error: Matrix1 upper bound columns(Dim2) size is different with Matrix2 upper bound columns(Dim2)

Change log

Version & DateChange description
01.00.00Simatic Systems Support
13.11.2019First release
03.00.00Simatic Systems Support
23.04.2020Set version to V3.0.0, harmonize the version of the whole library
03.00.01Simatic Systems Support
02.02.2020Insert documentation