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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Connect Kepware Server to ThingWorx Foundation Part 2

No ratings

 

 

Step 5: Log to Value Stream

 

Now that you have explored the Properties of IndConn_Tag1, you’ve seen how ThingWorx Kepware Server feeds information to ThingWorx Foundation. To get an even better indication of changes and confirm continued connectivity, we will log the changes to a Value Stream in order to record the values with a TimeStamp.

 

Create Value Stream

 

  1. Return to the ThingWorx Foundation New Composer browser.
  2. Click Browse.
  3. Click Data Storage -> Value Streams.

    Create Value Stream Step 5 Step 3.png

  4. Click + New.

    Create Value Stream Step 5 Step 4.png

  5. In the Choose Template pop-up, select ValueStream.
  6. Click OK.
  7. Type IndConn_ValueStream in the Name field.
  8. If Project is not already set, click the + in the Project text box and select the PTCDefaultProject.
  9. In the Description field, enter an appropriate description, such as Value Stream to record changes from ThingWorx Kepware Server.

    Create Value Stream Step 5 Step 9.png

  10. Click Save.

 

Bind Value Stream

 

  1. Open the IndConn_Tag1 either by clicking on the tab at the top, or by clicking on PTCDefaultProject on the left
  2. At the top, select General Information.
  3. In the Value Stream field, enter indconn.

    Bind Value Stream Step 5 Step 3.png

  4. Select IndConn_ValueStream from the sorted list.
  5. At the top, select Properties and Alerts.

    Bind Value Stream Step 5 Step 5.png

  6. Click Simulation_Examples_Functions_Random3.
    • A new set of options will expand from the right.
  7. Check the box for Persistent.
  8. Check the box for Logged.

    Bind Value Stream Step 5 Step 8.png

  9. Click the Check button to close the expanded options.
  10. Click Save.

All changes to the Random3 Tag, fed from ThingWorx Kepware Server, are now stored and TimeStamped in the Simulation_Examples_Functions_Random3 Property.

 

Step 6: Visualize the Data

 

We'll now create a Mashup to visualize the record of information from ThingWorx Kepware Server.

  1. In ThingWorx Foundation's Browse, click Visualization -> Mashups.
  2. Click +New.

    Visualize the Data Step 6 Step 2.png

  3. In the New Mashup pop-up, leave the default selections.

    Visualize the Data Step 6 Step 3.png

  4. Click OK.
  5. In the Name field, enter IndConn_Mashup.
  6. If Project is not already set, click the + in the Project text box and select the PTCDefaultProject.
  7. At the top, click Save.
  8. At the top, click Design.
  9. In the Filter Widgets field at the top-left, enter chart.
  10. Drag-and-drop a Line Chart onto the central canvas area.

    Visualize the Data Step 6 Step 10.png

Add Data

 

  1. On the right-side of the Mashup Builder, click the Data tab.
  2. Click the + button on the Data tab. 
     Add Data Step 6 Step 2.png

3. In the Add Data pop-up, enter indconn in the Entity field, overwriting Filter.

4. Select IndConn_Tag1 from the sorted list.

5. In the Filter field below Services, enter queryprop.

6. Click the right arrow button beside QueryPropertyHistory. The QueryPropertyHistory Service of the IndConn_Tag1 Thing will appear on the right in the Selected Services field.

7. Check the box under Execute on Load in the Selected Services field.'

Add Data Step 6 Step 7.png

8. Click Done.

Note that the QueryPropertyHistory Service now appears on the right side Data tab.

9. Click the arrow to expand QueryPropertyHistory, then click to expand Returned Data.

10. Drag-and-drop All Data from the QueryPropertyHistory Service from the right onto the Time Series Chart in the center.

Add Data Step 6 Step 10.png

11. In the Select Binding Target pop-up, select Data.

      

Configure Chart Properties

 

  1. In the bottom-left Properties of timeserieschart-1, enter xaxisfield in the Filter Properties field.
  2. Expand the drop-down for XAxisField.

    Configure Chart Properties Step 6 Step 2.png

  3. Select timestamp.
  4. Click Save.
  5. Click View Mashup. (You may have to enable pop-ups to view the mashup.)

    Configure Chart Properties Step 6 Step 5.png

The IndConn_Mashup will show you the recorded history of property changes that came from ThingWorx Kepware Server.

NOTE: If the Mashup visualization is blank, confirm your connection to IndConn. Return to the Test Connection section of the Bind Industrial Tag step.

 

Step 7: Next Steps

 

Congratulations! You've successfully completed the Connect Kepware Server to ThingWorx Foundation guide. You've learned how to:

  • Connect ThingWorx Foundation to ThingWorx Kepware Server
  • Map Tags to Properties

 

 

The next guide in the Connect and Monitor Industrial Plant Equipment learning path is Create Industrial Equipment Model

Version history
Last update:
‎Oct 17, 2022 05:34 PM
Updated by:
Labels (2)
Contributors