cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Engine Failure-Prediction GUI

No ratings

 

Create an Engine Failure Prediction GUI to warn about customer issues.

 

GUIDE CONCEPT

 

This guide will use ThingWorx Foundation's Mashup Builder to create a Graphical User Interface (GUI) to display results from Analytics Manager comparisons of your analytical model to real-time data.

 

Following the steps in this guide, you will learn how to utilize Widgets and backend data to quickly visualize customer failure conditions.

 

IoTProductMgmt_0-1667484552014.png

 

YOU'LL LEARN HOW TO

 

  • Create a Mashup
  • Add Widgets to represent different data
  • Bring Backend Data into the Mashup
  • Tie data to Widgets
  • View Analytical Results in a convenient GUI

 

NOTE:  The estimated time to complete all parts of this guide is 30 minutes.

 

 

Step 1: Scenario

 

In this guide, we're finishing up with the MotorCo scenario where an engine can fail catastrophically in a low-grease condition.

 

In previous guides, you've gathered and exported engine vibration-data from an Edge MicroServer (EMS) and used it to build an engine analytics model. You've even put that analytical model into service to give near-immediate results from current engine-vibration readings.

 

The goal of this guide is to create a GUI to visualize those predicted "low grease" conditions to facilitate customer warnings.

 

IoTProductMgmt_0-1666875774349.jpeg

 

GUI-creation to visualize analytical model deployment can be extremely helpful for the automative segment in particular. For instance, each car that comes off the factory line could have an EMS constantly sending data from which an analytical model could automatically detect engine trouble.

 

This could enable your company to offer an engine monitoring subscription service to your customers.

 

This guide will show you how to visualize the results of an engine analytic model for a "smart, connected products" play.

 

 

Step 2: Create Mashup

 

Mashups are ThingWorx Foundation's method of creating Graphical User Interfaces (GUIs).

 

Mashups are created through the Mashup Builder interface.

 

Before you can use this drag-and-drop interface, you must first create a new Mashup.

 

   1. In ThingWorx Foundation Composer, click Browse > Visualization > Mashups.

 

IoTProductMgmt_9-1666876203516.png

 

 2. Click + New.

 

IoTProductMgmt_10-1666876203521.png

 

   3. Leave the defaults and click OK.

 

IoTProductMgmt_11-1666876203523.png

 

   4. In the Name field, type EFPG_Mashup.

 

   5. If Project is not already set, search for and select PTCDefaultProject.

 

IoTProductMgmt_12-1666876203526.png

 

   6. At the top, click Save.

 

IoTProductMgmt_13-1666876203528.png

 

   7. At the top, click Design.

  • You are now in the Mashup Builder interface, where you can drag-and-drop graphical elements (Widgets) to create your GUI.

IoTProductMgmt_14-1666876203531.png

 

   8. At the top-left, click the Layout tab.

 

IoTProductMgmt_15-1666876203533.png

 

   9. Change Positioning to Static.

  • This removes any auto-positioning or dynamic-sizing from our Mashup, so that we can place and size Widgets manually.

IoTProductMgmt_16-1666876203535.png

 

   10. At the top, click Save again.

 

 

 

Step 3: Add Widgets

 

We now want to add several Widgets to our Mashup by dragging-and-dropping them into the central Canvas area.

 

  1. Return to the Widgets tab in the top-left.

      2. In the Filter Widgets field, type label.

 

IoTProductMgmt_0-1666877643656.png

 

   3. Drag-and-drop five (5) Label Widgets onto the central Canvas area.

 

   4. Select the Label Widgets, go to the Properties in the bottom-left, and change the Label's LabelText to s1_fb1 through s1_fb5.

 

IoTProductMgmt_1-1666877643659.png

 

    5. Filter Widgets for text field, and then drag-and-drop five (5) Text Field Widgets onto the central Canvas area.

 

IoTProductMgmt_2-1666877643661.png

 

   6. Drag-and-drop two (2) more Label Widgets onto the central Canvas area.

 

   7. Change their LabelText Properties to Result_low_grease and Result_low_grease_mo.

 

IoTProductMgmt_3-1666877643664.png

 

   8. Drag-and-drop two (2) more Text Field Widgets onto the central Canvas area.

 

IoTProductMgmt_4-1666877643668.png

 

   9. In the top-left Widget's tab, change Category to Legacy.

 

   10. Drag-and-drop an Auto Refresh Widget onto the Canvas.

 

IoTProductMgmt_5-1666877643670.png

 

   11. At the top, click Save.

 IoTProductMgmt_6-1666877643673.png

 

 

 

Step 4: Add Data

 

Now that we have a rough set of Widgets in place to display Data in our Mashup, we need to bring in backend Data from Composer.

 

   1. In the top-right, ensure the Data tab is active.

IoTProductMgmt_4-1666881734743.png

 

   2. Click the green + button.

 

IoTProductMgmt_5-1666881734750.png

 

   3. In the Entity Filter field, search for and select EdgeThing.

 

   4. In the Services Filter field, type getprop.

 

   5. Click the right-arrow beside GetProperties.

 

   6. On the right, check Execute on Load.

 

IoTProductMgmt_6-1666881734752.png

 

   7. In the bottom-right, click Done.

 

   8. On the right, expand GetProperties.

 

IoTProductMgmt_7-1666881734753.png

 

   9. At the top, click Save.

 

 

 

Step 5: Bind Data

 

Now that backend Data is accessible inside Mashup Builder, we need to bind it to the various Widgets.

 

  1. Drag-and-drop Data > Things_EdgeThing > GetProperties > s1_fb1 to the top-left Text Field under the s1_fb1 Label Widget.

IoTProductMgmt_0-1667229055411.png

   

      2. On the Select Binding Target pop-up, click Text.

 

IoTProductMgmt_1-1667229055416.png

 

    3. Repeat for s1_fb2 through s1_fb5 on the 2nd-5th Text Field Widgets.

 

    4. Drag-and-drop Data > Things_EdgeThing > GetProperties > Result_low_grease to the top-right Text Field under the Result_low_grease Label Widget, and select Text on the Binding pop-up.

 

    5. Repeat for Result_low_grease_mo on the Text Field just below.

 

    6. Click the Auto Refresh Widget to select it.

 

    7. In the bottom-left Properties, set RefreshInterval to 1.

 

IoTProductMgmt_2-1667229055419.png

 

    8. With the Auto Refresh Widget still selected, click the top-left corner to reveal a drop-down.IoTProductMgmt_3-1667229055419.png

 

    9. Drag-and-drop the Refresh Event onto Things_EdgeThing > GetProperties.

 

    10. On the right, click the GetProperties Mashup Data Service to reveal all of its interactions in the bottom-center Connections window.

 

IoTProductMgmt_4-1667229055427.png

 

   

     11. At the top, click Save.

 

 

 

Step 6: View Mashup

 

In the last guide, we disabled the Analysis Event after confirming that appropriate analytical jobs were being created and completed whenever new data from our EMS Engine Simulator entered Foundation.

 

We now need to re-enable that Event so that we can see the results in our Mashup.

 

    1. Return to Analytics > Analytics Manager > Analysis Events.


IoTProductMgmt_0-1667239841544.png

 

    2. Select the Event, and click Enable.


IoTProductMgmt_1-1667239841547.png

 

View Analytical Results

 

With the Analysis Event enabled, we can now view our Mashup to watch engine-failure-predictions be displayed in real time.

 

    1. Return to EFPG_Mashup.


IoTProductMgmt_2-1667239841555.png

 

    2. At the top, click View Mashup.
IoTProductMgmt_3-1667239841557.png

 

    3. Wait and notice how the refresh occurs every second, including both true and false analytics results for the "low grease" condition.


IoTProductMgmt_4-1667239841558.png

     4. When you are satisfied that you have observed enough true/false results, return to Analytics > Analytics Manager > Analysis Events and Disable the event.

 

Through this Learning Path, you have done all of the following:

 

  1. Connect a remote device to Foundation using the Edge MicroServer (EMS)
  2. Fed relevant product-data to the Foundation backend
  3. Formatted and exported that data in a manner which Analytics could understand
  4. Imported that data and used it to build an Analytics Model of your remote device
  5. Started feeding real-time remote data into the model to achieve immediate failure-prediction results
  6. Create a GUI to easily visualize those results

 

You now have a completed Minimum Viable Product (MVP) for a Service Play with MotorCo's new engines.

 

These new engines may have a known-failure condition, but (because you've instrumented those engines to provide constant data) you can monitor them and predict failures before they actually happen.

 

This could easily be an up-sell scenario for MotorCo's customers. They could simply purchase the engine. Or they could both purchase the engine and enroll in a service contract where you notified them of impending issues.

 

What was originally a single-point source of income is now ongoing

 

 

 

 Step 7: Next Steps

 

Congratulations. You've completed the Engine Failure-Prediction GUI guide.

In this guide you learned how to:

 

  • Create a Mashup
  • Add Widgets to represent different data
  • Bring Backend Data into the Mashup
  • Tie data to Widgets
  • View Analytical Results in a convenient GUI

 

The next guide in the Vehicle Predictive Pre-Failure Detection with ThingWorx Platform

learning path is Enhanced Engine Failure Visualization.

 

Learn More

 

We recommend the following resources to continue your learning experience:

 

Capability

Guide

BuildImplement Services, Events, and Subscriptions Guide

 

Additional Resources

 

If you have questions, issues, or need additional information, refer to:

 

ResourceLink
CommunityDeveloper Community Forum
SupportAnalytics Manager Help Center
Version history
Last update:
‎Dec 01, 2022 03:23 PM
Updated by:
Labels (2)
Contributors