- Installation
For this tutorial two PLCs will be used that each demonstrate one line of a production plant. The TIA project can be found here. Please adjust the IP adresses to your enviroment, download the project to two PLCs and start them up. A simulation of a filling line will be excecuted automatically.
To retrieve relevant data from the PLCs to the Edge Device, several connectors are available. The IIH forms a central integration layer where all connector data can be standardized and mapped onto a data model. For this example, we will use the OPC UA Connector and the SIMATIC S7+ Connector.
The SIMATIC S7+ Connector reads data from the PLC and then the IIH app will collect it. To get the relevant information from the PLC we can export the tags from the TIA Portal project using SIMATIC SCADA Export for TIA Portal.
A file Export.zip is created. This file is available in src directory.
In order to build this infrastructure, we need to have installed the following connectors and apps:
- Common Configurator
- Common Import Converter
- IIH Semantics
- Registry Service
- SIMATIC S7+ Connector
The Common Import Converter converts the exported file (Export.zip) into a SIMATIC S7+ Connector configuration.
This app needs to be installed on the IED. It allows service registration and service discovery for connectors and related components.
In your IED open the Common Configurator.
-
Go to Get Data -> Connector Configuration and click inside the SIMATIC S7+ Connector box.
-
Select the communication protocol and the option Add from file.
-
After importing the file make sure to set the PLC IP address correctly. Then click on Continue to "Select Tags".
-
Per default all tags are selected for import. To import only the needed tags you can select all and press Reset Configuration.
-
Select all the tags needed, choose the Acquisition Cycle, the Access Mode and click Apply and then Import.
-
Monitor the connection status in the Connector Configuration tab.
The OPC UA Connector reads data from the PLCs OPC UA Server and sends data to the Databus where the IIH app will collect it.
In order to build this infrastructure, we need the following connectors and apps:
- Common Configurator
- Common Import Converter
- Databus
- IIH Semantics
- OPC UA Connector
- Registry Service
The Common Import Converter converts the configuration deployed by the OPC UA Connector Configurator into a OPC UA Connector configuration.
This app needs to be installed on the IED. It allows service registration and service discovery for connectors and related components.
-
Go to the IEM and open the Databus Configurator in the Data Connections section.
-
Create a new user and assign the topic
ie/#
with permissionPublish and Subscribe
.
-
Deploy the configuration.
-
In your IEM, go to Data Connections and launch the OPC UA Connector configurator.
-
Go to the settings menu, where you can fill in the Databus user you just created:
-
After adding the PLC, click on the browse symbol and add the following variables to your configuration:
-
Deploy the configuration.
If you don't want to perform all these steps manually, you can import this configuration file.
This apps allows the configuration of the IIH.
-
In your IED open the Common Configurator.
-
Go to the Settings tab and add the Databus credentials for Data Publisher settings and Data Subscriber settings. Make sure that the default Databus Service name (ie-databus:1883) is also entered.
OPC UA protocol allows companies or organizations to standardize their data in an OPC UA information model. Generating standardized interfaces for OPC UA servers enables interoperability at the semantic level.
Companion specifications are so called "Industry Standard Models". There are many organizations or groups which have standardized some OPC UA information models for some industries, but a user can also create their own companion specifications.
In this example, a user-defined companion specification for the filling bottle machine was created and then used as basis for a data model using the Siemens OPC UA modeling Editor (SiOME).
Further information about using SiOME can be found on the SiOME support page.
From SiOME, two nodesets were exported, one for the companion specification and another one for the instance model. The files can be found here:
In your IED open the Common Configurator.
-
Load the TankNodeset.xml and select the namespace
http://opcfoundation.org/UA/machine/
:
The model is an instance of the standardized information that is defined in the companion specification.
-
Load the TankModelNodeset.xml and select the namespace
http://siemens.com/machine/demo
. If you want to use the GraphQL API, please also select the checkbox here.
You have successfully created a data model based on OPC UA. The next step is to map connector variables to it in order to fill the model with data.
To connect the OPC UA model with the actual values open the Common Configurator on your device and follow the steps below.
-
Go to Define Data -> Organize
-
Select OPC UA and the namespace for the model in the respective dropdown menus on the right side of the window.
-
On the left side you should see the Data Sources. Select SIMATIC S7+ Connector from the dropdown menu.
-
Drag and drop tags from the left window into the OPC UA model.
-
Follow the same procedure as for Option 1, while selecting 'opcuac1' from the connector dropdown menu:
-
Deploy the changes.
To make use of the full functionality of the IIH, your OPC UA model has to be mapped to an Asset Model. Together with the App IIH Essentials this is the data model structure which is used by several apps like Perfomance Insight or Energy Manager. Open the Common Configurator on your device.
-
Go to Define Data -> Organize.
-
Select Asset Model in the right editor window and create a new asset.
-
Map the OPC UA model by dragging and dropping the OPC UA hierarchy object to the created asset.
This model will be the central information layer for all your applications. If you have IIH Essentials installed, you are also able to activate the Storage and Cloud Sync feature for the tags in your asset model.