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:
| Field | Required | Value Format | Meaning |
|---|---|---|---|
limits |
Yes | JSON Array | Array 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. |
cm |
No | String or integer | Context 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:
| Field | Required | Value Format | Meaning |
|---|---|---|---|
cr |
No | Single number or range syntax | Context 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: 1.5.. Range example: |
ec |
No | Integer | Excursion count. Number of consecutive telemetry values that must exceed a threshold before the limit is triggered. Defaults to 2 if not provided. |
yh |
No | Number | Yellow high threshold. Triggers a yellow high alarm when the telemetry value is greater than or equal to this value for the required excursion count. |
yl |
No | Number | Yellow low threshold. Triggers a yellow low alarm when the telemetry value is less than or equal to this value for the required excursion count. |
rh |
No | Number | Red high threshold. Triggers a red high alarm when the telemetry value is greater than or equal to this value for the required excursion count. |
rl |
No | Number | Red 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:
- Limit definition for a
BOARD_TEMPmnemonic - 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_MONITORmnemonic HasaBOARD_TEMPcontext mnemonicwhichis used to determine which limit should be checked- Defines a "default" limit that is used when none of the context
mnemonicranges are satisfied - Defines a limit
context range using the single value syntax Defineswith alimitcontext range using the rangesyntaxsyntax. If theBOARD_TEMPis [0, 25], then this limit will be used.
{
"cm": "BOARD_TEMP",
"limits": [
{
"rh": 100,
"rl": 0,2.5,
"yh": 90,
"yl": 102.0
},
{
"cr": "1"0..25",
"ec": 10,
"rh": 20,
"rl": -1,
"yh": 1
}
]
}
Example without a context mnemonic:
{
"limits": [
{
"ec": 3,
"rh": 100,
"rl": 0,2.3,
"yh": 90,
"yl": 101.8
}
]
}
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.