Statistics_LREAL (FB) ¶ FUNCTION_BLOCK Statistics_LREAL This function block will update the values of minimum, maximum and average with respect to the integral input parameter \(x_{n}\) , which will be added to a set of integral data \(x_{n-1},\dots,n_{1}\) (stemming from previous calls). The arithmetic mean \(\bar{x}\) of the values \(x_{n},\dots,x_{1}\) is calculated by: \[\bar{x} = \frac{1}{n}\sum_{i=1}^{n}x_{i}\] InOut: Scope Name Type Initial Comment Input xEnable BOOL Reset lrInput LREAL New data \(x_{n}\) Output lrMin LREAL LREAL#1E+80 Minimum of set \(x_{n},\dots,x_{1}\) lrMax LREAL LREAL#-1E+80 Maximum of set \(x_{n},\dots,x_{1}\) lrAverage LREAL Arithmetic mean of data \(x_{n},\dots,x_{1}\) xOverrun BOOL TRUE : In case of overflow The module will compensate this by a minor weighting of the old data leading to inaccuracy of the result
Variance (FB) ¶ FUNCTION_BLOCK Variance This function will update the experimental variance of the mean with respect to the new input parameter \(x_{n}\) , which will be added to a series of data \(x_{n-1},\dots,n_{1}\) (stemming from previous calls). The variance \(s\) of the data \(x_{n},\dots,x_{1}\) is calculated according to: \(s = \frac{1}{n}\sum_{i=1}^{n}\left(x_{i} - \bar{x}\right)\) , where \(\bar{x}\) is the arithmetic mean of the data. InOut: Scope Name Type Comment Input xEnable BOOL Reset lrInputValue LREAL New data \(x_{n}\) Output lrVariance LREAL Experimental variance of the mean of \(x_{n},\dots,x_{1}\)
trigonometrical functions ¶ atan2 (Function)
IStorage.StorageIsReadOnly (PROP) ¶ PROPERTY StorageIsReadOnly : BOOL
IStorage.StorageLockingState (PROP) ¶ PROPERTY StorageLockingState : LOCKING_STATE
IStorage.StorageNumOfTables (PROP) ¶ PROPERTY StorageNumOfTables : CAA.COUNT
IStorage.StorageReorg (METH) ¶ METHOD StorageReorg : ERROR The reorg function rebuilds the entire storgae. There are several reasons an application might do this: Unless the storgae is running with xAutoReorg = TRUE, when a large amount of data is deleted from the storage file it leaves behind empty space, or “free” storage pages. This means the database file might be larger than strictly necessary. Running the reorg function to rebuild the storage reclaims this space and reduces the size of the storage file. Frequent inserts, updates, and deletes can cause the database file to become fragmented - where data for a single table or index is scattered around the storage file. Running the reorg function ensures that each table and index is largely stored contiguously within the storage file. In some cases, the reorg function may also reduce the number of partially filled pages in the database, reducing the size of the database file further. The reorg function works by copying the contents of the database into a temporary storage file and then overwriting the original with the contents of the temporary file. When overwriting the original, a rollback journal or write-ahead log file is used just as it would be for any other storage transaction. This means that when reorganizing a storage, as much as twice the size of the original database file is required in free disk space. The reorg function will fail if there is an open transaction when it is run. InOut: Scope Name Type Return StorageReorg ERROR
IStorage.StorageSchemaVersion (PROP) ¶ PROPERTY StorageSchemaVersion : DINT
IStorage.StorageUserVersion (PROP) ¶ PROPERTY StorageUserVersion : DINT
IStorage.StorageVersion (PROP) ¶ PROPERTY StorageVersion : DINT