Example using Math in KPIs¶
An example to calculate the length of the vector using Math script.
Procedure¶
To calculate length of the vector origin to point, follow these steps:
- Click “Add a KPI”.
- Name: Milling-vector
- Description: Length of Vector
- Calculation cycle: 10 minutes
- Inputs: in1 = T_L_A_Equipping / Machine_KPIs / Quality
- Inputs: in2 = T_L_A_Equipping / Machine_KPIs / Quality
- Outputs: out = T_L_A_Milling_CNC / KPI_Quality / Quality
- Formula:
const X = in1;const Y = in2;out = Math.sqrt(X * X + Y * Y);
- Formula:
- Click Save.
Result¶
The output will be displayed in KPIs page. You can create dashboard to display the KPIs in the dashboard page by using the available widgets. For more information on adding KPIs to the dashboard, see Dashboards Actions.
Any questions left?
Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.
Last update: April 4, 2022