Any mapping fields can be added to any field in the database. These calculate the content of the original field into a desired target value using various functions. The conversion is performed each time a new measurement value is written to the base field.
Mapping Fields can be used for the most diverse tasks. Some of these are, for example:
- Simple scaling of a measured value using a factor
- Mapping of a value range to the value range of a sensor
- Conversion of numeric value to a string (for status messages based on a number) via Look-Up-Table
Under the following links you will find some best practices and examples for different tasks.
Mapping fields can be created by adding them to a base field. To do this, open the drop-down menu of a field and click on "Add Mapping Field".
After you have clicked the button, the following modal appears:
The modal itself is divided into three different areas:
- Field Configuration (RED)
- Mapping Type (GREEN)
- Mapping Settings (BLUE)
The tab bar (Green) must be used to define the type of conversion. A checkmark behind the active element indicates which type of conversion is active.
The settings for the respective conversions are described in the following sections. They are located in the area (Blue) below the tab bar (Green).
Use this option to convert a value range to a target value range.
In linear scaling, the measured value is converted based on a scale. You must enter two base (Source) and target (Target) values here.
If you activate this option, the value resulting from the conversion remains within the scale (Target).
If the option is deactivated, negative values or values that lie outside the specified scale (Target) can result, but still be scaled based on the entered values (Target).
This is the base-scale with which you specify the value range that is to be scaled to a new value range.
The two input fields below each other can be understood as "From" and "To" and describe the original value range.
This describes the target value range.
Again, both input fields can be understood as "From" and "To". Enter the value range into which the original value range should be converted.
The offset can be used to achieve a static change of +/- the value specified in the text input field. It's added to the resulting value after the conversion has taken place.
To the settings you will find a graph that visually represents the conversion of the value range. Here you can visually check your input again.
The "Factor" option allows you to convert the output value using a factor. The output value is multiplied here by the specified factor.
If this step was successful, the newly created mapping field is displayed as a subordinate field of the original field.