Historical Sample and Hold block

The block samples the input in a history window when a VB/Excel date and time format reset event occurs.

Return to Overview of blocks

Historical Sample and Hold block

Description

The Sample and Hold block copies the fields on the input port to the fields on the output port only when a reset time event occurs. This action is referred to as sampling. The normal execution of the block holds the value constant, i.e. the value of the output field(s) remains constant between reset events. This action is referred to as hold. A reset event is triggered by the Reset on Input Change block, where the reset event in this block is a VB/Excel date and time format value.

HISTORICAL SAMPLE AND HOLD BLOCK

Block Type

Time based block

Input port

Information parsed to the input port (list input fields/ tags in a Normal list)

The block can accept any number of fields of any type. There is an output field for every input field.  Output fields are created automatically to match the input fields.  New output field names can have a post-fix applied, the post-fix is configurable by the user or the user can assign a new output tag name by editing the output field.

Return to top

Functions performed on tags

  • On the values – A history buffer is built-up as the blueprint execute. When a reset event occurs, the input field from the history buffer is selected and copied to the output field, the output field value will remain constant until the next reset event. The reset event must be in the form of a VB/Excel date and time format value, Reset on Input change block, which will be used as the time stamp to search for the value to sample and hold from the history buffer.

  • On the time stamp - The time stamp of the output field depends on the configuration of the Reset on Input change block.  When using the VB/Excel date and time format value to trigger the event, the time stamp will be the corresponding time stamp to the VB/Excel date-time value. This time stamp is then assigned to the output field.  When using the rising/falling value to trigger the event, the associated time stamp will be the execution time that is assigned to the output field.

  • On the quality - The output field quality is the same as the quality of the input field at the time of sampling.  Thus if the quality of the input field is bad at the time of sampling, the output field quality will be bad quality until a new, good quality, value has been sampled. If the time stamp of the reset event is outside the range of the history buffer the output value quality will be bad.

Return to top

Example

The table below shows the input to the historical sample and hold block, the input to the reset on input change block, as well as the output value and time stamp from the historical sample and hold block.  The reset on input change block is configured to sample on the change in the VB/Excel date and time value and to sample the historical sample and hold block based on the corresponding time stamp to the VB/Excel date-time value. Thus whenever the input to the reset on input change block changes in value, a reset event occurs and the sample and hold block samples its input fields based on the corresponding time stamp of the VB/Excel date-time value.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025