*Disclaimer: features differ based on Subscription Plan*

The calculation table is very important in sensor configuration (see sensor properties). According to the calculation table adjusted, raw data coming in a parameter is transformed into sensor values, for instance, some abstract 86 is interpreted as 10.5 liters of fuel.

The calculation table is not always necessary. For example, if the sensor is digital and sends only 1 or 0, which correspond to the On/Off states, there is no need in the value calculation table for such a sensor.

Calculation table recalculates data according to to the equation of the straight line Y = a×X + b, where

X is the input value that comes from the device;

Y is the output value that is included in the reports, charts, tooltips, etc.;

a is the coefficient that determines the slope or gradient of the line (tangent of the angle, or relation of the opposite cathetus to the adjoining one);

b is the displacement of a straight line along the Y-axis.

Upon the arrival of the value (i.e. X), it is substituted into the calculation table, a and b are calculated automatically, and the output receives a final value, i.e. Y (it gets into reports, graphs, tooltips, etc.).

Each row of the table operates only within its segment that is to the X value of the next row. That is why X values cannot be repeated.

It is possible to get the tangent of the angle (that is needed to be substituted for the a coefficient) using mathematics. To do it, find on the X and Y axes the segments of values operation (deltas). Then divide the values ∆y/∆x. The result value is the tangent of the angle.

Lower and upper bounds are used to set the limits for input values. Note that the bounds correspond to the half-open interval. In other words, the lower bound is included in the interval of valid values while the upper one is not. In case of receiving values beyond the indicated interval, these values are considered to be invalid. Moreover, depending on the enabling/disabling of the Apply after calculation checkbox, the indicated limits are applied to the raw values X (disabled checkbox), or to the processed values Y (enabled checkbox).

Incorrect pairs of values can be removed with the button. To remove all pairs at once, click on the delete button in the header of the table.

A graphic for the created calculation table can be viewed by clicking the Show chart icon at the top of the table header.

# Methods of filling the table

Fill in all available fields (X, b, and a). Use this method to get the calculation table under your complete control.

Fill in only X and b values, and a set as zero. This method is convenient if you need to convert an analog signal to a digital one.

Fill in only X and a values. In this case, b is calculated automatically. This method is convenient if you need to get a curve knowing the angles, but without recalculating the Y offset.

In some cases, it is possible to adjust the calculation table knowing the X and Y values. In such cases use the calculation table wizard (right part of the dialog box).

# Chart managing

A chart can be managed using the following buttons:

# Example 1: Temperature sensor

As an example, let us create a calculation table for the temperature sensor. Suppose that the data is coming in complement code, i. e. the positive values are from 0 to 127, and negative from 128 (which corresponds to -128 degrees) to 255 (which corresponds to -1 degree).

On the basis of the values indicated in the table, a chart is made. To view the chart, click the Show chart icon.

# Example 2: Engine ignition sensor

It is possible to configure a non-digital ignition sensor based on the parameter sending voltage. For instance, the voltage up to 0.5 V would mean ignition off, and over 0.5 V — ignition on. For such a sensor, we should create a calculation table as shown below:

Move to the Calculation chart and see if the result meets your expectations.

# Calculation table wizard

The Calculation Table Wizard is a tool that simplifies the process of creating a calculation table. It is sufficient to indicate input X values and corresponding output Y values. You can use the calculation table wizard to calibrate a sensor experimentally. For instance, you fill in different volumes of fuel into the tank and each time you take the readings from the sensor. The Calculation Table Wizard is located on the right side of the dialog window. It is disabled by default. To use a wizard, indicate the Generate from XY pairs flag.

Enter the pairs and click Generate in order for them to be processed by the system. On the basis of values indicated in the wizard, a calculation table will be created.

The program calculates a and b using the following algorithm:

a is calculated by the formula ∆Y/∆X. X- and Y-axial displacement is calculated separately for each interval, and then Y-axial displacement is divided by X-axial displacement, that is ∆Y/∆X.

b is calculated by the formula b = Y — a × X.

# Example 1: Fuel level sensor

Suppose that 10 liters of fuel was filled and the sensor sent the value 86, then 20 liters were added and the sensor showed 173, and so on. In the end, we can form a table:

Enter these pairs into the wizard and click Generate. Based on the entered values, a calculation table (on the left) is generated.

In order to view a chart, click the Show chart icon.

Now let us see how a and b were calculated. The first interval starts with 0 and lasts until 86. At that, at the last point the output is 10. So, X displacement is ∆Х = 86 — 0 = 86, and Y displacement is ∆Y = 10 — 0 = 10. Now a coefficient can be calculated: a = ∆Y/∆X = 10 / 86 = 0,11627906976744186.

For other intervals, we apply the same calculation scheme (there will be one interval less than there are rows in the Calculation Wizard):

# Example 2: Fuel level sensor

In this example, input X values decline while output Y values grow. Insert the pairs into the Wizard in any order — they will be rearranged automatically.

Initial data:

Enter these pairs into the Wizard, generate the calculation table, and view the calculation chart.

Calculated intervals for this sensor are as follows:

*V 1.0.0*