History Window block

The History Window block keeps a history of previous values of an input field.

Return to Overview of blocks

History Window block

Description

The History Window block keeps a history of the previous values of one of its input fields.  The block can only lag a single field. Each time the timestamp of the input field changes, the lags are shifted one position and the current output field gets a copy of the current input. Nothing happens to the output if the timestamp does not change.

Warning: The History window block keeps a history of the input fields based on the input field timestamp. The timestamp of the input field does not necessarily change on every execute.

diagram of the History window block

Block Type

Time based block

Input/Output ports

  • The input port can accept any number of inputs of any type. Only 1 input field may be selected to lag.

  • The number of output fields are determined by the number of lags specified in the configuration. The current input value is always made available on the output together with all the lags.

Return to top

Functions performed on tags

  • On the values -

    • On first execution

      • The value of the current output field is set to the current input value.

      • The value of the lagged output fields are set to the configured initial values.

    • On subsequent executions

      • The value of the current output field is set to the current input value.

      • The value of the lagged output fields are set to the lagged values of the input value.

  • On the timestamp -

    • On first execution

      • If the block is configured to preserve field time, the output timestamp is set to minus infinity.

      • If the block is configured to preserve execute time, the output timestamp is set to execution time.

    • On subsequent executions

      • If the block is configured to preserve field time, the output timestamp matches the input field timestamps.

      • If the block is configured to preserve execute time, the output timestamp is set to execution time.

  • On the quality -

    • On first execution

      • If the block is configured to preserve field time, the initial quality is bad.

      • If the block is configured to preserve execute time, quality comes from the input field.

    • On subsequent executions

      • The quality comes from the input field.

Return to top

Example

We will assume that we have the set of input data shown in the first three columns in the table below (timestamp, quality and value respectively).  The data is available at 1 minute intervals and thus the t-1 value and quality will have the value and quality of the input field one minute ago.  Similarly the t-2 value and quality will have the value and quality of the input field two minutes ago.    

The t-1 time delay quality and value are specified in the fourth and fifth columns while the t-2 time delay quality and value are specified in the sixth and seventh columns.

Note : The initial value and quality of the lagged output field will be 0 and good initially until the necessary history of input values is obtained  

      


Related topics:

  

CSense 2023- Last updated: June 24,2025