Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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.
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 Path. You 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.
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
Name | Base Type | Persistent? | Logged? |
serialNumber | String | X | |
currentPower | Number | X |
4. Select the appropriate Base Type from the drop-down menu.
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.
9. Click Save.
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.
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.
6. In the Implemented Shapes field, click the + to select the MotorShape Thing Shape.
7. Click Save.
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).
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.
In the next guide of this Learning Path, we will create a single Thing based on this Template to represent a specific Pump.
Congratulations! You've successfully completed the Create Industrial Equipment Model tutorial, and learned how to:
The next guide in the Connect and Monitor Industrial Plant Equipment learning path is Build an Equipment Dashboard.