IoT & Connectivity Tips | ThingWorx & Kepware PTC
Recently active
Step 4: Write Data to External DatabaseStep 5: Executing Stored Procedures Step 4: Write Data to External Database You’ve connected to the database, you’re able to query the database. Now let’s handle inserting new data into the database. The update statements and data shown below are based on the table scripts provided in the download. Examples of how the ThingWorx entity should look can be seen in the SQLServerDatabaseController and OracleDatabaseController entities that you've downloaded Running an Insert Follow the steps below to set up a helper service to perform queries for the database. While other services might generate the query to be used, this helper service will be your shared execution service.In the DatabaseController entity, go to the Services tab. 2. Create a new service of type SQL (Command) called RunDatabaseCommand.3. Keep the Output as Integer.4. Add the following parameter: NameB
Step 6: Building the Data ModelStep 7: Next Steps Step 6: Building the Data Model You can build your data model using different methods. You can build your data model where the Data Shapes match with your tables, but what you'll realize over time is that you will often need custom Data Shapes. When you query for data, you will often need data from differing tables to be in one result set. Because of this, I suggest against making your data model based on the tables. You can start the basis for your model with the tables in mind, but know that this won't be the basis for long. Create Data Shapes Let's start by setting up two queries and the Data Shapes to match. The first query will be to find the list of classes a student is assigned to and query will be completed here. The second query will be to find all student in an active class and we'll ask you to create it based on how we did the first one. 1. In the ThingWorx Composer, click the + New button i
GUIDE CONCEPTStep 1: InstallationStep 2: Create GatewayStep 3: Create an AppKeyStep 4: Connect to Foundation Connect Devices and Equipment Using Industry-Standard Protocol Drivers in ThingWorx GUIDE CONCEPT This guide has step-by-step instructions for connecting ThingWorx Kepware Server to ThingWorx Foundation. This guide will demonstrate the ease of connecting edge industrial equipment to ThingWorx Foundation without installing any software on production equipment. We will also show how connecting different systems and devices improves operations through the creation of business intelligence. YOU'LL LEARN HOW TO Connect ThingWorx Kepware Server to ThingWorx Foundation Secure the connection with an Application Key Create an IndustrialGateway Thing Map ThingWorx Kepware Server Tags to ThingWorx Foundation Thing Properties Visualize Data from connected digital assets Note: The estimated time to complete th
Step 5: Bind Industrial TagStep 6: Log to Value StreamStep 7: Visualize the DataStep 8: Next Steps Step 5: Bind Industrial Tag Now that you've established a connection, you can use ThingWorx Foundation to inspect all available information on ThingWorx Kepware Server. ThingWorx Kepware Server includes some information by default to assist you with verifying a valid connection with ThingWorx Foundation. Create New Thing In ThingWorx Foundation, click Browse > Modeling > Industrial Connections. Click IndConn_Server.At the top, click Discover.The Discover option is exclusive to Things inheriting the IndustrialGateway Thing Template and displays information coming from ThingWorx Kepware Server. Expand Channel1.Click Device1.On the right, you’ll see Tag1 and Tag2, which are pre-defined Tags to assist with connectivity testing. Click the checkbox next to Tag1.Click Bind to New Entity. In the C
Guide ConceptStep 1: Completed Example FilesStep 2: Create Reusable MashupStep 3: Configure MashupStep 4: Define Entity ParameterStep 5: Use Mashup Template as ComponentStep 6: Next Steps Implement reusable Mashup Templates and Shapes in your IoT application. Guide Concept This guide will introduce you to creating your own advanced responsive ThingWorx user interface templace. You’ll learn some best practices and tips for creating a UI for your IoT application. With Mashup templates, you’re able to quickly and easily build pages that will look alike and have some of the same functionality already programmed. Following the steps in this guide, you will create reusable content and develop scalable user interfaces. We will teach you how to make UI development easier and more efficient for all of your IoT application needs. You'll learn how to Utilize ThingWorx using best practices for UI designCreate Entities to make development faster and sc
Step 1: Example and StrategyStep 2: Utilizing Logging FunctionsStep 3: Logging Complex ObjectsStep 4: Viewing and Filtering LogsStep 5: Next Steps Utilizing the ThingWorx monitoring system Guide Concept Being able to view your logs is an important part of knowing what is happening in your system. You can't keep things secure if you don't know who is doing what. These concepts and provide you with ways to find information about what is going on in your application and system. We will teach you how to access the monitoring panel and help keep your application running the way you need it to. You'll learn how to How to log data and capture useful informationHow to filter and find what you need in the monitoring pages. NOTE: The estimated time to complete this guide is 30 minutes Step 1: Example and Strategy If you’d like to skip ahead, download the completed example of the Aerospace and Defense learning path: Aer
Guide ConceptStep 1: Medical Learning PathStep 2: Import SimulatorsStep 3: Create Data Shape Learn how to store and display medical device data for a Service opportunity. Guide Concept In this guide, you’ll learn how to combine information from multiple Edge devices into a single, logical Thing. You’ll then create a GUI to display this combined information (as well as retrieve new information on demand) to facilitate a “Medical Service Play”. You'll learn how to Create a Data Shape and Info Table Property to store Medical DataCreate a Service to combine data from multiple Edge devices into a single, logical ThingCreate a Mashup to view and retrieve Medical data NOTE: The estimated time to complete ALL parts of this guide is 60 minutes Step 1: Medical Learning Path So far in this Learning Path, you've been able to connect both an embedded controller (simulated by a Raspberry Pi) and a PC to ThingWorx Foundation. This is
Step 4: Create ThingStep 5: Create ServiceStep 6: Create Mashup Step 4: Create Thing Now that we have a Data Shape to format the combination of data coming from the various sub-systems, we can now instantiate a Thing with an Info Table Property to hold all of said data. Click Browse > Modeling > Things. Click + New.In the Name field, type MDSD_Thing.If Project is not already set, search for and select PTCDefaultProject.In the Base Thing Template field, search for and select Generic Thing. At the top, click Save. Add Info Table Property We now have a Thing to aggregate the MRI sub-system information, but we still need a Property to perform the actual storage. We'll use an Info Table Property for this, with the columns of the Info Table formatted by the Data Shape we created in the previous step. At the top, click Properties and Alerts. Click + Add. On the right in the Name field, type MDSD_InfoTable_Proper
Step 7: Access DataStep 8: Test ApplicationStep 9: Next Steps Step 7: Access Data Now that we have a basic display in-place, we need to access the backend data. To do so, we'll make use of built-in Mashup Data Services. At the top-right, ensure that the Data tab is selected. Click the green + button. In the Entities Filter field of the Add Data Pop-up, search for and select MDSD_Thing.In the Services Filter field, type getprop.Click the arrow beside GetProperties.Note that the GetProperties() Service has been added to the right section.Check the Execute on Load checkbox. At the bottom-right of the pop-up, click Done.Note how the GetProperties() Mashup Data Service has been added to the top-right under the Data tab. Bind Info Table Property Now that we have access to the Data Service within the Mashup, we'll use it to pull backend data into the Mashup (specifically, the aggregated Info Table Property), and then bind it to the Grid Widge
Guide ConceptStep 1: ScenarioStep 2: Create Home PageStep 3: Create Subpage OneStep 4: Create Subpage TwoStep 5: Create Menu Utilize the Menu Widget to navigate between multiple Mashups. Guide Concept Frequently, your application needs to display more information than can comfortably fit on a single page, but manually linking to multiple Mashups can be tedious. Instead, you can utilize a Menu Entity, Menu Widget, and a Master Mashup to provide consistent navigation between all the pages of your application. You'll learn how to Create a Mashup to be used as a "Home" pageCreate more Mashups as subpagesCreate a Menu Entity to track MashupsCreate a Master Mashup as a HeaderUtilize a Menu Widget for navigation NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes Step 1: Scenario In this guide, we'll assume a scenario where you're an application designer for LightCo, a comp
Step 6: Create MasterStep 7: Menu NavigationStep 8: Next Steps Step 6: Create Master Now that we have created our Menu Entity, we can create a Master Mashup to hold a Menu Widget. We'll use the Menu Entity to configure the Menu Widget. Navigate to Browse > Visualization > Masters. Click +New. Leave the defaults and click OK. In the Name field, type MNWM_Master.If Project is not already set, search for and select PTCDefaultProject. At the top, click Save. At the top, click Design. Add Header Now that we've created the Master Entity, we need to add space for the Menu Widget. At the top-left, click the Layout tab. Click Add Top. With the new top-section still selected, scroll down in the Layout tab, and select Container Size > Fixed Size.
Step 5: Add DataStep 6: Replace LicenseStep 7: Next Steps Step 5: Add Data Now that our Mashup's Layout and Widgets have been set, we need to bring in backend data and tie it to those Widgets for display. We'll make use of Mashup Data Services for this. The first one we'll add will be UserManagementSubsystem > GetUserCount. Ensure that the Data tab in the top-right is active. Click the + icon. In the Entity field, search for and select UserManagementSubsystem. In the Services field, type GetUserCount. Beside the GetUserCount Service, click the right arrow.Under Selected Services, check the box for Execute on Load. Add LicensingSubsystem > GetCurrentLicenseInfo You're not limited to only pulling information from one Mashup Data Service. We already have User Management's GetUserCount. We'll now also bring in information from the Licensing Sub
Guide ConceptStep 1: IntroductionStep 2: Get User CountStep 3: Get Current License InfoStep 4: Create Dashboard Mashup Use Subsystems to retrieve User/Thing-count and License-expiration information Guide Concept In this guide, you'll learn how a Foundation Administrator can access important license-accounting Subsystems. In particular, we'll look at the User Management and Licensing Subsystems, and how you can use them to ensure that you're not getting close to running out of Users, Things, or your time-to-expiration. We'll also explore how you can import a new license_capability_response.bin file when your original license is running low on time. You'll learn how to Access the Foundation SubsystemsExecute built-in Services to retrieve:User countsThing countsLicense expiration countCreate a "License Dashboard" MashupUpdate to a new License NOTE: The estimated time to complete ALL parts of this guide is 30 minutes &nbs
Guide ConceptStep 1: Overview DiagramStep 2: Configure Azure IoT HubStep 3: Import ExtensionsStep 4: Install Azure ConnectorStep 5: Launch IoT Hub ConnectorStep 6: Import Device from Azure Use the ThingWorx Azure IoT Hub Connector with simulated appliances. Guide Concept This project will introduce how to integrate ThingWorx with Azure IoT Hub. The combination of these two platforms extends the ThingWorx utilities to Azure IoT Hub edge devices and allows integration with Azure Blob Storage accounts. Following the steps in this guide, you will install the ThingWorx Azure IoT Hub Connector and run a simulated Azure device. We will teach you how to build powerful and scalable IoT applications by integrating ThingWorx and Azure IoT Hub. You'll learn how to Install, configure, and run the ThingWorx Azure IoT Hub ConnectorImport devices that exist in Azure into ThingWorxConnect a simulated Azure device to ThingWorx Foundation server NOTE: This guide's
Step 7: Set-up and Run DemoStep 8: Next Steps Step 7: Set-up and Run Demo The ThingWorx Azure IoT Connector download includes a Java application that simulates a device connecting to your Azure IoT Hub. A ThingTemplate is also included and can be imported into ThingWorx. Import Demo Templates In ThingWorx Composer, click Import/Export menu, then click From File and browse to ../demo/edgedevice- demo/platform/entities/CPUDemo_AllEntities.xml Click Import then click Close when the import successful message is displayed.Create a new Thing using the imported template azureDemo1, enter a name for your Thing and click Save.NOTE: You will enter this name in the demo config file in the next step.Configure Demo Application In the ../demo/edge-device-demo/conf subdirectory, open the edge-device.conf file with a text editor.Edit the deviceId to be the name of the Thing you created in step
GUIDE CONCEPTStep 1: Connectivity Method OptionsStep 2: Next Steps Guidelines for selecting the optimal method for connecting to ThingWorx GUIDE CONCEPT In the world of IoT application development, connectivity refers to the infrastructure and protocols which connect devices to the cloud or network. Edge devices handle the interface between the physical world and the cloud. ThingWorx provides you with several different tools for connecting to the Thingworx platform. This guide is designed as an introduction to these tools, and will help you determine which to choose based on your specific requirements. YOU'LL LEARN HOW TO Pros and cons of different connection methods The connection method best suited for some typical applications Where to find detailed information about any connection method NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes Step 1: Connecti
GUIDE CONCEPTStep 1: ScenarioStep 2: Upload Simulated DataStep 3: Simulated Signals and Profiles Generate engine-failure predictions and gain insight into your data with machine learning. GUIDE CONCEPT This guide will upload captured data from an Edge MicroServer (EMS) "Engine Simulator" to ThingWorx Analytics Builder. Following the steps in this guide, you will create an analytical model, and then refine it based on further information from the Analytics platform. We will teach you how to determine whether or not a model is accurate and how you can optimize both your data inputs and the model itself. NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete ALL parts of this guide is 60 minutes YOU'LL LEARN HOW TO Load an IoT datasetGenerate machine learning predictionsEvaluate the analytics output to gain insight Step 1: Scenario In this guide, we’re continuing the same MotorCo scenario, wh
Step 4: Simulated ModelStep 5: Upload Real World DataStep 6: Real World Signals and Profiles Step 4: Simulated Model Models are primarily used by Analytics Manager (which will be discussed in the next guide), but they can still be used to estimate the accuracy of predictions. When Models are calculated, they inherently withhold a certain amount of data (~20%). The prediction model is then run against the withheld data. This provides a form of "accuracy measure". The withheld-data is selected randomly, so you'll actually get a slightly different model and accuracy measure each time that you create a Model versus the same dataset. On the left, click Analytics Builder > Models. Click New…. In the Model Name field, enter simulated_model.In the Dataset field, select simulated_dataset. Click Submit.After ~60 seconds, the Model Status will change to COMPLETED. Selec
Step 7: Real World ModelStep 8: Next Steps Step 7: Real World Model We’ll now rerun model creation with the Real World data. Even though Signals and Profiles are possibly telling us that only Sensor 1 is needed, the first Model you’ll create will contain all the data, while the second Model will exclude Sensor 2.We’ll then compare the Models to see which one is going to work the best for predicting engine failures. On the left, click Analytics Builder > Models.Click New…. In the Model Name field, enter vibration_model.In the Dataset field, select vibration_dataset. Click Submit.After ~60 seconds, the Model Status will change to COMPLETED.Select the model that was created in the previous step, i.e. vibration_model.Click View… to open the Model Information page.Note that your model may differ slightly from the picture below, as the automatically-withheld "test"
Guide ConceptStep 1: ScenarioStep 2: Configure ProviderStep 3: Publish Analysis ModelStep 4: Modify EdgeThingStep 5: Create Event Use Analytics Manager to automatically perform engine analytical calculations. Guide Concept This guide will use ThingWorx Analytics Manager to compare external-data from an Edge MicroServer (EMS) "Engine Simulator" to a previously-built analytical model. Following the steps in this guide, you will learn how to deploy the model which you created in the earlier Builder guide. We will teach you how to utilize this deployed model to investigate whether or not live data indicates a potential engine failure. You'll learn how to Deploy and execute computational modelsDefine and trigger Analysis EventsMap incoming data to the ModelMap analytic outputs to applications NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 60 minutes Step 1: Scenario In thi
Step 6: Map DataStep 7: Check JobsStep 8: Next Steps Step 6: Map Data Now that the event is created, we need to map the Properties of EdgeThing to the fields required to invoke an Analysis Job. We'll start with the Inputs. Select the previously-created Event, and click Map Data.... Click Inputs Mapping. In Source Type, select Thing.In Source, search for and select EdgeThing. On the left, scroll down and select s1_fb1.Note that you do NOT want the s1_fb1 that is part of the InfoTable Property, because the Info Table Property only stores recorded data, not live data.On the right, select _s1_fb1, the first frequency band required for the Model to make a prediction. Click the Map button in the center. Repeat this mapping process for for s1_fb2 through s1_fb5. Map causalTechnique to causalTechnique in the same manner.This is a String Property in EdgeThing with a Default Value of "FULL_RANGE".Map goalField to goalField in the same
GUIDE CONCEPTStep 1: Overview DiagramStep 2: Install ThingWorx Kepware ServerStep 3: Create Industrial GatewayStep 4: Connect Kepware to ThingWorxStep 5: Connect OPC UA Server to Kepware Use ThingWorx Kepware Server as an OPC UA Client GUIDE CONCEPT This guide will explain how ThingWorx Kepware server can function as both an OPC UA Server, and a client to a remote OPC UA Server. Following the steps in this guide, you will create a OPC UA server in Azure, then we will teach you how to use data from the OPC UA server in ThingWorx. YOU'LL LEARN HOW TO Create an OPC UA Server in AzureConfigure Kepware as on OPC UA ClientConnect Kepware to ThingWorx FoundationMonitor OPC UA data in ThingWorx Composer NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 60 minutes Step 1: Overview Diagram In this guide, ThingWorx Kepware Server will serve as both an OPC UA client, and a ThingWor
Step 6: Create OPC UA Tag in ThingWorxStep 7: Next Steps Step 6: Create OPC UA Tag in ThingWorx We will now create a Device in Kepware with a Tag whose value will be shown in ThingWorx. Right-click on Channel1 that was just created, then click Next to accept the default name Device1 Click Next six times to accept the default settings, Then click the Select import items button. Expand the remote OPC UA server URL, then expand OpcPlc and Telemetry. Click SlowUint1 to select it, then click Add items >>.Click OK, Next, Finish.Return to ThingWorx Composer. Under Browse > Modeling > Industrial Connections, open IndConn_Server.Expand Channel1 > Device1 > OpcPlc, then click Telemetry. Click the check-box next to SlowUint1.Click Bind t
GUIDE CONCEPTStep 1: Create an Azure IoT HubStep 2: Create IoT deviceStep 3: Connect to Azure IoT HubStep 4: Next Steps Send data from an MXChip Developer kit to your Azure IoT Hub GUIDE CONCEPT Users of the MXChip IoT DevKit (a.k.a. MXChip), follow these quick steps to send temperature and humidity data from built-in IoT DevKit sensors to the Azure IoT Hub. YOU'LL LEARN HOW TO Connect the IoT DevKit to a wireless access pointCreate an Azure IoT Hub and register a device for the IoT DevKitConnect IoT Devkit to Azure IoT Hub NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 80 minutes Step 1: Create an Azure IoT Hub Choose +Create a resource, then choose Internet of Things.Click Iot Hub from the list on the right. You see the first screen for creating an IoT hub. Fill in the fields. Subscription: Select the subscription to use for your IoT hub. Resource Group: You
Step 5: PropertiesStep 6: Data ShapesStep 7: Events and Services Step 5: Properties In the Delivery Truck application, there are three Delivery Truck Things. Each Thing has a number of Properties based on its location, speed, and its deliveries carried out. In this design, when a delivery is made or the truck is no longer moving, the Property values are updated. The deliveryTruck.c helper C file is based on the DeliveryTruck Entities in the Composer. After calling the construct function, there are a number of steps necessary to get going. For the SimpleThing application, there are a number of methods for creating Properties, Events, Services, and Data Shapes for ease of use. Properties can be created in the client or just registered and utilized. In the SimpleThingClient application, Properties are created. In the DeliveryTruckClient application, Properties are bound to their ThingWorx Platform counterpart. Two types of structures are used by the C SDK to defi
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.