Inactivity Detector block

Detects when a signal is inactive (constant) for a specified period of time.

Return to Overview of blocks

Inactivity Detector block

Description

Detects when a signal is inactive (constant) for a specified period of time.  There are two ways of determining Inactivity i.e. based on no change in (1) the timestamp and (2) the value and quality fields.

  • timestamp - A field is inactive when there has been no change in its time stamp for a time period exceeding the inactivity period set for that field.

  • Value and Quality - A field is inactive when there has been no change in its value AND no changes to its quality has been observed for a time period exceeding the inactivity period set for the field.

  • Note : If the timestamp of the field used to monitor to determine whether the field is inactive , the value of the field is NOT evaluated.

Inactivity Detector

Block Type

Data quality block

Return to top

Input/Output ports

The input port may contain any number of fields of any type.

There are 2 output ports:

  • Output - Has copies of all the input fields.

  • Indicators - Has an indicator field that indicates activity of the inputs.

Functions performed on tags

  • On the values - The input fields are copied to the Output port.  The value of the AllActive field in the Indicators port is 1 when all the fields are active and 0 when one or more of the input fields is inactive.  The number of inactive fields is contained in the InactiveFieldCount field in the Indicators port.  The number of bad quality input fields is contained in the BadQualityFieldCountIn field in the Indicators port. The number of bad quality output fields is contained in the BadQualityFieldCountOut field in the Indicators port.

  • On the timestamp -

    • When a field is active

      • The timestamp of the field on the Output port is set to the timestamp attribute of the corresponding input field.

      • The timestamp of the field on the Indicators port is set to the execution timestamp.

    • Once inactivity is detected for a particular field, the timestamps on the Output port and on the Indicators port, are set to the execution timestamp at the time when the field became inactive for the first time and remain at that timestamp until the input field becomes active again.

  • On the quality -

    • The quality of the input field is copied to the output field when the field is active.  Depending on the configuration on the property page, the quality of an output field can be set to bad or left unchanged when inactivity is detected.  

    • The quality of the fields on the Indicators port is always good.

Return to top

Example

The diagram below shows the input to an Inactivity block that is configured to check for an inactivity period of 60 seconds (note that the values are sampled at 1 minute intervals).  Thus if the timestamp does not change for more than 60 seconds, the field is considered inactive.

The TS postscript indicates a timestamp field.

The Q postscript indicates a quality field.

Return to top

 

The Inactivity block will copy the values of Field_1 and Field_2 to the Output port.

If the timestamp method of Inactivity detection is used, the quality of Field_1 is bad for time stamp 6 and 7, since Field_1 becomes inactive in this interval.  Similarly the quality of Field_2 is bad for time stamp 8, since Field_2 becomes inactive in this interval.  

During the inactive period the inactive field is assigned the master/execution time stamp at the time when the field first became inactive until the field becomes active again.  Thus the time stamp of Field_1 will be set to 6 for execution time stamps 6 and 7 while the time stamp of Field_2 will be set to 8 for execution time stamp 8.    

The output from the Output port of the Inactivity detector block (excluding the last two fields) is shown in the diagram below.

Return to top  

The last two "*_active" fields are fields visible in the Indicators port to indicate whether an input field is active. It can be seen that for Field_1, the bad quality at 6 and 7 is attributed to the field being inactive.

The output from the Indicators port of the Inactivity detector block is shown in the diagram below.  As mentioned earlier, Field_1 is active for all time stamps except 6 and 7 while Field_2 is active for all time stamps except 8. The bad output quality at other time times are attributed to bad input quality.

Thus we expect AllActive to be 1 for all time stamps except 6, 7 and 8.

The block inputs are bad quality for time stamps 2 (Field_2), 9 (Field_1 and Field_2) and 10 (Field_2) thus we expect BadQualityFieldCount to be 0 for all except these time stamps.

We expect InactiveFieldCount to be 0 for all time stamps except 6, 7 and 8.  Since neither of the fields is inactive at the same time, InactiveFieldCount should be 1 at time stamps 6, 7 and 8.

Return to top

 

The BadQualityFieldCountOut will count output fields marked bad due to input quality or inactivity .

If the Value and Quality is monitored to determine inactivity, the output from the Output port of the Inactivity detector block (excluding the last two fields) is shown in the diagram below.

The output quality of Field_1_Q shows that no changes in value and quality were detected at 3,4 and 7 and mark the quality bad. However, although the value of Field_2 unchanged at 3, the input quality did change the field is therefore marked as active. The bad output quality is due to bad input quality and not Inactivity.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025