TrendStorageReaderGlobals (GVL) ¶ This GVL contains global configuration values of the trend storage api. Attributes: qualified_only InOut: Name Type Initial Comment g_iMaxCountRowsToRead INT 1000 The maximum number of rows, that a single read request can read. The limit of 1000 records per single read call is good value, that ensures, that a trend element, that is also displaying the data, does not have any delays. For slower hardware this value has to be decreased accordingly.
TrendStorageReaderValueConverter (FB) ¶ FUNCTION_BLOCK TrendStorageReaderValueConverter This helper function block is used in conjunction with the TrendStorageReader and converts the values of the trend storage into a suitable format, e.g. into a string. Methods: ConvertToLREAL ConvertToREAL ConvertToString SetVariableConfiguration Structure: ConvertToLREAL (Method) ConvertToREAL (Method) ConvertToString (Method) SetVariableConfiguration (Method)
TrendStorageReaderValueConverter.ConvertToLREAL (METH) ¶ METHOD ConvertToLREAL : LREAL Converts a value read from the trend storage into a LREAL value. InOut: Scope Name Type Comment Return ConvertToLREAL LREAL Input iWhichVariable INT A 0-based index of the variable within all variables, i.e. must be less the parameter iCountVariables of method SetVariableConfiguration liValue LINT The value, that was read from TblTrendData xValueNULL BOOL Indicates, whether NULL is stored in the trend storage Output eError ETrendStorageReaderErrors Returns a ETrendStorageReaderErrors value indicating, where the processing was completed successfully or not. ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.InvalidCall: ConvertToLREAL was called without calling method SetVariableConfiguration before ETrendStorageReaderErrors.WrongParameter: The value of the parameter iWhichVariable is invalid
TrendStorageReaderValueConverter.ConvertToREAL (METH) ¶ METHOD ConvertToREAL : REAL Converts a value read from the trend storage into a REAL value. InOut: Scope Name Type Comment Return ConvertToREAL REAL Input iWhichVariable INT A 0-based index of the variable within all variables, i.e. must be less the parameter iCountVariables of method SetVariableConfiguration liValue LINT The value, that was read from TblTrendData xValueNULL BOOL Indicates, whether NULL is stored in the trend storage Output eError ETrendStorageReaderErrors Returns a ETrendStorageReaderErrors value indicating, where the processing was completed successfully or not. ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.InvalidCall: ConvertToREAL was called without calling method SetVariableConfiguration before ETrendStorageReaderErrors.WrongParameter: The value of the parameter iWhichVariable is invalid
TrendStorageReaderValueConverter.ConvertToString (METH) ¶ METHOD ConvertToString : STRING Converts a value read from the trend storage into a suitable string representation. InOut: Scope Name Type Comment Return ConvertToString STRING Input iWhichVariable INT A 0-based index of the variable within all variables, i.e. must be less the parameter iCountVariables of method SetVariableConfiguration liValue LINT The value, that was read from TblTrendData xValueNULL BOOL Indicates, whether NULL is stored in the trend storage Output eError ETrendStorageReaderErrors Returns a ETrendStorageReaderErrors value indicating, where the processing was completed successfully or not. ETrendStorageReaderErrors.NoError: Completed successfully ETrendStorageReaderErrors.InvalidCall: ConvertToString was called without calling method SetVariableConfiguration before ETrendStorageReaderErrors.WrongParameter: The value of the parameter iWhichVariable is invalid
TrendStorageReaderValueConverter.SetVariableConfiguration (METH) ¶ METHOD SetVariableConfiguration This method has to be called, before any other method of this function block can be used. It is used to set the variable configuration describing the variables. InOut: Scope Name Type Comment Input paTrendStorageVariableDescription POINTER TO ARRAY [0..0] OF TrendStorageVariableDescription Points to an array of TrendStorageVariableDescription Variables, where the configuration of the variables has been stored. This array contains the description of the variables, whose data will be read iCountVariables INT The effective size of the array above, i.e. the number of variables
TrendFctGetRecordSizeFactor (FUN) ¶ FUNCTION TrendFctGetRecordSizeFactor : REAL This function returns the factor for changing the record size used to control the size of the DB: the number of records to be deleted at each reorganisation is calculated on the basis of an empirically calculated size, this size can be changed by this factor. InOut: Scope Name Type Comment Return TrendFctGetRecordSizeFactor REAL Input sPacketName STRING A string containing the name of the trace mgr packet
TrendFctResetDBReOrderingData (FUN) ¶ FUNCTION TrendFctResetDBReOrderingData This function resets data regarding DB reorganization InOut: Scope Name Type Comment Input sPacketName STRING A string containing the name of the trace mgr packet
TrendFctSetDBPercLimit (FUN) ¶ FUNCTION TrendFctSetDBPercLimit This function sets the percentage used to check the DB size: the DB size is reduced by this percentage if the set limit is exceeded. InOut: Scope Name Type Comment Input sPacketName STRING A string containing the name of the trace mgr packet iPerc INT Percencate in decimal to use, e.g. 0.5% => 5
TrendFctSetDBReOrderingForceFailure (FUN) ¶ FUNCTION TrendFctSetDBReOrderingForceFailure : INT This function returns data regarding DB reorganization force failure, use only for test InOut: Scope Name Type Comment Return TrendFctSetDBReOrderingForceFailure INT Input sPacketName STRING A string containing the name of the trace mgr packet iValue INT