ThingWorx Azure IoT Hub Connector for Microsoft Azure Industrial IoT (IIoT) for OPC UA
ThingWorx Azure IoT Hub Connector for Microsoft Azure Industrial IoT (IIoT) for OPC UA
The ThingWorx Azure IoT Hub Connector provides seamless integration to ThingWorx through Microsoft Azure Industrial IoT for OPC UA servers, such as ThingWorx Kepware Server (TKS). Starting with the 4.1.0 release, the Connector supports this integration with ThingWorx Platform in both single-server and ThingWorx High Availability (HA) Clustering modes.
The Azure Industrial IoT (IIoT) OPC UA integration enables ThingWorx users to interact with industrial data sources that conform to the Microsoft Open Manufacturing Platform (OMP) format. OMP consists of various standards for enabling interoperability such as OPC UA and JSON and for collecting data from industrial connectivity sources. The data flows through Azure IoT Edge to an Azure IoT Hub and delivers data to applications that run on Azure. This integration leverages Azure IoT Edge modules at the edge with OPC UA Servers such as TKS, and enables OPC UA ingest into ThingWorx.
The Connector can translate OPC UA data into the Thing model in ThingWorx. As users of PTC and Microsoft products in the factory, you can pass data from Kepware OPC UA Servers through Azure IoT and into ThingWorx in a way that enables you to recognize value more rapidly and at a larger scale. ThingWorx provides a user interface to enable you to map the data from the IoT Hub to the Thing Model easily. The IoT Hub provides a secure, federated pipe to the cloud.
The Connector supports getting data from an OPC UA server such as ThingWorx Kepware Server (TKS) to the ThingWorx Platform via the Azure Industrial IoT (IIoT) Microservices. To learn more about the Azure Industrail IoT Microservices please visit the Azure Documentation article,
You have the same browsing experience of Kepware to ThingWorx directly now with Azure IoT Edge and IoT Hub, facilitated by the ThingWorx Azure IoT Hub Connector.
The following sections provide additional details about the integration. Click a section title to display its content. To hide the content, click the title again:
Important Information
PTC Cloud Services supports the deployment and maintenance of the Azure Industrial IoT (IIoT) OPC UA integration with ThingWorx. However, you can also deploy and maintain this integration on your own. For that deployment model, please follow the instructions in this section of the help center. If you are a PTC Cloud Services customer, refer to the topic , Getting Started for Customers of PTC ThingWorx Cloud Services .
Note that this help center assumes that you have expertise in OPC UA, in your Industrial IoT applications, and in Microsoft Azure Industrial IoT. PTC Cloud Services performs all of the work to set up the integration with Azure Industrial IoT for customers. If you are not a PTC Cloud Services customer and will set up the integration for your organization, you should understand the concepts of Azure Industrial IoT architecture, have created Azure resources such as an Azure IoT Hub and Azure Blob Storage, and stood up an Azure Kubernetes Service (AKS) cluster.
If you are looking for Azure documentation links, there are several links throughout this section of the help center, added to provide the most up-to-date, detailed instructions. In addition, you may want to refer to the topic, Microsoft Azure Documentation Links, in this help center.
The following capabilities that are available with the direct Kepware-to-ThingWorx connection are not available through the ThingWorx Azure IIoT OPC UA integration:
Event log upload mechanism.
The ability to upload and download a Kepware project.
Kepware diagnostic properties, which are tags that Kepware uses for diagnostics. Other OPC UA servers may or may not generate tags that enable these diagnostics. There is no data to support whether they will or will not work in this integration.
For all implementations, you the customer own the components that are on premises, which include the Azure IoT Edge Runtime, the devices, the OPC UA Server, the deployment and configuration of that server. In the PTC Cloud, Cloud Services stands up all the resources you need, both ThingWorx and Azure, to integrate your OPC UA nodes with ThingWorx through Azure Industrial IoT Microservices.
Architecture of the ThingWorx Azure Industrial IoT OPC UA Integration
The following diagram illustrates the end-to-end architecture of the ThingWorx Azure Industrial IoT OPC UA integration. The paragraphs that follow the diagram provide details about it.
The OPC UA Server can be any OPC UA Server. The ThingWorx Kepware Server (TKS) is referenced as an example of an OPC UA server in this help center.
End-to-End Architecture of the ThingWorx Azure IIoT OPC UA Integration
The leftmost side of this diagram represents a Factory, where an OPC UA Server is connected to Microsoft Azure Industrial IoT (IIoT) via a gateway device running Azure IoT Edge Runtime. The OPC Server in this diagram could be ThingWorx Kepware Server (TKS) or any other compatible OPC UA Server. The OPC UA component connects to the Microsoft Azure IoT Edge Runtime.
In addition to the standard Microsoftt Azure IoT Edge Runtime modules, the IoT Edge Runtime for this deployment has three modules that manage the communications between the OPC UA Server and Microsoft Azure IoT. Routing is provided among these three modules, which act as OPC UA clients to the OPC UA Server. Here is a brief overview of each module:
The OPC Discovery module provides the ability to discover new industrial devices. More specifically, the Discovery module of the IoT Edge Runtime enables ThingWorx to discover the OPC UA Server and its endpoints.
The OPC Twin module provides registration and remote control of industrial devices. Registration provides endpoint mapping. The remote control feature provides a mechanism for Command and Control messages to be distributed to the OPC UA Server. The Twin stores state information, including metadata, configurations, and conditions. The Azure IoT Hub persists a twin for the Azure IoT Edge Runtime device that is connected to the Azure IoT Hub.
The OPC Publisher module handles data subscriptions and telemetry data, providing the mechansim for telemetry that originates at the OPC UA Server to be published to the Azure IoT Hub. Once it knows which endpoints to connect to, the Publisher module of the IoT Edge Runtime can forward the telemetry from the OPC UA endpoints to the Azure IoT Hub. By default, the Publisher batches the telemetry.
The Microsoft Industrial IoT (IIoT) Microservices handle the Command and Control operations to send the telemetry to the ThingWorx Azure IoT Hub Connector. The Connector translates the OPC UA telemetry into AlwaysOn messages for the ThingWorx Platform to update the Industrial Gateway endpoint Things in ThingWorx. The Connector maintains a cache of the known Industrial Gateway and its endpoints.
Once you add the Azure IIoT infrastructure, which is enclosed in a blue box above, the client still needs to know what endpoint to connect to. ThingWorx surfaces that by mapping an individual Industrial Gateway to an endpoint on the OPC UA client in the Publisher module of the IoT Edge Runtime. The Twin module of the IoT Edge Runtime also needs to know which OPC UA endpoint to connect to an endpoint on the OPC UA server.
Through a connection to an Azure IoT Hub, you can open connections to many applications. Each application endpoint becomes a UA endpoint.
Specific to Azure Industrial IoT, you can have only one Industrial Gateway per OPC UA endpoint. On the other hand, TKS can be configured with multiple UA endpoints.
ThingWorx Azure IoT Hub Connector and the Microsoft OPC UA Stack
Using the ThingWorx Azure IoT Hub Connector, customers can connect an existing or new installation of an OPC UA Server such as TKS or other OPC UA Server to Microsoft's OPC UA stack to achieve a seamless modeling experience in ThingWorx. The Connector interfaces with the Azure Industrial IoT stack in two different ways:
First, it interfaces with the Azure Industrial IoT (IIoT) Microservices that are deployed to an Azure Kubernetes Service (AKS) to perform Command and Control operations. These operations for OPC UA include operations such as browsing the address space of an OPC UA Server, discovering one or more OPC UA Servers, subscribing to telemetry on a discovered OPC UA Server, and performing explicit reads and writes of nodes on that OPC UA Server.
Once the Command and Control signals are sent to the Edge, the Edge is configured to publish telemetry northbound. The telemetry arrives at the Azure IoT Hub, which passes it to the IoT Hub Connector. The Connector consumes the published telemetry and routes it to Things and properties on the ThingWorx Platform.
In addition, this version of the Azure IoT Hub Connector enables these features:
The ability to configure the ThingWorx Azure IoT Hub Connector to discover OPC UA endpoints that are available to its provisioned instance of Azure IoT Hub.
The ability to configure and manage discovered OPC UA endpoints and their data. OPC UA applications and endpoints can be configured in ThingWorx as Industrial Connections. You can also configure one or more Things to represent the tags from an OPC UA endpoint.
Persisted Industrial Connections will remain until deleted by the user, indicating a lack of connectivity as required.
As new UA endpoints attach, they will become available as Industrial Connections.
You can browse persisted Industrial Connections using the Discover page of the Industrial Gateway Thing. Nodes are presented as groups and items per the current user experience in ThingWorx Composer.
You can map browsed items to new or existing Industrial IoT Things. Further you can update and delete property mappings in ThingWorx Composer.
Mapped properties publish at the defined scan rate for the Industrial Gateway Things. The scan rate is a property of the Thing.
The rate of publishing properties to the IoT Hub and ThingWorx is updated if the scan rate is changed.
Items stop publishing to IoT Hub and ThingWorx if the property mapping is deleted.
Push options of properties in ThingWorx are not supported. In addition, the following features of TKS are not supported:
Diagnostics properties.
Upload and download of projects.
Event log upload mechanism.
If you are using an OPC UA server that has similar features, it is not guaranteed that they will work in this integration.
The isReporting property of a Thing indicates whether a Thing is connected to the ThingWorx Platform. The value of this property is determined by a feature referred to as "Thing Presence" in the ThingWorx Platform. The presence of an Industrial Gateway Thing is determined by checking the availability of the associated UA endpoint. If multiple devices are connected to the UA endpoint and the endpoint is disconnected, the presence of the devices associated with it is not reporting. That is, the value of isReporting is false. This behavior is the same as that of Azure IoT Edge devices connecting through the Azure IoT Hub that the Connector is configured to communicate with. If the Hub is disconnected, all of the IoT Edge devices that connect through it are shown as not reporting.
Telemetry Support
The ThingWorx Azure IoT Hub Connector supports data transactions in UA format. It can read and write based on structured (nested) JSON in the IoT Hub. Mapping properties to structured JSON is provided to the Connector based on the bindings created in the Azure UA Browser. The features include:
Azure UA bound properties in ThingWorx update at the defined rate for subscriptions.
Azure UA bound properties support reads and writes. If the data type within the OPC UA server is writable, you set the value of a property in ThingWorx and the value is written back to the OPC UA server.
The Connector supports consuming complex UA structures in a single-transaction manner.
By default telemetry is processed and delivered in batches. For more information about batched telemetry, refer to Batched Telemetry.