Tag builder: Formula

The formula functionality allows you to create calculated tags based on tags which are available in the historian. This can be used to define derived quantities, such as differential pressures, temperature deltas, total flows, KPIs, etc.

Formula tags are available to all TrendMiner users.

An example of calculating the derivative of a noisy temperature measurement can be found here.

How to create a new formula tag

Follow the procedure below to create a new tag using the formula tag functionality:

  1. Open the tag builder menu .
  2. Click on the formula submenu .
  3. Enter a formula using variables, brackets, reserved keywords. Any variable used in the 'Formula' field will show in the 'Mapping' section.
  4. Map all variables by choosing a tag in the 'Mapping' section.
  5. Click 'Options' in the 'Mapping' section to define a time shift for each tag in the formula.
  6. Enter a 'Name' and 'Description'.
  7. Click the 'Save' button.

The variables used in the formula can be of any tag type (e.g. historian tag, imported tag, calculated tag) but nesting of calculated tags is restricted to 2 levels, meaning you can create a formula based on a formula or aggregation but only if the used formula tag is not depending on another formula or aggregation.

Help: click the 'i' icon to check available keywords (abs, acos, and, atan, cbrt, ceil, convert, cos, cosh, exp, floor, if, lmtd, ln, log, log10, log2, max, min, PI, R, sin, sinh, sqrt, sum, tan, tanh, IF, AND, OR, NOT) and on how to use them.

The screenshot below shows the formula tag menu. A simple formula is filled in using 'x' and 'y' as variable. These variables also present in the 'Mapping' section and can the be mapped to any tag.

shiftedformula

How to edit a formula tag

  1. Open the tag builder menu.
  2. Click on the 'Saved tags' hyperlink in the formula submenu.
  3. In the work organizer select the formula tag you want to edit.
  4. Click the edit icon  at the top of the menu.
  5. Edit the formula tag.
  6. Click the 'Save' button.

Note: only the creator of the formula tag can edit and delete the tag.

How to visualize a formula tag

Formula tags can be visualized as any other tag using the quick or advanced tag search. Alternatively, the user can:

  1. Open the tag builder menu.
  2. Click on 'Saved tags' hyperlink in the formula submenu.
  3. In the work organizer select the formula tag of interest.
  4. Click the 'Add to view' button.

Note: Formula tags are added automatically to your view after creating them for the first time.

Sharing formula tags

When a formula is created all users can search it via the tag browser and add it to their active tag list. They will be able to use it on the chart and in searches but they will not be able to see the formula definition by default. 

To allow other users to see the formula definition the owner needs to share the formula with them in the work organizer. After it has been shared, other users can see the formula in their 'Shared with me' tab. By clicking it there it will open the formula details panel where they can see the formula definition and add it to their view.

Feature deep dive video

Restrictions

  • Calculations currently convert discrete tags into analog representation (linearly interpolated) to perform the calculation. Digital tags are not yet supported in calculations.
  • Calculations currently support up to 10 variables.
  • Nested calculations can run over a maximum of two levels currently.
  • When calculated tags are deleted, they can not be created with the same name again.

Note: formula tags are not created in the historian, but reside in TrendMiner. Formula tags are currently accessible for all TrendMiner users.

Enjoying TrendMiner? Share your experience to help the community and receive $25.
Rate TrendMiner