Use Expressions to Transform Data at the Edge
Expressions in EasyEdge allow you to apply calculations and logic directly at the edge, ensuring data is delivered in the format your applications need.
You can apply transformations either at the Tag level or at the Data Stream level, depending on your project’s requirements.
When to Use Tag vs Data Stream Transformations
Tag Transformation
Transformation is applied as soon as the data is collected from the field.
Best when you want the transformed value to be available consistently across all uses of the Tag.
Data Stream Transformation
Transformation is applied only when data is sent to a specific application.
Best when you want to keep the raw data at the edge and transform it differently for different applications.
EasyEdge Expression Assistant
To make expression building easier, EasyEdge includes an Expression Assistant that works both on Tags and Data Streams.
As you type, the assistant suggests available functions (such as
abs
,avg
,cos
,sin
, etc.) and helps you quickly insert them into your calculation.Each variable you define is clearly mapped to its corresponding Data Field, making it simple to keep track of inputs.
The syntax is validated in real time, with a notification bar confirming whether the expression is valid before saving.

This ensures that your transformations and calculations are not only easier to build but also tested for correctness before deployment.
Example: Converting W to kW
Imagine you have a power sensor that provides values in watts (W), but your application requires kilowatts (kW).
Tag Transformation
Create an Asset Tag for the Data Field providing W.

In the Asset Tag configuration, add an Expression:

The Tag will always return the value in kW.
Data Stream Transformation
Keep the Asset Tag configured to store raw values in W.
Create a Data Stream to your Application.

In the Data Stream configuration, add an Expression:

Only that Data Stream will provide values in kW, while the edge continues storing and processing W.
Key Considerations
Use Tag transformations for values you always want in the same unit or format.
Use Data Stream transformations for flexibility when different applications need data in different formats.
Expressions can include arithmetic operations, functions, and conditionals, allowing for more advanced transformations beyond unit conversions.
Last updated