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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Build an Equipment Dashboard Guide Part 2

No ratings

Build an Equipment Dashboard Guide Part 2

 

Step 5: Display Data

 

Now that you have configured the visual part of your application, you need to bind the Widgets in your Mashup to a data source.

 

Add Services to Mashup

 

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

    Step 5 Add Services to Mashup Step 1.png

  2. Click the green + symbol.

    Step 5 Add Services to Mashup Step 2.png

  3. In the Entities Filter field, search for and select MyPump.
  4. In the Services Filter field, type GetPropertyValues.
  5. Click the right-arrow beside GetPropertyValues. Note how GetPropertyValues was added to the right-side under Selected Services
  6. Check the checkbox for Execute on Load. This causes the Service to execute when the Mashup starts.
      Step 5 Add Services to Mashup Step 6.png

7. In the Services Filter field, type QueryPropertyHistory.

8. Click the right-arrow beside QueryPropertyHistory.

9. Check the checkbox for Execute on Load.

Step 5 Add Services to Mashup Step 9.png

10. Click Done to close the pop-up. Note how the Services have been added to the Data tab in the top-right.

        Step 5 Add Services to Mashup Step 10.png

11. Click Save.

Now that we have access to the backend data, we want to bind it to our Widgets.

 

Value Display

 

Configure the Value Display to display the SerialNumber of the pump.

  1. Under the Data tab, expand GetPropertyValues > Returned Data > All Data.

    Step 5 Value Display Step 1.png

  2. Drag-and-drop GetPropertyValues > serialNumber onto the Value Display Widget in the top section.

    Step 5 Value Display Step 2.png

  3. On the Select Binding Target popup, select Data.

    Step 5 Add Value Display Step 3.png

Image

 

We want to use an Image Widget to display a thumbnail picture of the pump for easy reference.

To do that, though, you first need to upload an image to Foundation by creating a Media Entity.

  1. Right-click the image below, then click "Save image as..." to download.

    Step 5 Image Step 1.png

  2. Click Browse > Visualization > Media.

    Step 5 Image Step 2.png

  3. Click + New.
  4. In the Name field, type pump-thumbnail.

    Step 5 Image Step 4.png

  5. If Project is not already set, click the + in the Project text box and select the PTCDefaultProject.
  6. Under Image, click Change.
  7. Navigate to and select the pump-image.png file you just downloaded.
  8. On the navigation pop-up, click Open to close the pop-up and confirm the image selection.
  9. At the top of Foundation, click Save.

    Step 5 Image Step 9.png

Change Image to pump

 

We will now update the Image Widget to display the ThingWorx Media Entity we just created.

  1. Return to the pump-dashboard Mashup.
  2. Click the Image Widget to select it, and ensure that the bottom-left Properties tab is active.

    Step 5 Change Image to Pump Step 2.png

  3. In the bottom-left Properties' Filter field, type SourceURL.

    Step 5 Change Image to Pump Step 3.png

  4. For the SourceURL Property, search for and select pump-thumbnail.

    Step 5 Change Image to Pump Step 4.png

  5. Click Save.

 

Line Chart

 

Configure the Line Chart to display Property values changing over time.

  1. In the top-right Data tab, expand QueryPropertyHistory > Returned Data.

    Step 5 Line Chart Step 1.png

  2. Drag and drop QueryPropertyHistory > All Data onto the Line Chart Widget in the bottom-right Canvas section.

    Step 5 Line Chart Step 2.png

  3. On the Select Binding Target pop-up, select Data.

    Step 5 Line Chart Step 3.png

  4. Ensure the Line Chart Widget is selected.
  5. On the Line Chart's Property panel in the bottom-left, in the Filter field, type XAxisField.
  6. For the XAxisField Property, select timestamp.

    Step 5 Line Chart Step 6.png

  7. In the Filter field, type LegendFilter.
  8. Check the checkbox for LegendFilter.

    Step 5 Line Chart Step 8.png

  9. Click Save.

 

Verify Data Bindings

 

You can see the configuration of data sources bound to Widgets in the bottom-center Connections pane.

  1. In the top-right Data tab, click GetPropertyValues.
    • Check the diagram in the bottom-center Connections window to confirm a data source is bound to the Value Display Widget.
      Step 5 Verify Data Step 1.png

2. Also in the top-right Data tab, click QueryPropertyHistory.

    • Confirm that the diagram shows it is bound to the Line Chart.
       Step 5 Verify Data Step 2.png

3. Click Save.

 

 

Step 6: Test Application

 

  1. Browse to your Mashup and click View Mashup to launch the application.
    Step 6 Step 1.png

NOTE: You may need to enable pop-ups in your browser to see the Mashup.

2. Confirm that data is being displayed in each of the sections.
Step 6 Step 2.png

3. Open the MyPump Thing, then click the Properties and Alerts Tab.

4. Click Set Value on the line of the serialNumber Property.

5. Enter a value for the serial number, then click the Check-mark button.

6. Click Refresh to confirm the value is changed.

7. Refresh the browser window showing the dashboard to see the new serial number value.
Step 6 Step 7.png

 

 

Step 7: Next Steps

 

Congratulations! You've successfully completed the Build an Equipment Dashboard guide, and learned how to:

  • Use Composer to create a Thing Shape and a Thing Template
  • Make a Thing using a custom Thing Template
  • Store Property change history in a Value Stream
  • Create an applicaton UI with Mashup Builder
  • Display data from connected devices
  • Test a sample application

 

If you like to return to previous guides in the learning path, select Connect and Monitor Industrial Plant Equipment.  

 

Version history
Last update:
‎Nov 16, 2022 03:32 PM
Updated by:
Labels (2)
Contributors