Use Expressions to Calculate Data at the Edge
In EasyEdge, Expressions can be used to calculate new values from existing data. This allows you to derive additional insights directly at the edge, ensuring applications receive meaningful data without requiring external processing.
Just like transformations, calculations can be applied at the Tag level or at the Data Stream level, depending on your project’s needs.
EasyEdge Expression Assistant
When creating calculations, EasyEdge provides an Expression Assistant that works on both Tags and Data Streams.
The assistant suggests available functions (such as
abs
,avg
,cos
,sin
, etc.) as you type, helping you quickly build the calculation.Each input variable (
a
,b
,c
, …) is automatically linked to its corresponding Tag or Data Field, so you always know which value is being used in the expression.The syntax is validated in real time, and a confirmation bar shows when the expression is valid before you save it.

This is especially useful for calculations that involve multiple inputs (e.g., Active Power and Apparent Power for Power Factor). It ensures your expression is clear, valid, and ready to be applied.
Example: Calculating Power Factor
A common example is calculating the Power Factor (PF), which measures how efficiently electrical power is being used.
Power Factor can be calculated in different ways, depending on the inputs available. For this guide, we’ll use the simpler and more common formula:
PowerFactor = ActivePower / ApparentPower
Tag Calculation
Tag-level calculations create new Tags from Expressions. Depending on where the input values come from, you can use:
Asset Tags
Best when all inputs come from the same Asset.
Example: If an Asset provides both Active Power (kW) and Apparent Power (kVA), you can create an Asset Tag:

With the Expression:

The Asset Tag will always return the calculated Power Factor.
Core Tags
Best when inputs come from different Assets.
Example: One Asset provides Active Power (kW) while another provides Apparent Power (kVA).
In Tag Central, create a Core Tag:

With the Expression:

The Core Tag will calculate Power Factor by combining values from both Assets.
Data Stream Calculations
When using Data Streams, you can calculate new values before delivering them to applications.
Example using Active Power (kW) and Apparent Power (kVA).
Create the Data Stream for Power Factor (PF):

With the Expression:

This keeps the raw values available at the edge while delivering only the Power Factor to the target application.
Inputs can come from single or multiple Assets.
Key Considerations
Asset Tags → Use when all inputs belong to a single Asset.
Core Tags → Use when inputs need to be combined from different Assets.
Data Streams → Use when calculations are application-specific, while keeping raw data intact at the edge.
Last updated