Formula Builder

The Formula Builder allows you to create new Virtual Tags using existing telemetry values, attributes, and constant values. Generated Virtual Tags can be used throughout the platform just like regular telemetry in dashboards, reports, alarm rules, and additional Virtual Tag calculations.

Formula Builder

To create a new Virtual Tag, first select the target device where the calculated value will be stored. Then choose the calculation type, add the required data sources, and save the result using a unique target key.

Formula Builder

Create a New Virtual Tag

The Formula Builder provides a single interface for configuring the target device, calculation type, execution target, and data sources.

1

Target Device

Specifies the device where the calculated value will be stored.

2

Target Key

Defines the unique telemetry key for the generated Virtual Tag.

3

Calculation Type

Choose from addition, subtraction, multiplication, division, average, derivative, or custom expression.

4

Data Sources

Add telemetry values, attributes, or constant values to be used in the calculation.

Formula Components

Each section of the Formula Builder controls a different part of the calculation. A well-structured formula is easier to maintain and reuse across different scenarios.

🖥️

Target Device

Output
Select the device where the calculated value will be stored. The generated Virtual Tag becomes part of the selected device's telemetry.
🏷️

Target Key

Telemetry
Defines the telemetry key used to identify the generated Virtual Tag. Meaningful and consistent naming is recommended.
⚙️

Execution Target

Processing
Calculations can run either on the Solar Tools server or on a selected Gateway. When Gateway is selected, the target Gateway must also be specified.
📊

Data Sources

Input
Formulas can use telemetry, attributes, or constant values. Each source can be assigned a variable such as x, y, or z for use within the calculation.

Calculation Types

The selected calculation type determines how the source values are processed. While most calculations only require source values, some advanced operations provide additional configuration options.

Standard Operations

ADD • SUB • MULT • DIV • AVG
Addition, subtraction, multiplication, division, and average calculations operate directly on the selected data sources without any additional configuration.
🧮

Advanced Operations

DERIV • CUSTOM
The DERIV operation requires a time window, while the CUSTOM operation allows you to define your own mathematical expression. These additional fields appear only when the corresponding calculation type is selected.

Creation Process

Creating a Virtual Tag follows a simple workflow to ensure the calculation is configured correctly and can be reused throughout the platform.

Target Device

Select the device where the calculated value will be stored.

Calculation Type

Choose the calculation method that matches your requirements.

Add Data Sources

Configure telemetry, attributes, or constant values for the calculation.

Save

Complete the configuration and create the Virtual Tag.

Best Practices

Source Configuration

Use meaningful variable names for your data sources. This makes custom expressions easier to read, maintain, and troubleshoot.

Calculation Types

Standard calculations only require source values. The DERIVcalculation displays an additional time window setting, while CUSTOM provides a field for defining a custom mathematical expression.

Gateway Processing

When the execution target is set to Gateway, the calculation runs on the selected Gateway. Ensure that the Gateway is online and has access to the required source data.

Result

After the formula is created, the generated Virtual Tag behaves like any other telemetry value. It can be displayed in dashboards, included in reports, used in alarm rules, or referenced by additional Virtual Tag calculations.

Formula Builder | SolarTools