Skip to content

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:

  1. Click “Add a KPI”.
    Add KPI
  2. Name: Milling-vector
  3. Description: Length of Vector
  4. Calculation cycle: 10 minutes
  5. Inputs: in1 = T_L_A_Equipping / Machine_KPIs / Quality
  6. Inputs: in2 = T_L_A_Equipping / Machine_KPIs / Quality
  7. Outputs: out = T_L_A_Milling_CNC / KPI_Quality / Quality
    • Formula: const X = in1;const Y = in2;out = Math.sqrt(X * X + Y * Y);
  8. 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.

Dashboard actions

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.


Last update: April 4, 2022