Example - Comparing Actual to Target
This Agent has two inputs - the Actual value and the Target value - and uses the differential algorithm to flag if they have drifted apart from one-another.
We want to raise an alert if they differ by more than 1.5 units.
In most cases, you'll want to use a type or property attachment.
Code
{
"name": "Temperature Drift",
"style": "Differential",
"normalise": "*",
"data": {
"min": ">1.5",
"abs": "true"
},
"inputs": [
{ "name": "Target" },
{ "name": "Actual" },
],
"outputs": [ {
"name": "Status",
"style": "boolean",
"threshold": ">0.85"
}
],
"binding": {
"Actual": "{0}.Temperature - Actual"
"Target": "{0}.Temperature - Target"
},
"attachment": [ {
"style": "property",
"properties": ["Temperature - Actual","Temperature - Target"]
}
]
}