Instrumentation & Automation
ru
Windows ⁄ Android

# Calculation the device scales

Calculating the device scales from physical values to a unified input or output signal is often a difficult task, especially when it needs to be done fast, and especially when the scale is nonlinear, a quadratic for example. To solve these problems, the unit for calculating the values of the scales, the scale calculator, was included in the Instrumentation & Automation application for Android.

The appearance of the window, a screenshot from the Android smartphone, is shown in the figure below. Windows version looks the same. The application allows to translate a unified signal into physical values and vice versa in two ways:

• From the unified signal into physical quantities
• From the physical values measured by a primary device or a sensor to a unified signal

Physical quantities can be of any type. It depends on the measured parameter and on the limits of its measurement, and are displayed in the program as the beginning and the end of the scale of physical values.

There are no any limits at all, but unified standard signals can often be the following:

• 4 - 20 mA - standard current signal
• 0 - 20 mA - standard current signal
• 0 - 5 mA - standard current signal
• 0 - 1 V - standard input ⁄ output voltage signal
• 0 - 10 V - standard input ⁄ output voltage signal
• 0.2 - 1 kgf / cm² - standard pneumatic input ⁄ output signal

But with all this, the user can also set the desired limits of the input ⁄ output signal at the bottom of the window. In addition to all this, there is a drop-down list of conversion functions at the top of the window:

• Linear scale
• Linear, decreasing scale
• Rootsquaring scale
• Rootsquaring, decreasing scale

## Getting Started

When you first start the program you see that the limits of the physical scale are set to 0-100 (%) - a fairly common scale for devices and sensors. The limits of the unified signal are 4-20 (mA), also the most common unified signal.

If this does not suit you, you can set the limits that you need. When you exit the program, and launch it again, the settings will be loaded again.

When you change the "Physical value" parameter, the "Unified signal" parameter is recalculated, and vice versa.

If you change the limits of the physical scale, as well as the physical value, the value of the unified signal is calculated. If you change the limits of the unified signal, as well as the value of the unified signal, the physical quantity is calculated. If you made a mistake somewhere, an error message appears, and the default parameters are used, which you can adjust later.

## Conversion formulas

• Calculation of the value of the unified signal d, depending on the value of the physical scale scv:
• Linear scale
d = ((scv - scs) / (sce - scs)) * (sge - sgs) + sgs;
• Linear, decreasing scale
d = ((scv - scs) / (sce - scs)) * (sgs - sge) + sge;
d = ((scv - scs) / (sce - scs))2 * (sge - sgs) + sgs;
d = (((scv - scs) / (sce - scs))2 * (sgs - sge) + sge;
• Rootsquaring scale
d = √((scv - scs) / (sce - scs)) * (sge - sgs) + sgs;
• Rootsquaring, decreasing scale
d = √((scv - scs) / (sce - scs)) * (sgs - sge) + sge;
• Calculation of the value of the physical scale d, depending on the value of the unified signal sgv:
• Linear scale
d = ((sgv - sgs) / (sge - sgs)) * (sce - scs) + scs;
• Linear, decreasing scale
d = ((sgv - sge) / (sgs - sge)) * (sce - scs) + scs;
d = √((sgv - sgs) / (sge - sgs)) * (sce - scs) + scs;
d = √((sgv - sge) / (sgs - sge)) * (sce - scs) + scs;
• Rootsquaring scale
d = ((sgv - sgs) / (sge - sgs))2 * (sce - scs) + scs;
• Rootsquaring, decreasing scale
d = ((sgv - sge) / (sgs - sge))2 * (sce - scs) + scs;
• where,
• d - the result
• scv - the value of the physical scale
• sgv - the unified signal value
• scs - the initial value of the physical scale
• sce - the final value of the physical scale
• sgs - the initial value of the unified signal
• sge - the final value of the unified signal