LGF_AverageAndDeviation (FC / V3.0.1)


Author: Siemens Digital Industry

Short description

This function calculates the arithmetic mean and the standard deviation from a series of numbers.

Block Interface

LGF_AverageAndDeviation (FC)
Array[*] of LReal  variableArray Ret_Val  Void
    
   arithmeticAverage  LReal
    
   standardDeviation  LReal
    
   

Input parameter

IdentifierData typeDescription
variableArrayArray[*] of LRealSequence of numbers to calculate with

Output parameter

IdentifierData typeDescription
Ret_ValVoidVoid - Function has no return value
arithmeticAverageLRealCalculated arithmetic average value
standardDeviationLRealCalculated standard deviation

Functional description

An array of any size is connected via the variableArray input. After reading-out the array boundaries, the arithmetic mean value and the standard deviation will be calculated from the values and both will be output.


Note
An array with too many elements can cause the cycle monitoring time to be exceeded.

Change log

Version & DateChange description
01.00.00Siemens Industry Online Support
19.08.2015First released version
01.00.01Siemens Industry Online Support
16.11.2015Bug fix at WRONG_TYPE: #error := true
01.00.02Siemens Industry Online Support
02.01.2017Upgrade: TIA Portal V14 Update 1
01.00.03Siemens Industry Online Support
17.08.2018Upgrade: TIA V15 Update 2
01.00.04Siemens Industry Online Support
23.11.2018Upgrade: TIA V15.1
02.00.00Simatic Systems Support
25.01.2019Data type changed from Variant to Array[*] of LReal
02.00.01Simatic Systems Support
31.10.2019Regions, comments and constants are added
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
06.04.2021Insert documentation