Skip to content

Latest commit

 

History

History
202 lines (137 loc) · 9.98 KB

Installation.md

File metadata and controls

202 lines (137 loc) · 9.98 KB

Installation

Configure PLCs with TIA Portal

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.

Configure PLC Connections

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.

Option 1: 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.

SimaticScadaExport

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

Common Import Converter

The Common Import Converter converts the exported file (Export.zip) into a SIMATIC S7+ Connector configuration.

Registry Service

This app needs to be installed on the IED. It allows service registration and service discovery for connectors and related components.

Configure Common Configurator

In your IED open the Common Configurator.

  1. Go to Get Data -> Connector Configuration and click inside the SIMATIC S7+ Connector box. S7Conf1

  2. Go to Tags and click on Add data source. S7Conf2

  3. Select the communication protocol and the option Add from file. S7Conf3

  4. After importing the file make sure to set the PLC IP address correctly. Then click on Continue to "Select Tags". S7Conf4

  5. Per default all tags are selected for import. To import only the needed tags you can select all and press Reset Configuration.

  6. Select all the tags needed, choose the Acquisition Cycle, the Access Mode and click Apply and then Import.
    S7Conf6

  7. Select the PLC Connection and then deploy.
    S7Conf8 S7Conf8_2

  8. Monitor the connection status in the Connector Configuration tab. S7Conf9

Option 2: OPC UA Connector

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

Common Import Converter

The Common Import Converter converts the configuration deployed by the OPC UA Connector Configurator into a OPC UA Connector configuration.

Registry Service

This app needs to be installed on the IED. It allows service registration and service discovery for connectors and related components.

Configure Databus

  1. Go to the IEM and open the Databus Configurator in the Data Connections section.

  2. Create a new user and assign the topic ie/# with permission Publish and Subscribe.
    DatabusConfig

  3. Deploy the configuration.

Configure OPC UA Connector

  1. In your IEM, go to Data Connections and launch the OPC UA Connector configurator.

  2. Go to the settings menu, where you can fill in the Databus user you just created:
    OPCUAConfig1

  3. Add a new data source.
    OPCUA DataSource

  4. After adding the PLC, click on the browse symbol and add the following variables to your configuration:
    OPCUA Tags

  5. Deploy the configuration.

If you don't want to perform all these steps manually, you can import this configuration file.

Configure Common Configurator

This apps allows the configuration of the IIH.

  1. In your IED open the Common Configurator.

  2. 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.
    IIH Databus_PubCred

Import OPC UA Model

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:

Import a Companion Specification

In your IED open the Common Configurator.

  1. In Define Data -> OPCUA Model select Add Model.
    IIH_CreateModel

  2. Select Load companion specification.
    IIH_LoadCompanionSpec

  3. Load the TankNodeset.xml and select the namespace http://opcfoundation.org/UA/machine/:
    IIH_CompSpec_Namespace

Import the OPC UA model

The model is an instance of the standardized information that is defined in the companion specification.

  1. Select Add model again.
    IIH_AddInstance

  2. Select Load instance model.
    IIH_LoadInstance

  3. 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.
    IIH_model_Namespace

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.

Mapping tags

To connect the OPC UA model with the actual values open the Common Configurator on your device and follow the steps below.

Option 1: SIMATIC S7+ Connector Mapping

  1. Go to Define Data -> Organize

  2. Select OPC UA and the namespace for the model in the respective dropdown menus on the right side of the window.

  3. On the left side you should see the Data Sources. Select SIMATIC S7+ Connector from the dropdown menu.
    IIH_s7mapping

  4. Drag and drop tags from the left window into the OPC UA model.

  5. Deploy the changes.
    IIH_s7mapping_deploy

Option 2: OPC UA Connector Mapping

  1. Follow the same procedure as for Option 1, while selecting 'opcuac1' from the connector dropdown menu:
    IIH_opcuamapping

  2. Deploy the changes.

Creating Asset Model

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.

  1. Go to Define Data -> Organize.

  2. Select Asset Model in the right editor window and create a new asset.
    AddParentAsset

  3. Map the OPC UA model by dragging and dropping the OPC UA hierarchy object to the created asset.
    MapOPCtoAsset

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.