This function searches, in an array of the data type LReal, for the maximum and minimum value and the respective index in the array.
LGF_SearchMinMax_LReal (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
Ret_Val | Void | |||||||
minValue | LReal | |||||||
minValueIndex | DInt | |||||||
maxValue | LReal | |||||||
maxValueIndex | DInt | |||||||
Array[*] of LReal | values | Array[*] of LReal | ||||||
Identifier | Data type | Description |
---|---|---|
Ret_Val | Void | Void - Function has no return value |
minValue | LReal | Minimum value found in the array |
minValueIndex | DInt | Index of the minimum found value in the array. The start index of the array plus `minValueIndex` results in the array index of the smallest value. The index starts with 0. |
maxValue | LReal | Maximum value found in the array |
maxValueIndex | DInt | Index of the maximum found value in the array. The start index of the array plus `maxValueIndex` results in the array index of the smallest value. The index starts with 0. |
Identifier | Data type | Description |
---|---|---|
values | Array[*] of LReal | Array in whose fields the maximum and minimum are searched |
An array of any size is connected via the values
input. The elements are then compared in turn. The smallest and largest values, as well as their corresponding index are output to the array.
Version & Date | Change description | |
---|---|---|
01.00.00 | Simatic Systems Support | |
11.11.2019 | First release copied from "LGF_SearchMinMax" and reworked to array[*] | |
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 | |
09.02.2021 | Insert documentation |