Mapping Fields
Last updated
Last updated
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 also store their contents in the database.
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)
This area is identical to the field configuration of a basic field. Here you determine name, identifier, type and unit. Read more about this in the previous section.
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).
If you need a simple conversion based on a factor, use the option "Factor".
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 subtract an offset, enter a negative value in the Text Input field.
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.
Even if the choice of type is not limited. The "Linear Scale" option works only with the following types:
Integer
Float
Counter
You can map a field to a Boolean value using a Lookup table. You need to enter the exact value that will be then converted to "True" or "False". The Fallback is the "else", which means it will be the other value(s). The switch ON means "True", the switch OFF means "False".
The "Factor" option allows you to convert the output value using a factor. The output value is multiplied here by the specified factor.
Even if the choice of type is not limited. The "Factor" option only works with the following types:
Integer
Float
Counter
To create the mapping field, confirm your entries with the "Save" button. Only after you do this the field is created.
If this step was successful, the newly created mapping field is displayed as a subordinate field of the original field.