logo资料库

PTC的Thingworx平台基础使用教程.docx

第1页 / 共119页
第2页 / 共119页
第3页 / 共119页
第4页 / 共119页
第5页 / 共119页
第6页 / 共119页
第7页 / 共119页
第8页 / 共119页
资料共119页,剩余部分请下载后查看
第一部分:安装ThingWorx
1.Task 1. Install the Java Development Kit.
2.Task 2. Install Apache Tomcat.
3.Task 3. Configure server.xml.
4.Task 4. Configure Tomcat settings.
5.Task 5. Install the ThingWorx Composer Web applica
6.Task 6. Open the ThingWorx Composer.
第二部分:开始使用ThingWorx
2.1、Creating a User Login
Task 1. Create a user login.
2.2、Adding a User to a Group
Task 1. Add the ThingWorxStudent user to the Admin
2.3、Importing Entities, Mashups, and Data
1.Task 1. Import entities.
2.Task 2. Import data.
2.4、Viewing Imported Content
Task 1. View imported content.
2.5、Importing a Widget Extension
1.Task 1. Import a widget extension.
2.Task 2. Verify the widget is viewable in the impor
2.6、Adding a Model Tag Term to an Existing Vocabul
1.Task 1. Create the ThingWorxTraining tag in the Ap
2.Task 2. Tag the ThingWorxStudent user.
2.7、Creating a Model Tag Vocabulary with Terms
1.Task 1. Create the EquipmentTypes vocabulary.
2.Task 2. Add terms to the vocabulary.
3.Task 3. Use the REST API to view the vocabulary.
2.8、Creating a Thing Shape
1.Task 1. Create the VendingMachineShape thing shape
2.Task 2. Add a property for the vending machine hum
3.Task 3. Add a property for the humidity set point.
4.Task 4. Add a property for the current temperature
5.Task 5. Add a property for the temperature set poi
6.Task 6. Add a property for the field service techn
7.Task 7. Add a property for the vending machine loc
8.Task 8. View the thing shape using the REST API.
2.9、Creating a Thing Template
1.Task 1. Create the VendingMachineTemplate thing te
2.Task 2. Explore the properties, services, events,
3.Task 3. View the ThingShape using the REST API.
2.10、Creating a Thing
Task 1. Create a vending machine thing.
2.11、Duplicating a Thing
1.Task 1. Duplicate a Thing.
2.Task 2. Duplicate another Thing.
2.12、REST API Method and Headers
2.13、Creating a Responsive Mashup to View and Edit
1.Task 1. Create a responsive mashup.
2.Task 2. Divide the layout area.
3.Task 3. Add a list of the vending machines to the
4.Task 4. Save and test the mashup.
5.Task 5. Add a temperature gauge for the selected v
6.Task 6. Save and test the mashup.
7.Task 7. Add a panel with an LED display of the cur
8.Task 8. Save and test the mashup.
9.Task 9. Add a panel indicating the location of the
10.Task 10. Save and test the mashup.
11.Task 11. Add components to the mashup that modify
12.Task 12. Save and test the mashup.
2.14、Editing the VendingMachineShape ThingShape
Task 1. Edit the VendingMachineShape ThingShape.
2.15、Implementing the New Properties in the Mashup
1.Task 1. Open the Mashup Builder.
2.Task 2. Use the VMTempMax and VMTempMin properties
3.Task 3. Save and test the mashup.
4.Task 4. Reset the data entry fields after they are
5.Task 5. Save and test the mashup.
6.Task 6. Edit the VMTempMax and VMTempMin propertie
7.Task 7. Test the mashup.
2.16、Creating a Blog
Task 1. Create a blog.
2.17、Creating a Wiki
Task 1. Create a wiki.
2.18、Creating a Mashup with a Blog and a Wiki
1.Task 1. Verify that the blog and wiki exist in the
2.Task 2. Create a mashup.
3.Task 3. Add a blog to the mashup.
4.Task 4. View and test the blog and mashup.
5.Task 5. Add a wiki to the mashup.
6.Task 6. View and test the wiki and mashup.
2.19、Review Exercise: Modeling a Delivery Truck an
1.Task 1. Create a Trucking application tag.
2.Task 2. Create a thing shape.
3.Task 3. Create a truck template.
4.Task 4. Create three trucks.
5.Task 5. Create a mashup.
6.Task 6. Add a grid to the sidebar to display the l
7.Task 7. Add a three row layout to the center colum
8.Task 8. Add a gauge to the top row.
9.Task 9. Add displays for brakesOn and driver to th
10.Task 10. Add a two row layout to the right column.
11.Task 11. Add a Google Map widget.
12.Task 12. Save and test the mashup.
13.Task 13. Add services to set truck properties.
14.Task 14. Add widgets to set the properties.
15.Task 15. Bind the widgets to their services.
16.Task 16. Set the data in the entry widgets (option
17.Task 17. Save and test the mashup.
18.Task 18. Add functionality to select the driver (o
3.1、Creating a Service to Consume an XML Web Page
1.Task 1. Create the GetThingWorxFeed service.
2.Task 2. Write the service code.
3.Task 3. Examine the structure of the XML feed.
4.Task 4. Complete the logger code.
5.Task 5. Test the service code.
3.2、Creating a Data Shape for the ThingWorxFeed
Task 1. Create the ThingWorxFeedData data shape.
3.3、Completing the GetThingWorxFeed
1.Task 1. Configure the GetThingWorxFeed service to
2.Task 2. Edit the service code to output an InfoTab
3.Task 3. Edit the code to ensure only one result is
4.Task 4. Add rows from the XML stream to the InfoTa
3.4、Creating a Mashup to Display the ThingWorxFeed
1.Task 1. Create a responsive mashup.
2.Task 2. Add ThingWorxFeed data to the mashup.
3.Task 3. Load the service data into a Grid widget.
4.Task 4. Save and test the mashup.
3.5、Importing Mail and SQL Extensions
Task 1. Import the Mail Server and SQL Extensions.
3.6、Creating a Database Thing
Task 1. Create an ACMESQLDatabase thing.
3.7、Verifying the Database Connection
1.Task 1. Edit the ACMESQLDatabase thing.
2.Task 2. Test the service.
3.8、Creating SQL Queries
1.Task 1. Use the GetAllRecords service to create a
2.Task 2. Configure the GetAllRecords service to ret
3.Task 3. Test the service.
3.9、Creating a Mashup to View Data from the GetAll
1.Task 1. Create a responsive mashup.
2.Task 2. Add a layout with one row and a header.
3.Task 3. Retrieve data from the GetAllRecords servi
4.Task 4. Load the service data into a Grid widget.
5.Task 5. Rename the grid columns.
6.Task 6. Save and test the mashup.
3.10、Creating SQL Commands
1.Task 1. Edit the ACMESQLDatabase thing.
2.Task 2. Add a service to insert a record into the
3.Task 3. Test the InsertRecord service.
4.Task 4. Add a service to delete a record from the
5.Task 5. Test the DeleteARecord service.
6.Task 6. Add a service to update a record in the da
7.Task 7. Test the UpdateARecord service.
3.11、Adding Commands to the SQL Mashup
1.Task 1. Open the Mashup Builder.
2.Task 2. Add the InsertRecord service.
3.Task 3. Add widgets to enable the user to populate
4.Task 4. Link widgets to parameters.
5.Task 5. Add a button to start the service.
6.Task 6. Save and test the mashup.
7.Task 7. Add the DeleteARecord service.
8.Task 8. Link widgets to parameters.
9.Task 9. Add a button to start the service.
10.Task 10. Save and test the mashup.
11.Task 11. Add the UpdateARecord service.
12.Task 12. Link widgets to parameters.
13.Task 13. Add a button to start the service.
14.Task 14. Save and test the mashup.
3.12、Setting the Remote Vending Machine Simulator
1.Task 1. Copy the vending machine simulator to the
2.Task 2. Configure the TrainingConfig.json file.
3.Task 3. Start the vending machine simulator.
4.Task 4. Verify the WebSocket and communications su
3.13、Setting Up a Modeled Remote Thing
Task 1. Create the RemoteVendingMachines thing.
3.14、Adding Remote Thing Properties
Task 1. Add remote thing properties.
3.15、Creating Local Bindings
1.Task 1. Create local bindings for the VM-TR1 vendi
2.Task 2. Test the bindings for the VM-TR1 vending m
3.Task 3. Create local bindings for the VM-TR2 vendi
4.Task 4. Test the bindings for the VM-TR2 vending m
3.16、Adding Auto Refresh to the Mashup
1.Task 1. Open the Mashup Builder.
2.Task 2. Add an Auto Refresh widget.
3.Task 3. Configure the Auto Refresh widget.
4.Task 4. Test the mashup.
4.1、Creating a Property Alert
Task 1. Create a property alert.
4.2Creating a Notification Thing
1.Task 1. Create an ACMEVendingNotifier thing.
2.Task 2. Test the Notifier thing.
4.3、Creating a Thing Subscription Service
1.Task 1. Create a subscription.
2.Task 2. Write the service code.
3.Task 3. Test the subscription.
4.4、Creating Streams
Task 1. Create the VendingMachineProcessValuesStre
4.5、Creating a Timer Thing
Task 1. Create a Timer Thing.
4.6、Creating Data Tags
1.Task 1. Create the VendingMachineEventTags vocabul
2.Task 2. Add terms to the vocabulary.
3.Task 3. Use the REST API to view the vocabulary.
4.7、Modifying the VendingMachineShape Thing Shape
1.Task 1. Open the VendingMachineShape thing shape.
2.Task 2. Add properties for high and low humidity l
3.Task 3. Add properties for high and low temperatur
4.Task 4. Add boolean properties that are true if th
4.8、Logging Process Data to a Stream
1.Task 1. Open the VendingMachineTemplate template.
2.Task 2. Subscribe to the ACMETimer30S timer event.
3.Task 3. Author the script code.
4.Task 4. Save and test the subscription.
4.9、Modifying the Mashup to View, Query, and Filte
1.Task 1. Open the Mashup Builder.
2.Task 2. Add a layout to the mashup.
3.Task 3. Retrieve the data from the stream and add
4.Task 4. Add a Time Series Chart widget to the mash
5.Task 5. Configure the Time Series Chart.
6.Task 6. Save and test the mashup.
7.Task 7. Edit the query to retrieve only the last f
8.Task 8. Save and test the mashup.
9.Task 9. Use a widget to generate the query.
10.Task 10. Save and test the mashup.
11.Task 11. Rename filter options.
12.Task 12. Save and test the mashup.
13.Task 13. Add a Data Export widget.
14.Task 14. Save and test the mashup.
15.Task 15. Add a Time Selector widget.
16.Task 16. Save and test the mashup.
4.10、Modeling Value Streams
1.Task 1. Create a Value Stream.
2.Task 2. Configure the Vending Machine template to
3.Task 3. Specify which properties are logged to the
4.Task 4. Validate that the vending machine simulato
5.Task 5. View the stream values.
4.11、Modifying the Mashup to View Value Streams
1.Task 1. Open the Mashup Builder.
2.Task 2. Add tabs to the mashup.
3.Task 3. Add a layout to the tab.
4.Task 4. Add a time series chart to the layout.
5.Task 5. Bind the value stream data to the time ser
6.Task 6. Save and test the mashup.
7.Task 7. Delete the QueryPropertyHistory service.
8.Task 8. Bind the value stream data to the time ser
9.Task 9. Bind the GetLoggedProperties to a selectab
10.Task 10. Save and test the mashup.
11.Task 11. Bind the QueryNamedPropertyHistory servic
12.Task 12. Save and test the mashup.
4.12、Creating a Data Shape and Table for the Inven
1.Task 1. Create a data table.
2.Task 2. Create a data shape for the data table.
4.13、Creating a Data Table Administration Mashup
1.Task 1. Examine the services available in the Vend
2.Task 2. Create a wrapped service.
3.Task 3. Save and test the service.
4.Task 4. Create a mashup.
5.Task 5. Divide the layout area.
6.Task 6. Add the data table services to the mashup.
7.Task 7. Load the service data into a Grid widget.
8.Task 8. Add widgets to enable the user to populate
9.Task 9. Add a button for the EnterMyInfo service.
10.Task 10. Add a button for the DeleteDataTableEntry
11.Task 11. Save and test the mashup.
4.14、Creating an Additional Thing Shape to Extend
Task 1. Create a thing shape.
4.15、Modifying the Vending Machine Thing Template
Task 1. Modify the VendingMachineTemplate thing te
4.16、Creating the Add Inventory Service
1.Task 1. Modify the VendingMachineInventoryShape.
2.Task 2. Create the AddInventory service.
3.Task 3. Configure the input parameters.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.17、Creating the Delete Inventory Service
1.Task 1. Modify VendingMachineInventoryShape.
2.Task 2. Create the AddInventory service.
3.Task 3. Configure the input parameters.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.18、Creating the Sales Per Product Calculation Se
1.Task 1. Modify the VendingMachineInventoryShape.
2.Task 2. Create the AddInventory service.
3.Task 3. Configure the output parameter.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.19、Creating the Total Sales Calculation Service
1.Task 1. Modify the VendingMachineInventoryShape.
2.Task 2. Create the TotalSales service.
3.Task 3. Configure the output parameter.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.20、Creating the Product Priced Over Service
1.Task 1. Modify the VendingMachineInventoryShape.
2.Task 2. Create the ProductPricedOver service.
3.Task 3. Configure the input and output parameters.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.21、Creating the Update Inventory Service
1.Task 1. Modify the VendingMachineInventoryShape.
2.Task 2. Create the UpdateInventory service.
3.Task 3. Configure the input parameter.
4.Task 4. Author the service code.
5.Task 5. Save and test the service.
4.22、Modifying the Mashup to View and Modify Vendi
1.Task 1. Open the Mashup Builder.
2.Task 2. Add a tab to the mashup.
3.Task 3. Add a layout to the tab.
4.Task 4. Add a grid with current inventory to the l
5.Task 5. Save and test the mashup.
6.Task 6. Add inventory services to the mashup.
7.Task 7. Implement the AddInventory service.
8.Task 8. Save and test the mashup.
9.Task 9. Implement the DeleteInventory service.
10.Task 10. Save and test the mashup.
11.Task 11. Display total sales for the vending machi
12.Task 12. Save and test the mashup.
13.Task 13. Implement the UpdateInventory service.
14.Task 14. Save and test the mashup.
4.23、Creating the VendingMachineIssueStream
Task 1. Create the VendingMachineIssueStream strea
4.24、Creating a Data Shape for a Custom Vending Ma
1.Task 1. Create the TemeratureHumidityHighData data
2.Task 2. Configure the field definitions.
4.25、Configuring a Custom Event and Subscription
1.Task 1. Open the VendingMachineShape thing shape.
2.Task 2. Add an event.
3.Task 3. Add a subscription.
4.26、Configuring a Subscription to Built-In Events
1.Task 1. Open the VendingMachineShape thing shape.
2.Task 2. Add a temperature high subscription.
3.Task 3. Add a humidity high subscription.
4.Task 4. Test the subscriptions and logs.
4.27、Review Exercise: Binding to a Remote Thing an
1.Task 1. Start the truck simulator.
2.Task 2. Create the TruckStreamDS data shape.
3.Task 3. Create the TruckStream stream.
4.Task 4. Create a 60 second timer.
5.Task 5. Create a remote truck thing.
6.Task 6. Manage remote bindings.
7.Task 7. Manage local bindings.
8.Task 8. Subscribe all trucks to the Truck60sTimer.
9.Task 9. Author the script for the subscription.
10.Task 10. Test the stream.
11.Task 11. Add services to the TruckMash mashup.
12.Task 12. Set service bindings.
13.Task 13. Add a label chart to the mashup.
14.Task 14. Add an Auto-Refresh widget (optional).
15.Task 15. Save and test the mashup.
5.1 Editing a Network
1.Task 1. Open the AcmeVending network.
2.Task 2. Add vending machines to the network.
5.2 Viewing the Vending Machines in a Mashup
Task 1. View the VendingMain mashup.
5.3 Creating a File Repository Thing
Task 1. Create a file repository thing.
5.4 Creating a Mashup to Upload and Download File
1.Task 1. Create a responsive mashup.
2.Task 2. Add a layout with one row and a header.
3.Task 3. Add a File Upload widget to the header.
4.Task 4. Save and test the mashup.
5.Task 5. Add a two-column layout to the bottom row.
6.Task 6. Add a tree widget to the left column.
7.Task 7. Add a grid to the right column.
8.Task 8. Add services to retrieve directories and f
9.Task 9. Bind services to widgets.
10.Task 10. Save and test the mashup.
5.5 Creating a Remote Thing with File Transfer
1.Task 1. Create a thing.
2.Task 2. Verify the remote folder.
5.6 Modifying the File Upload Mashup to Enable Fi
1.Task 1. Open the FileUploadMash mashup.
2.Task 2. Add services to browse files and directori
3.Task 3. Duplicate the tree and grid.
4.Task 4. Start the File Transfer Thing Simulator.
5.Task 5. Save and test the mashup.
6.Task 6. Add services to transfer files between the
7.Task 7. Configure the first Copy service.
8.Task 8. Add a button to start the service.
9.Task 9. Save and test the mashup.
10.Task 10. Configure the second Copy service.
11.Task 11. Add a button to start the service.
12.Task 12. Save and test the mashup.
6.1 Creating a Master and Menu
1.Task 1. Create a master.
2.Task 2. Create a media entitiy.
3.Task 3. Add a two-column layout to the master.
4.Task 4. Add an Image widget to the left column.
5.Task 5. Save the master.
6.Task 6. Bind the master to the VendingMachineMash
7.Task 7. Save and test the mashup.
8.Task 8. Create a menu.
9.Task 9. Add the menu to the master.
10.Task 10. Save and test the mashup.
6.2 Creating Style Definitions
1.Task 1. Create a style definition.
2.Task 2. Create the second style.
3.Task 3. Create the third style.
4.Task 4. Use the newly created styles in the Vendin
5.Task 5. Save and test the mashup.
6.3 Creating State Definitions
1.Task 1. Create a state definition.
2.Task 2. Use the state definition in a Gauge widget
3.Task 3. Use the state definition in an LED widget.
4.Task 4. Save and test the mashup.
6.4 Creating a Thing Shape for a Subsystem
1.Task 1. Create the MySessionParameters thing shape
2.Task 2. Add a number property.
3.Task 3. Add a string property.
4.Task 4. Implement the thing shape in the User Mana
6.5 Review Exercise: Creating a Tooltip Mashup
1.Task 1. Create a tooltip mashup.
2.Task 2. Use the tooltip mashup in the TruckMash.
3.Task 3. Test the mashup.
7.1 Adding User Extensions
1.Task 1. Add a property to the UserExtensions thing
2.Task 2. Create two users.
3.Task 3. Use the REST API to view the users and pro
7.2 Creating a Group
1.Task 1. Create a group.
2.Task 2. Add group members.
3.Task 3. Use the REST API to view the users.
7.3 Creating an Organization
1.Task 1. Create an organization.
2.Task 2. Create two sub-organizational units.
3.Task 3. Add organization members.
7.4 Creating a Permission and an Override
1.Task 1. Examine the VendingMachineMash as the Driv
2.Task 2. Create a permission for the ThingWorxTrain
3.Task 3. View the mashup as the Driver user.
4.Task 4. Create permission to view vending machine
5.Task 5. View the mashup as the Driver user.
6.Task 6. Deny the ThingWorxTraining group permissio
7.Task 7. View the mashup as the Driver user.
7.5 Using the System User to Gain Access to a Ser
1.Task 1. Examine the VendingMachineMash as the Driv
2.Task 2. Grant the ThingWorxTraining group permissi
3.Task 3. View the mashup as the Driver user.
4.Task 4. Create permission for the System user to e
5.Task 5. View the mashup as the Driver user.
7.6 Setting Visibility
1.Task 1. Remove all users from the Everyone group.
2.Task 2. Verify that the technician has no visibili
3.Task 3. Create permission for the System user to e
4.Task 4. Verify that the technician has visibility
7.7 Review Exercise: Creating a Master, Menu, and
1.Task 1. Create a media entity.
2.Task 2. Create a master.
3.Task 3. Add a layout.
4.Task 4. Add an image.
5.Task 5. Associate the master to the TruckMash mash
6.Task 6. Save and test the mashup.
7.Task 7. Create a menu.
8.Task 8. Add the menu to the master.
8.1 Creating a Dashboard
1.Task 1. Create a gadget for the vending machine te
2.Task 2. Create a gadget for the vending machine hu
3.Task 3. Create a gadget to view the historical tem
4.Task 4. Create a Gadget Library mashup.
5.Task 5. Create a Dashboard Viewer mashup.
6.Task 6. Create a dashboard using the viewer.
7.Task 7. Set the initial dashboard.
 第一部分:安装 ThingWorx 1. Task 1. Install the Java Development Kit. 1. Double-click jdk-8u40-windows-x64 in Windows Explorer. 2. Click Next >. 3. Click Next >. 4. Click Next >. 5. Click Close. 2. Task 2. Install Apache Tomcat. 1. Double-click apache-tomcat-8.0.20 in Windows Explorer. 2. Click Next >. 3. Click I Agree. 4. Click Next >. 5. Type 80 in the HTTP/1.1 Connector Port field to overwrite the default. 6. Type admin in the User Name field. 7. Type admin in the Password field. 8. Click Next >. 9. Click Next >. 10. Type C:\PTC\Tomcat in the Destination Folder field to overwrite the default contents. 11. Click Install. 12. Clear the Run Apache Tomcat check box. 13. Clear the Show Readme check box. 14. Click the Finish button. 3. Task 3. Configure server.xml. 1. Navigate to C:\ptc\Tomcat\conf in Windows Explorer. 2. Right-click the server.xml file. 3. Select Send to. 4. Select NoteTab Light. 5. Select Search from the NoteTab Light menu. 6. Select Replace. 7. Type protocol="HTTP/1.1" in the Find what field. 8. Type protocol="org.apache.coyote.http11.Http11NioProtocol" in the Replace with field. 9. Click the Replace All button. 10. Click the OK button. 11. Click the Save Document icon in NoteTab Light. 12. Click the Close icon in NoteTab Light. 4. Task 4. Configure Tomcat settings. 1. Click the Windows Start icon on the Windows taskbar. 2. Select All Programs.
3. Select Apache Tomcat 8.0 Tomcat8. 4. Select Configure Tomcat. 5. Click the Startup type drop-down list to expand it. 6. Select Automatic. 7. Select the Java tab. 8. Copy the following four lines to the end of the Java Options section to append the current contents:-XX:+UseNUMA-XX:+UseConcMarkSweepGC-XX:PermSize=128m-XX:MaxPermSize=1024m  Depending on your system and data needs for the ThingWorx Composer, you may want to set the MaxPermSize larger than 1024 MB. 9. Clear all of the content in the Initial memory pool field. 10. Clear all of the content in the Maximum memory pool field. 11. Click the Apply button. 12. Select the General tab. 13. Click the Start button to start Tomcat. 5. Task 5. Install the ThingWorx Composer Web application. 1. Select New Tab - Google Chrome on the Windows taskbar. 2. Type http://localhost in the address bar and press ENTER. 3. Click the Manager App button. 4. Type admin in the User Name field. 5. Type admin in the Password field and press ENTER. 6. Click the Choose File button in the WAR file to deploy section of the user interface. 7. Double-click D:\Student\ThingWorx\LabFiles\Thingworx.war. 8. Click the Deploy button and wait for the browser page to refresh. 6. Task 6. Open the ThingWorx Composer. 1. Click /Thingworx in the Applications section of the Tomcat Web Application Manger.  If you want to complete the MySQL database integration exercises in this course, you must either use a PTC University cloud-based virtual machine or install MySQL and the sample data. MySQL, along with installation instructions, is available as part of the lab files package. However, we are using a PTC University cloud-based virtual machine, so MySQL is preinstalled. 2. Type Administrator in the User Name field. 3. Type admin in the Password field and press ENTER. 4. Click the I accept button.  第二部分:开始使用 ThingWorx 2.1、Creating a User Login Task 1. Create a user login. to expand Security in the Explorer. 1. Click Expand 2. Select Users. 3. Click in the spotlight search field to select it.
4. Type + to list objects you can create in ThingWorx. 5. Type U to list objects you can create in ThingWorx that start with the letter U. 6. Select +User. 7. Type ThingWorxStudent in the Name field. 8. Type Student User in the Description field. 9. Click the Change Password button. 10. Type ptc in the Enter New Password field. 11. Type ptc in the Retype Password field. 12. Click the Change Password button. 13. Click the User Extensions link in the ENTITY INFORMATION section of the Explorer. 14. Type the e-mail address that corresponds to your SMS text messaging number in the smsAddress field. o In a future exercise, a text message will be sent to this user. For the upcoming exercise to work, the valid e-mail address that corresponds to your SMS text messaging number must be set. For more information on how to determine the correct e-mail address to use for this purpose, visit http://sms411.net/how-to-send-email-to-a-phone/. 15. Type a valid e-mail address in the emailAddress field. 16. Click the Save button. 2.2、Adding a User to a Group Task 1. Add the ThingWorxStudent user to the Administrators group. 1. Type Ad in the spotlight search field to locate all objects with names that begin with Ad. 2. Select the Administrators group. 3. Click the Cancel Edit (View) button. 4. Click the Edit Members button. 5. Select ThingWorxStudent in the left panel. 6. Drag ThingWorxStudent into the right panel. 7. Click the Save button. 8. Select Members in the Explorer. 2.3、Importing Entities, Mashups, and Data 1. Task 1. Import entities. 1. Click Import/Export in the ThingWorx header to expand a drop-down list. 2. Select From File. 3. Verify that the Entities radio button and the Single File tab are selected. Then, select the Use Default Persistence Provider check box. 4. Click the Choose File button. 5. Select D:\Student\ThingWorx\LabFiles\ThingWorxFundamentalsPreloadEntities.xml. 6. Click the Open button. 7. Click the Import button. 2. Task 2. Import data. 1. Wait for the Import Successful message and then select the Data radio button.
2. Click the Choose File button. 3. Select D:\Student\ThingWorx\LabFiles\ThingWorxFundamentalsPreloadData.json. 4. Click the Open button. 5. Click the Import button. 2.4、 Viewing Imported Content Task 1. View imported content. 1. Click Mashups in the ThingWorx Explorer. 2. Click under the scroll bar to scroll down to VendingMain. 3. Click the VendingMain link. 4. Click the Info button. 5. Click the View Mashup button. 6. Click the Pop-ups were blocked on this page. 7. Select Always allow pop-ups from localhost. 8. Click the Done button. 9. Click the View Mashup button again. icon in the Chrome address bar. 10. Click Close to close the mashup window. 11. Click the Mashup Preview link in the Explorer. 12. Type http://localhost/Thingworx/Mashups in the Chrome address bar. 13. Click under the scroll bar to scroll down to VendingMain. 14. Click the VendingMain link. 2.5、Importing a Widget Extension 1. Task 1. Import a widget extension. 1. Click Import/Export in the ThingWorx header to expand a drop-down list. 2. Select Import under EXTENSIONS. 3. Click the Choose File button. 4. Select D:\Student\ThingWorx\LabFiles\GoogleWidgets_ExtensionPackage.zip. 5. Click the Open button. 6. Click the Import button. 7. Click the Close button. 8. Click the Yes button. 2. Task 2. Verify the widget is viewable in the imported mashup. 1. Type V in the spotlight search field. 2. Select VendingMain. 3. Click the View Mashup button. 2.6、Adding a Model Tag Term to an Existing Vocabulary 1. Task 1. Create the ThingWorxTraining tag in the Applications vocabulary.
1. Click Model Tags in the Modeling section of the ThingWorx Explorer. 2. Click the Applications link. 3. Click the Manage Terms button. 4. Type ThingWorxTraining in the Add Term field. 5. Click the Add Term button. 6. Click the Done button. 2. Task 2. Tag the ThingWorxStudent user. 1. Type ThingWorxSt in the spotlight search field. 2. Select ThingWorxStudent. 3. Type Th in the Tags field. 4. Select ThingWorxTraining. 5. Click the Save button. 2.7、Creating a Model Tag Vocabulary with Terms 1. Task 1. Create the EquipmentTypes vocabulary. 1. Click Model Tags in the Modeling section of the ThingWorx Explorer. 2. Click the New button. 3. Type EquipmentTypes in the Name field. 4. Type Ap in the Tags field. 5. Select Applications: ThingWorxTraining. 6. Click the Save button. 7. Click the Edit button. 2. Task 2. Add terms to the vocabulary. 1. Click the Manage Terms button. 2. Type Vending Machine in the Add Term field. 3. Click Add Term. 4. Type Vending Machine Communication Server in the Add Term field. 5. Click Add Term. 6. Click the Done button. 3. Task 3. Use the REST API to view the vocabulary. 1. Navigate to http://localhost/Thingworx/ModelTags/ in Chrome. 2. Click the EquipmentTypes link. 3. Click the Vocabulary Terms link. 2.8、Creating a Thing Shape 1. Task 1. Create the VendingMachineShape thing shape. 1. Click the Thing Shapes link in the ThingWorx Explorer. 2. Click the New button. 3. Type VendingMachineShape in the Name field. 4. Type Shape for the Vending Machine in the Description field. 5. Type A in the Tags field. 6. Select Applications: ThingWorxTraining.
2. Task 2. Add a property for the vending machine humidity. 1. Click Properties in the ThingWorx Explorer. 2. Click the Add My Property button. 3. Type CurrentHumidity in the Name field. 4. Type Vending Machine Current Humidity in the Description field. 5. Click the Base Type list to expand it. 6. Select NUMBER. 7. Type % in the Units field. 8. Verify that Persistent is not selected and then click Done and Add to add the property to the VendingMachineShape. 3. Task 3. Add a property for the humidity set point. 1. Type VMHumiditySetpoint in the Name field. 2. Type Vending Machine Humidity Setpoint in the Description field. 3. Click the Base Type list to expand it. 4. Select NUMBER. 5. Type % in the Units field. 6. Select the Persistent check box. 7. Click Done and Add to add the property to the VendingMachineShape. 4. Task 4. Add a property for the current temperature. 1. Type CurrentTemperature in the Name field. 2. Type Vending Machine Temperature in the Description field. 3. Click the Base Type list to expand it. 4. Select NUMBER. 5. Type F in the Units field. 6. Verify that the Persistent check box is not selected and then click Done and Add to add the property to the VendingMachineShape. 5. Task 5. Add a property for the temperature set point. 1. Type VMTemperatureSetpoint in the Name field. 2. Type Vending Machine Temperature Setpoint in the Description field. 3. Click the Base Type list to expand it. 4. Select NUMBER. 5. Type F in the Units field. 6. Select the Persistent check box. 7. Click Done and Add to add the property to the VendingMachineShape. 6. Task 6. Add a property for the field service technician. 1. Type FieldServiceTech in the Name field. 2. Type Vending Machine Field Service Technician in the Description field. 3. Click the Base Type list to expand it. 4. Click under the scroll bar to scroll down to USERNAME in the drop-down list. 5. Select USERNAME. 6. Select the Persistent check box. 7. Click Done and Add to add the property to the VendingMachineShape. 7. Task 7. Add a property for the vending machine location. 1. Type Location in the Name field.
2. Type Vending Machine Location in the Description field. 3. Click the Base Type list to expand it. 4. Select LOCATION. 5. Select the Persistent check box. 6. Click Done to add the property to the VendingMachineShape. 7. Click the Save button. 8. Task 8. View the thing shape using the REST API. 1. Navigate to http://localhost/Thingworx/ThingShapes/ in Chrome. 2. Click under the scroll bar to scroll down to VendingMachineShape. 3. Click the VendingMachineShape link. 4. Click the Instance Property Definitions link. 2.9、Creating a Thing Template 1. Task 1. Create the VendingMachineTemplate thing template. 1. Click the Thing Templates link in the ThingWorx Explorer. 2. Click the New button. 3. Type VendingMachineTemplate in the Name field. 4. Type Vending Machine Template in the Description field. 5. Type A in the Tags field. 6. Select Applications: ThingWorxTraining. 7. Type G in the Base Thing Template field. 8. Select GenericThing. 9. Type V in the Implemented Shapes field. 10. Select VendingMachineShape. 11. Type V in the Implemented Shapes field. 12. Select VendingMachineSupportShape. 13. Click the Save button. 2. Task 2. Explore the properties, services, events, and subscriptions. 1. Click Properties in the ThingWorx Explorer. 2. Click under the scroll bar to scroll down and view both properties inherited from the VendingMachineSupportShape and the VendingMachineShape. 3. Click the Services link. 4. Click the Events link. icon to expand Generic Events under the Base ThingTemplate events. 5. Click the Expand 6. Click the Subscriptions link. 3. Task 3. View the ThingShape using the REST API. 1. Navigate to http://localhost/Thingworx/ThingTemplates/ in Chrome. 2. Click the VendingMachineTemplate link. 2.10、Creating a Thing
Task 1. Create a vending machine thing. 1. Type +T in the spotlight search field. 2. Select +Thing. 3. Type VM-TR1 in the Name field. 4. Type VM-TR1 in the Description field. 5. Type A in the Tags field. 6. Select Applications: ThingWorxTraining. 7. Type V in the Tags field. 8. Select EquipmentTypes: Vending Machine. 9. Type V in the Thing Template field. 10. Select VendingMachineTemplate. 11. Verify that the Active check box is selected and click the Save button. 2.11、Duplicating a Thing 1. Task 1. Duplicate a Thing. 1. Click the Things link in the ThingWorx Explorer. 2. Select the check box in the VM-TR1 row of the Things table. 3. Click the Duplicate button. 4. Type VM-TR2 in the Name field. 5. Type VM-TR2 in the Description field, overwriting the current contents. 6. Verify that the Active check box is selected and click the Save button. 2. Task 2. Duplicate another Thing. tab. 1. Select the Explorer 2. Select the check box in the VM-TR1 row of the Things table. 3. Click the Duplicate button. 4. Type VM-TR3 in the Name field. 5. Type VM-TR3 in the Description field, overwriting the current contents. 6. Verify that the Active check box is selected and click the Save button. 2.12、REST API Method and Headers 2.13、Creating a Responsive Mashup to View and Edit Thing Properties 1. Task 1. Create a responsive mashup.
分享到:
收藏