This function subtracts a matrix of the data type ARRAY[*,*] of LREAL
from another one.
The individual fields of the two matrices are read, subtracted and then output in the matrix matrixResult
.
LGF_MatrixSubtraction (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
Ret_Val | Void | |||||||
error | Bool | |||||||
status | Word | |||||||
Array[*, *] of LReal | matrix1 | Array[*, *] of LReal | ||||||
Array[*, *] of LReal | matrix2 | Array[*, *] of LReal | ||||||
Array[*, *] of LReal | matrixResult | Array[*, *] of LReal | ||||||
Identifier | Data type | Description |
---|---|---|
Ret_Val | Void | Void - Function has no return value |
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
Identifier | Data type | Description |
---|---|---|
matrix1 | Array[*, *] of LReal | First matrix - minuend |
matrix2 | Array[*, *] of LReal | Second matrix - subtrahend |
matrixResult | Array[*, *] of LReal | Sum of the matrices |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_NO_ERROR Execution finished without errors |
16#8200 | ERR_MATR1_LOWBOUND_ROWS_MATR2_LOWBOUND_ROWS Error: Matrix1 lower bound rows(Dim1) size is different with Matrix2 lower bound rows(Dim1) |
16#8201 | ERR_MATR1_LOWBOUND_ROWS_RESMATR_LOWBOUND_ROWS Error: Matrix1 lower bound rows(Dim1) size is different with Result Matrix lower bound rows(Dim1) |
16#8202 | ERR_MATR1_LOWBOUND_COLUMNS_MATR2_LOWBOUND_COLUMNS Error: Matrix1 lower bound columns(Dim2) size is different with Matrix 2 lower bound columns(Dim2) |
16#8203 | ERR_MATR1_LOWBOUND_COLUMNS_RESMATR_LOWBOUND_COLUMNS Error: Matrix1 lower bound columns(Dim2) size is different with Result Matrix lower bound columns(Dim2) |
16#8204 | ERR_MATR1_UPPBOUND_ROWS_MATR2_UPPBOUND_ROWS Error: Matrix1 upper bound rows(Dim1) size is different with Matrix2 upper bound rows(Dim1) |
16#8205 | ERR_MATR1_UPPBOUND_ROWS_RESMATR_UPPBOUND_ROWS Error: Matrix1 upper bound rows(Dim1)s size is different with Result Matrix upper bound rows(Dim1) |
16#8206 | ERR_MATR1_UPPBOUND_COLUMNS_MATR2_UPPBOUND_COLUMNS Error: Matrix1 upper bound columns(Dim2) size is different with Matrix2 upper bound columns(Dim2) |
16#8207 | ERR_MATR1_UPPBOUND_COLUMNS_RESMATR_UPPBOUND_COLUMNS Error: Matrix1 upper bound columns(Dim2) size is different with Result Matrix upper bound columns(Dim2) |
Version & Date | Change description | |
---|---|---|
01.00.00 | Siemens Industry Online Support | |
19.08.2015 | First released version | |
01.00.01 | Siemens Industry Online Support | |
02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
02.00.00 | Siemens Industry Online Support | |
06.02.2017 | Functionality using Array[*,*] | |
02.00.01 | Siemens Industry Online Support | |
17.08.2018 | Upgrade: TIA V15 Update 2 | |
02.00.06 | Simatic Systems Support | |
07.10.2019 | Regions, comments and constants are added Moved matrices to IO field. | |
03.00.00 | Simatic Systems Support | |
23.04.2020 | Set version to V3.0.0, harmonize the version of the whole library | |
03.00.01 | Simatic Systems Support | |
02.02.2020 | Insert documentation |