Description

The MeterExt extension is used to consolidate the value of a meter.

It covers several cases:

  • the detection of a rollback of the value (normally impossible on a pulse counter except for resetting the value)
  • invalid values (loss of communication, nan or fault for example)
  • excessively large jumps in the value

It also manages the conversion and resetting of the value.


Implementation

The extension can simply be copied / pasted into any numeric point (usually the communication point of a meter). The output Out of this point will be changed automatically by the extension.

Properties

  • Status: The status of the component, will be in fault if there is a rollback, an invalid status or a large jump.
  • FaultCause: This String property indicates whether the counter value is considered invalid. This can happen in 3 cases: if the value of the counter decreases, if the value of the counter is invalid, if the value of the counter increases by too much (by a value higher than MaxUpValue)
  • ReceivedValue: Displays the last value received by the MeterExt
  • Coeff: The pulse weighting used to convert the number of pulses given by the meter to a real value. If the point is already converted, use a coefficient of 1.
  • MaxUpValue: Threshold to define whether the value is varying too rapidly. If the meter on a single occasion increases by more than the value of this parameter (before applying the coeff), the output is set to error. The system will wait for the next value to determine the new counter value. If the value continues to increase, we will consider that the value was good (this can happen with a prolonged stoppage of the station), if we go back to a lower value, it will be evaluated against the last valid value saved.
  • InvalidStatus: Defines invalid states. When an invalid state or a nan (not a number) is detected, the value is ignored.
  • DisableProcess: Disables the process of automatically resetting the value in the event of a rollback.
  • DisableReorder: false by default. Disables the behavior on startup where the extensions moves itself to the top position of its sibling components.

A value is directly ignored in two cases:

  • Its state is invalid (states considered invalid are defined in the invalidStatus property)
  • It is a NaN

Actions

  • SetMeter: allows the value of the meter to be reset to a given value (the system automatically manages the conversion, just enter the actual value found)
  • Reset: Resets the values saved in the extension. The point is then executed.


Examples

Normal case

Case with an invalid statusRollback case #1*Rollback case #2*Case with a value increasing too quickly

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Coeff = 10

MaxUpValue = 10 000

InvalidStatus = disabled, fault, down, stale, null


Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Input valueOutput valueInput valueOutput valueInput valueOutput valueInput valueOutput valueInput valueOutput value
50 {ok}500 {ok}50 {ok}500 {ok}50 {ok}500 {ok}50 {ok}500 {ok}50 {ok}500 {ok}
200 {ok}2 000 {ok}160 {fault, stale}- {fault, null, stale}200 {ok}2 000 {ok}200 {ok}2 000 {ok}200 {ok}2 000 {ok}
370 {ok}3 700 {ok}250 {ok}2 500 {ok}70 {ok}

- {fault, null}

70 {ok}- {fault, null}15 000 {ok}- {fault, null}
500 {ok}5 000 {ok}480 {ok}4 800 {ok}300 {ok}3 000 {ok}120 {ok}2 500 {ok}350 {ok}3 500 {ok}

* Difference between the two rollback cases:

  • In the first case, the last value (300 {ok}) is greater than the last valid value (200 {ok}), so we add the difference between 200 and 300, i.e. 100, multiplied by the coefficient. So we get a final result of 3,000 {ok}.
  • In the second case, the last value (120 {ok}) is lower than the last valid value (200 {ok}) but higher than the last value (70 {ok}), so we add the difference between 70 and 120, i.e. 50, multiplied by 10. So we get 2,500 {ok}.


Notable special cases

Special case n°1 :

Case with a value increasing too quickly followed by a rollback #1

Special case n°1 :

Case with a value increasing too quickly followed by a rollback #2

Special case n°2 :

Rollback with disableProcess to true

Special case n°3 :

SetMeter

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Coeff = 10

MaxUpValue = 10 000

DisableProcess = true

Coeff = 10

MaxUpValue = 10 000

DisableProcess = false

Input valueOutput valueInput valueOutput valueInput valueOutput valueInput valueOutput value
50 {ok}500 {ok} 50 {ok}500 {ok}50 {ok}500 {ok}50 {ok}500 {ok}
15 000 {ok}- {fault, null}15 000 {ok}- {fault, null}200 {ok}2 000 {ok}200 {ok}2 000 {ok}
20 {ok}- {fault, null}20 {ok}

- {fault, null}

70 {ok}

- {fault, null}

Set Meter à 2 1002 100 {ok}
90 {ok}900 {ok}40 {ok}700 {ok}120 {ok}1 200 {ok}300 {ok}3 100 {ok}



 Training

You can follow this e-learning course to practice