Converting Signed Parameters
It is supposed that data received by Wialon in the format of two- and four-byte integer appears to be unsigned. In other words, all the incoming values (both positive and negative) are displayed as unsigned, i. e. positive.
If the equipment used by you sends signed values in any parameter (for example, temperature parameter), it is necessary to create a sensor on the basis of this parameter and adjust a calculation table in a proper way.
Analyzing a parameter
Switch to the Messages tab and request messages for any interval of time. Indicate Show parameters as raw data. In the Parameters column find the parameter you are interested in and analyze its incoming values.
You can see that when the temperature goes down and crosses 0 degrees threshold the necessary negative numbers are constituted with enormously large ones.
Defining the maximum value
Firstly, you should define the maximum threshold for such numbers. In order to do so, take any of the incredibly large digits, which occurs in the values of the parameter, and enter it into a calculator in the decimal mode (Dec.). Afterwards, switch to the hexadecimal displaying (Hex. mode).
Count the register length in the number appeared. Possible values are: 2, 4, 8. If the register length is less, we should round it up (for example, 5 should be rounded up to 8). In our case the register length is 8.
Now letter F should be entered in to the calculator in Hex. mode as many times as the register length appears to be after rounding up. Afterwards, switch to the Dec mode. Appeared result is the maximum possible number. You should write it down or memorize.
Sensor calculation table
Open the unit properties and create a sensor on the basis of this parameter. Now you should create a calculation table for it. Switch to the Calculation table tab of the sensor properties.
We have found out that all the interval of possible values is from 0 to 4294967295. Therefore possible values start from 0 to the half of the maximum number and negative numbers go from the half to the end of the maximum number (where the maximum number is the smallest negative number module). Divide the maximum number by 2, which equals 4294967295 : 2 = 2147483647,5. It means that positive values start from 0 to 2147483647 and negative —from 2147483648 to 4294967295.
In the calculation table X is the raw value sent by the parameter, a is the coefficient, b is the necessary correction. And all these values are needed to get a certain Y which appears to be a real value of temperature.
Whether the coefficient (a) is used for this parameter can be found out in the equipment specification. In our case, the coefficient equals 0.1, therefore if the value of the parameter sent by the equipment equals 6, the real temperature is 0.6 degrees.
For the first segment, correction for b is not needed (i.e., 0) but the second segment needs it because the values go in reverse order (maximum number corresponds to the smallest negative temperature value module). To calculate b shifting, it is necessary to add one (because we already have 0) and multiply by a coefficient. Therefore we have: (4294967295+1)х0.1 = 429496729.6. The received value should be deducted, that is why it should be entered into the calculation table as negative.
Now you can enter both the intervals (for positive and negative numbers) in the calculation table.
The calculation can be also made in the Hex mode. To do this, enter the letter F as many times as the number of digits (in our case 8), and then divide by 2. Then go to the Dec (decimal digits) mode and save or memorize the resulting number. This is the maximum positive value.
Analyzing results
You can analyze the resulting table, switching to the Calculation table tab and clicking Refresh button.
Besides, you can estimate the sensor setting on the Messages tab. Request messages on the unit for the same time interval, and this time select Show parameter as sensor values.