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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Create Industrial Equipment Model Guide

No ratings

Create Industrial Equipment Model Guide

 

Overview

 

This project introduces how to model industrial equipment in ThingWorx Foundation. NOTE: This guide’s content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes. 

 

Step 1: Learning Path Overview

 

This guide explains the steps to get started modeling industrial equipment in ThingWorx Foundation and is part of the Connect and Monitor Industrial Plant Equipment Learning PathYou can use this guide independent from the full Learning Path. Other guides are available for more complete Data Model Introduction. When using this guide as part of the Industrial Plant Learning Path, you should already have ThingWorx Kepware Server installed and sending data to ThingWorx Foundation. In the next guide in the Learning Path, we'll use Foundation's Mashup Builder to construct a GUI that displays information and from ThingWorx Kepware Server.

We hope you enjoy this Learning Path.

 

Step 2: Create Thing Shape

 

Thing Shapes are components that contain Properties and Services. In Java programming terms, they are similar to an interface.

In this section, you will build Thing Shapes for an electric motor.

Motor

  1. Start on the Browse folder icon tab of ThingWorx Composer.
  2. Under the Modeling section of the left-hand navigation panel, hover over Thing Shapes, then click the + button.

    Step 2 Motor Step 2.png

  3. Type MotorShape in the Name field.

    Step 2 Motor Step 3.png

  4. If Project is not already set, click the + in the Project text box and select the PTCDefaultProject.
  5. Click Save.

 

Add Properties

 

  1. Click the Properties and Alerts tab at the top of your Thing Shape.IoTProductMgmt_2-1658974388990.png

     

  2. Click + Add.
  3. Enter the Property name from the first row of the table below into the Name field of the Thing Shape.

Name

Base Type

Persistent?

Logged?

serialNumber

String

X

 

currentPower

Number

 

X

4. Select the appropriate Base Type from the drop-down menu.IoTProductMgmt_3-1658974388991.png

5. Check Persistent and/or Logged according to the table.

NOTE: When Persistent is selected, the Property value will be retained when a Thing is saved. Properties that are not persisted will be reset to the default after every Save of the parent Thing. When Logged is selected, every Property value change will be automatically logged to a specified Value Stream.

6. Click + button.

TIP: When adding multiple Properties at once, click Done and Add after each, once you've entered a Name, selected a Base Type and any other criteria. If adding a single Property, click Done.

7. Repeat steps 2 through 5 for the other Properties in the the table.

8. Click the done  Button. You'll see that these Properties have been created for the Motor Thing Shape.

Step 2 Add Properties Step 8.png

9. Click Save.

 

Step 3: Create Thing Template

 

You can create reusable building blocks called Thing Templates in ThingWorx to maintain scalability and flexibility of your application development. With Thing Templates, you define a set of similar objects by specifying the Properties (characteristics) and Services (behaviors) that are common for all the objects. In Java programming terms, a Thing Template is like an abstract class and can be created by extending other Thing Templates. Once a Thing Template is defined and saved in ThingWorx Foundation Server, you can replicate multiple Things to model a complete set without duplicating effort. In this step, you will create a Thing Template that defines Properties for a pump. This pump Template could be used to create multiple Things that each represent a specific pump used in an industrial facility.

  1. Start on the Browse folder icon tab on the far left of ThingWorx Composer.

    Step 3 Step 1.png

  2. Under the Modeling section of the left-hand navigation panel, hover over Thing Templates and click the + button.
  3. Type PumpTemplate in the Name field.

NOTE: Thing Template names are case-sensitive.

      4. If Project is not already set, click the + in the Project text box and select the PTCDefaultProject.

      5. In the Base Thing Template box, click + to choose GenericThing as the Template.

      Step 3 Step 5.png

      6. In the Implemented Shapes field, click the + to select the MotorShape Thing Shape.

      Step 3 Step 6.png

      7. Click Save.

 

Add Properties

 

In this step, you will specify the Properties that represent the characteristics of a Pump. Some Properties like the location may never change (static), while other Properties like power and temperature information may change every few seconds (dynamic).

  1. Select the Properties and Alerts tab under Thing Template: PumpTemplate.IoTProductMgmt_8-1658974389000.png

     

  2. Click the Edit button if the Template is not already open for editing, then click + Add next to My Properties.
  3. Enter the Property name in the Name field copied from a row of the table below.

Name

Base Type

Persistent

Logged

PlantID

STRING

x

 

plant_lat_long

LOCATION

x

 

watts

NUMBER

x

x

4. Select the Base Type of the Property from the drop down menu.

5. Check the appropriate Persistent and Logged check box.

NOTE: When Persistent is selected, the Property value will be retained when the parent Thing is saved. Properties that are not persisted will be reset to the default during a system restart and whenever the Thing is saved. When Logged is selected, every Property value change will be automatically logged to a specified Value Stream.

6. Click the + button.

TIP: When adding multiple Properties at once, click Check+ after each, once you've entered a Name, selected a Base Type and any other criteria. If adding a single Property, click Check button.

7. Repeat steps 3 through 6 for each of the Properties in the rows of the table.

8. After entering the final Property, click the  button.

9. Click Save.

You should see the following Properties in your Composer.

IoTProductMgmt_9-1658974389002.png

 

In the next guide of this Learning Path, we will create a single Thing based on this Template to represent a specific Pump.

 

 

Step 4: Next Steps

 

Congratulations! You've successfully completed the Create Industrial Equipment Model tutorial, and learned how to:

  • Use Composer to create Thing Shapes and Thing Templates
  • Create Model Tags to keep entities organized

 

The next guide in the Connect and Monitor Industrial Plant Equipment learning path is Build an Equipment Dashboard.  

 

Version history
Last update:
‎Aug 19, 2022 10:08 AM
Updated by:
Labels (2)
Contributors