Calculated pens
A calculated pen is computed in the browser from other pens on the chart: on the data on screen, and on the raw data when you export.

Add one
Section titled “Add one”- Click + Calculated pen at the bottom of the Tags tab.
- Pick Input A (and Input B for a sum or difference). Each input shows its whole tag path.
- Pick a calculation: Derivative (per second), Derivative (per hour), Delta, Offset, Scale, Sum or Difference. The editor shows a worked example in your pens' names and unit.
- Check the Name and Unit it suggests, and click Add.
Or write an expression yourself in Expression. How to write an expression lists what it takes.
Expressions
Section titled “Expressions”Pens are referred to in braces, by their id ({p1}, shown in the pen list) or by name
({Line 1 outlet flow}).
| Expression | Result |
|---|---|
derivative({p1}) |
Change per second; derivative({p1}, 3600) per hour |
delta({p1}) |
Change since the previous point |
offset({p1}, -2.5), scale({p1}, 1000) |
Shifted or scaled |
sum({p1}, {p2}), avg(...), min(...), max(...) |
Combined at every timestamp of any input |
({p1} - {p2}) / {p2} * 100 |
Any arithmetic with + - * / ^, abs() |
When the pen is added, names become the ids of the pens they name, so renaming or removing a pen never makes the calculation use another one. A removed input is reported on the pen.
Change one
Section titled “Change one”Open the calculated pen's settings: its expression is under its name ("= Line1/Flow / 60"), and Edit the expression… opens it. Changes to a calculated pen apply with Apply, not as you type, because a half-typed expression is not a pen.
Calculated pens take limits only as typed values. The full rules are in the expressions reference.