A DiagnApp is a generic application to monitor ASM diagnostic. It has been implemented in 3 "flavours": HouseKeeper, AdamHouseKeeper and FastDiagnostic.

Flux diagram

Each DiagnApp has a common scheme:

  1. Retrieving "raw" data from the hardware (that can be polling or diagnostic streaming from the BCUs or polling Adam devices)
  2. For each variable in the list of monitored variables:
    1. Convert "raw" data in processed data (e.g. convert ADC reading to voltages, ...)
    2. If the variable is disabled skip the following steps.
    3. Compute a running-mean (a.k.a. Value) of the processed value (on a time-scale specified in the .param file)
    4. Compare Value with thresholds (in increasing order: alarm_min, warning_min, warning_max, alarm_max)
      1. If warning_min < Value < warning_max reset the counter of consecutive-faults and skip the following steps
      2. Increase the counter of consecutive-faults and compare it with CAF (consecutive allowed faults).
      3. If counter of consecutive-faults > CAF:
        1. if Value > alarm_max or Value < alarm_min then execute the alarm procedure
        2. if warning_max < Value < alarm_max or alarm_min < Value < warning_min then execute the warning procedure
  3. Periodically write values in the telemetry file

In parallel to the main loop, each DiagnApp provides an interface to read variables values in real-time (and to modify their properties as well, as CAF, running mean values, enable/disable)

Alarm/Warning handlers

Alarm and warning handlers can be specialized for each family of variables

Typically the "warning" procedure just creates an entry line in the log file of the corresponding DiagnApp

The FunctEmergencyStop does the following:
  • disables the actuator coils (shell RIPs)
  • under certain circumstances the ASM hardware is shut down
  • several entries are created in the log file
  • an alert is notified to the AdsecArb

Parameter files

The configuration of variables to monitor is written in a .param file. An excerpt of FastDiagnostic .param file is below.

########  This is an autogenerated file ############
#  FASTDGN0 09/12/04 16:35:14
# Each entry must be composed of 11 fields:
# Fields 0-2 identify a filter that matches a set of DiagnVars
# Fields 3-10 are used to specify parameters to be set for the DiagnVars matched by the filter.
# Examples of filters:
# Matching all variables:                                   *           All     All
# Matching all ChDistAve vars:                              ChDistAve   All     All
# Matching all variables with index 13:                     *           13      13
# Matching first 100 Modes:                                 Modes       All     99
# Matching all current vars:                                Ch*Curr*    All     All
# [Alarm/Warn][Min/Max] specify alarm and warning ranges. Use SI units.
# RunningMeanLen specify the length in seconds of the running mean buffer over which the average value is computed.
# CAF specify the number of Consecutive Allowed Faults that can be detected before triggering a warning/alarm.
# This can be useful in case of faulty sensors that sometimes output a very wrong value.
# Set Enabled to "disabled" if you don't want to monitor the matched variables.
# Set Slow to "slow" if the matched variables are heavy to be computed. The update of the "slow" variables is done in a
# dedicated thread at a reduced rate with respect to "fast" variables
# Entry will be applied in order, from top to bottom.
# FamilyName            From    To     AlarmMin    WarnMin      WarnMax     AlarmMax   RunningMeanLen  CAF  Enabled Slow
CHCURRAVERAGE             0     671   -0.79       -0.7        0.75        0.79        0       0       ena   fast
CHCURRRMS                 0     671   -2e-14      -2e-14      0.5         0.5         0       0       ena   fast
CHDISTAVERAGE             0     671    2e-05       2e-05       0.000125    0.000135    0       0       ena   fast
CHDISTRMS                 0     671    2e-14      3e-08       1e-06       0       0       ena   fast
CHFFCOMMAND               0     671   -0.69       -0.3        0.3         0.69        0       0       ena   fast
CHFFPURECURRENT           0     671   -inf        -0.6        0.6         inf         0       0       ena   fast
CHINTCONTROLCURRENT       0     671   -0.69       -0.6        0.6         0.69        0       0       ena   fast

Topic revision: r1 - 21 May 2014, LorenzoBusoni
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback