Disclaimer: features differ based on Subscription Plan


The values received from units in the format of two-byte and four-byte integers are considered unsigned, that is, positive. This means that all the values received in this format, including negative ones, are considered as positive.

If the device sends negative values in a certain parameter (for example, in the temperature parameter), they are displayed incorrectly in the system. To convert these values to the valid ones, perform the following actions:

  1. Analyse the parameter.
  2. Determine the maximum value of the parameter.
  3. Create a sensor with this parameter.
  4. Configure the calculation table for the created sensor.
  5. Check the configuration result.

Read more about these actions below.

Analysing the parameter

The parameter analysis allows you to see if the parameter values are displayed incorrectly. If so, large positive values are displayed instead of negative ones.

To analyse a parameter, follow these steps:

  1. Open the Messages tab.
  2. Request data messages. Raw data should be selected in the Parameters field.
  3. In the resulting table, find the required parameter and compare its values.

Let's analyse the param24 temperature parameter in the image below. You can see that when the temperature drops and the threshold of 0 degrees is crossed, incorrect values are displayed.

Determining the maximum value

It is necessary to determine the largest value of the parameter to configure the calculation table at the fourth stage.

To determine the largest value of the parameter, follow the steps below.

  1. Open the calculator and enter any of the invalid values in decimal mode (DEC).

  2. Switch to hexadecimal mode (HEX) and count the number of characters in the resulting value. If the number of characters is not 2, 4, or 8, then round it up (for example, 5 should be rounded up to 8). In the image below, the value consists of 8 characters.

  3. In HEX mode, enter the letter F as many times as there are characters (after rounding up).

  4. Switch to DEC mode. The resulting number is the maximum value. Write it down.

Creating a sensor with the required parameter

In order for the incorrect values to be converted to the real negative ones, you should create a sensor and configure the calculation table for it.

As a sensor parameter, specify the one the values of which you want to convert.

Configuring the calculation table

To configure the calculation table, follow these steps:

  1. Open the Calculation table tab in the sensor properties.
  2. Fill in the first row of the table as follows:

    Column

    Value

    X

    0

    a

    The coefficient specified for the parameter in the hardware specification. In our case, the coefficient 0.1 is used for the parameter param24, that is, if the value 6 is sent in the parameter, the actual temperature is 0.6 degrees.

    If no coefficient is used, enter 1.

    b

    0

  3. Fill in the second row of the table as follows:

    Column

    Value

    X

    To calculate X, divide the maximum value by 2 and, if the result is an integer, add 1 to it. If it is not an integer, round it up to an integer.

    In the example with param24, 4294967295 : 2 = 2147483647.5

    Therefore, X =2147483648.

    a

    Coefficient (see step 2).

    b

    Correction. To calculate b, add 1 to the maximum value and multiply the result by the coefficient. Enter the resulting value with a minus sign.

    In the example with param24, (4294967295+1)x0.1 = 429496729.6
    Therefore, b = -429496729.6.

  4. Click OK.

Checking the result

There are two ways to check that the calculation table is configured correctly and the parameter conversion is working.

  1. View the chart on the Calculation table tab of the sensor properties.

  2. Request data messages for the same interval as at the first stage. Sensor values should be selected in the Parameters field.