Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cms:units:sensors:calc [11/06/2018 07:16]
tagr [Example 2: Fuel Level Sensor]
cms:units:sensors:calc [24/09/2018 12:44] (current)
tagr
Line 12: Line 12:
   * **X** is the input value that comes from the device;   * **X** is the input value that comes from the device;
   * **Y** is the output value that is included in the reports, charts, tooltips, etc.;   * **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 angle, or relation of the opposite cathetus to the adjoining one); +  * **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.+  * **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.). 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 till the //X// value of the next row. That is why //X// values cannot be repeated. ​+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. ​ 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. ​
Line 41: Line 41:
 |  {{:​icons:​area_zoom.png?​nolink}} ​ \\ **Area selection** ​ | When this button is activated, it becomes possible to scale (zoom) any selected area of the chart. To do this, select the appropriate area by holding the left mouse button. The procedure can be repeated any number of times. | |  {{:​icons:​area_zoom.png?​nolink}} ​ \\ **Area selection** ​ | When this button is activated, it becomes possible to scale (zoom) any selected area of the chart. To do this, select the appropriate area by holding the left mouse button. The procedure can be repeated any number of times. |
 |  {{:​icons:​original_scale.png?​nolink}} ​ \\ **Autoscaling** ​ | This button allows to return to the default chart scale. | |  {{:​icons:​original_scale.png?​nolink}} ​ \\ **Autoscaling** ​ | This button allows to return to the default chart scale. |
-|  {{:​icons:​zoomin.png?​nolink}} {{:​icons:​zoomout.png?​nolink}} ​ \\ **Zoom in/zoom out**  | The buttons to scale a chart along the X axis. Click the button in order to make the visible area of the chart twice as wide/narrow in regards to the current position. Yet the center of the chart stays in its place. |+|  {{:​icons:​zoomin.png?​nolink}} {{:​icons:​zoomout.png?​nolink}} ​ \\ **Zoom in/zoom out**  | The buttons to scale a chart along the X-axis. Click the button in order to make the visible area of the chart twice as wide/narrow in regards to the current position. Yet the center of the chart stays in its place. |
 |  {{:​icons:​saver.png?​nolink}} ​ \\ **Save as PNG**  | This button allows to save the visible chart area along with the axis in PNG format. | |  {{:​icons:​saver.png?​nolink}} ​ \\ **Save as PNG**  | This button allows to save the visible chart area along with the axis in PNG format. |
 ===== Example 1: Temperature Sensor ===== ===== 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). ​+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). ​
  
 {{ :​units:​calc1.png?​nolink }} {{ :​units:​calc1.png?​nolink }}
Line 68: Line 68:
 ====== Calculation Table Wizard ====== ====== 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.+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. ​ 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. ​
Line 102: Line 102:
 {{ :​units:​wizard2.png?​nolink }} {{ :​units:​wizard2.png?​nolink }}
  
-:!: //Note//.\\ All the data entered and saved on this tab isavailable ​when you open the dialog. Any changes in the calculation table do not affect the Wizard. In other words, the Wizard only shows the entered valuesbut does not reflect the current situation.+:!: //Note//.\\ All the data entered and saved on this tab is available ​when you open the dialog. Any changes in the calculation table do not affect the Wizard. In other words, the Wizard only shows the entered values but does not reflect the current situation.
  
 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. ​ 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. ​
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2018 Gurtam