MergenHub Envest
Home/Docs/User Manual (in-app, complete)

Advanced Tags

Derived Tags & Expression Engine

Advanced Tags creates new calculated tags from existing tags (equivalent to Advanced Tags) and publishes them to OPC under _AdvancedTags.

Derived (expression)Math/logic expression: {Tag1}*2 + {Tag2}. Rate/trigger modes.
Average / Max / MinRun-gated aggregation.
Delta Counter (Oracle Cumulative)The difference between two consecutive readings of a cumulative counter (not the accumulated total). The first reading is the raw value; when the counter wraps around, (Maximum − previous) + current. E.g. with Maximum=100, readings 5, 45, 95, 4 → 5, 40, 50, 9. For an accumulated total use Totalizer.
Link (write-back)Writes a tag to another device tag (Input→Output, Dead Value, Trigger/Link Mode/Rate).

Link Mode: "onChange" (write when the source changes), "onTrigger" (write with a trigger tag), "rate" (write periodically — Link Rate). The expression editor offers tag highlighting and multi-tag selection.

Expression Syntax & Examples

In derived tag expressions, tags are referenced with {Channel.Device.Tag}. Supported operators/functions:

Arithmetic+ − * / % and parentheses
Comparison / logic> < >= <= == !=, && || !
Functionsabs, min, max, sqrt, pow, round, floor, ceil etc.
Conditionternary: {a} > 10 ? 1 : 0

Example expressions

// İki debinin toplamı (m³/h)
{Modbus_1.1001.Debi_A} + {Modbus_1.1001.Debi_B}

// Yüzde doluluk
({Depo.1002.Seviye} / 5.0) * 100

// Yüksek-basınç alarm bayrağı (1/0)
{Kuyu.1003.Basinc} > 8 ? 1 : 0
Tip With Link (write-back) you can write a calculation result to another device's setpoint tag: Input = expression/source tag, Output = target device tag, Link Mode = onChange, with Dead Value as the noise threshold.