Skip to main content

Mnemonic Limit Definitions

This page defines the format of the limit definitions used by the Data Viewer application.

A Limit Definition is a JSON object that describes limit thresholds for a single mnemonic telemetry value. The operator/user will be notified when a limit is triggered.

The top level object supports the following fields:

FieldRequiredValue FormatMeaning
limitsYesJSON ArrayArray of 1 or more limit objects. Each object defines a set of limit thresholds. If a Limit Definition does not define a context mnemonic, the array should contain a single object.
cmNoString or integerContext Mnemonic. The optional mnemonic that is used to determine if a limit should be checked. Can be provided as the mnemonic name or numeric ID. For example, you may want to only check a current limit when a temperature is between 25 and 30 celsius.

Each limit object supports the following fields:

FieldRequiredValue FormatMeaning
crNoSingle number or range syntaxContext range. Only used if cm is provided at the top level. If the context mnemonic equals this value or falls within this range, the limit will be checked. If cm is provided but cr is not, the limit object will be used as the "default" limit. Single number example: cr = 1.5, the limit object will be checked when the context mnemonic's value equals 1.5.. Range example: cr = 5.2..10.3, the context will be checked when the context mnemonic's value falls between 5.2 and 10.3, inclusive.
ecNoIntegerExcursion count. Number of consecutive telemetry values that must exceed a threshold before the limit is triggered. Defaults to 2 if not provided.
yhNoNumberYellow high threshold. Triggers a yellow high alarm when the telemetry value is greater than or equal to this value for the required excursion count.
ylNoNumberYellow low threshold. Triggers a yellow low alarm when the telemetry value is less than or equal to this value for the required excursion count.
rhNoNumberRed high threshold. Triggers a red high alarm when the telemetry value is greater than or equal to this value for the required excursion count.
rlNoNumberRed low threshold. Triggers a red low alarm when the telemetry value is less than or equal to this value for the required excursion count.

Note: At least 1 of the threshold values must be defined

Example A:

  • Single limit with no context mnemonic
  • Yellow high undefined
  • Excursion count of 5 means the value must exceed the threshold for 5 consecutive values
{
  "limits": [
    {
      "ec": 5,
      "rh": 20,
      "yl": -5,
      "rl": -12
    }
  ]
}

The below visualizes how the limit thresholds are evaluated:

y-axis: Telemetry value
      ^
      |
      |   RED HIGH alarm zone
      |   value >= 20 for 5 consecutive samples
  20  +------------------------------------------------ rh
      |
      |
      | 
      |   Nominal range
      |
      |
      |
  -5  +------------------------------------------------ yl
      |   YELLOW LOW alarm zone
      |   value =< -5 for 5 consecutive samples
      |
 -12  +------------------------------------------------ rl
      |   RED LOW alarm zone
      |   value =< -12 for 5 consecutive samples
      |
      +----------------------------------------------------> x-axis: time / samples
      |

Example B:

  • Limit definition for a CURRENT_MONITOR mnemonic
  • Has a context mnemonic which is used to determine which limit should be checked
  • Defines a "default" limit that is used when none of the context mnemonic ranges are satisfied
  • Defines a limit context range using the single value syntax
  • Defines a limit context range using the range syntax
{
  "cm": "BOARD_TEMP",
  "limits": [
    {
      "rh": 100,
      "rl": 0,
      "yh": 90,
      "yl": 10
    },
    {
      "cr": "1",
      "ec": 10,
      "rh": 20,
      "rl": -1,
      "yh": 1
    }
  ]
}

Example without a context mnemonic:

{
  "limits": [
    {
      "ec": 3,
      "rh": 100,
      "rl": 0,
      "yh": 90,
      "yl": 10
    }
  ]
}

When cm is provided, each limit entry may include cr to define when that entry applies. When cm is omitted, the limit applies without checking a context mnemonic, and cr is not needed.