IISK Example

Prerequisites

In order to follow this example configuration, you should have finished the IISK configuration in chapter three.

It is assumed that:

The application dataFEED Exporter is used to extract the address space of a Siemens TIA project. For further information please refer to the dataFEED OPC Suite manual.

Running the iot-edge-opc-proxy and iot-edge-opc-publisher containers

The scripts are located in C:\docker

Run the startProxy.bat and startPublisher.bat
For further information about the scripts please refer to startProxy.html and startPublisher.html.
When starting the scripts for the first time, the docker containers specified in the scripts are fetched from Docker Hub.

iot-edge-opc-proxy first run

iot-edge-opc-proxy first run

iot-edge-opc-publisher first run

iot-edge-opc-publisher first run

The publisher script binds to a docker network which is mapped from the IISK host.
Allow access to the vpnkit.exe which is part of docker when the Windows firewall prompts for access permission.

Allow Firewall vpnkit

Allow Firewall vpnkit

After the download of the containers is finished the iot-edge-opc-proxy and iot-edge-opc-publisher containers will run.

iot-edge-opc-proxy running

iot-edge-opc-proxy running

iot-edge-opc-publisher running

iot-edge-opc-publisher running

At this point the iot-edge-opc-proxy and iot-edge-opc-publisher have registered themselves at the Azure IoT hub.

Now, the devices show up in the Azure IoT hub.

Azure IoT Hub Devices

Azure IoT Hub Devices

Alternatively the registered devices can be viewed with the Device Explorer Desktop App.

Device Explorer Devices View

Device Explorer Devices View

Connected factory - Access dataFEED OPC Suite

Configure an internal dataFEED source

No further configuration is needed. Proceed with starting the dataFEED runtime here.

Configure an external dataFEED source: S7-1500 PLC

Open the data source settings and add a new Siemens S7 connection.

dataFEED OPC Suite S7 add

dataFEED OPC Suite S7 add

Enter a name for the connection and select the S7 protocol.

dataFEED OPC Suite S7 connection settings

dataFEED OPC Suite S7 connection settings

Enter the IP address of your PLC and click "Modify".

dataFEED OPC Suite S7 communication settings

dataFEED OPC Suite S7 communication settings

For the S7-1500 PLC family change the slot in the RFC 1006 settings to 1.

dataFEED OPC Suite S7 communication settings detail

dataFEED OPC Suite S7 communication settings detail

In the Extended Settigns click the "Connection Test" button.

dataFEED OPC Suite S7 extended settings

dataFEED OPC Suite S7 extended settings

The connection test should complete successfully - if not, your configuration is false or the PLC is not available. For further information please refer to the dataFEED OPC Suite manual.

dataFEED OPC Suite S7 connection test

dataFEED OPC Suite S7 connection test

Either create items in the address space or import items from a Siemens project.

  1. Add items manualy
    Click the "plus" button.

    dataFEED OPC Suite S7 add items manual

    dataFEED OPC Suite S7 add items manual

    Choose Type: Tag and enter a name for the item and its syntax. For this example choose mb0 for the syntax. For further information about item syntax please refer to the dataFEED OPC Suite manual.

    dataFEED OPC Suite S7 tag definition

    dataFEED OPC Suite S7 tag definition

  2. Import items from a SDFI file created by dataFEED Exporter
    Click the "S7" button.

    dataFEED OPC Suite S7 symbol import

    dataFEED OPC Suite S7 symbol import

    Choose the symbol file that corresponds to your S7 PLC.

    dataFEED OPC Suite S7 symbol import wizard

    dataFEED OPC Suite S7 symbol import wizard

    If the project contains multiple PLCs select one.

    dataFEED OPC Suite S7 symbol import wizard

    dataFEED OPC Suite S7 symbol import wizard

    Select all items that you want to import.

    dataFEED OPC Suite S7 symbol import wizard

    dataFEED OPC Suite S7 symbol import wizard

    A results page is shown and after that the items are shown in the Address Space Definition.

    dataFEED OPC Suite S7 address space

    dataFEED OPC Suite S7 address space

After the address space creation the configuration is finished. The connection overview shows the newly created connection.

dataFEED OPC Suite S7 connection overview

dataFEED OPC Suite S7 connection overview

Proceed with Start the dataFEED runtime
For further information about configuration of dataFEED source elements and supported PLC types please refer to the dataFEED OPC Suite manual.

Start the dataFEED runtime

Select from the menu Local Application -> Start.

dataFEED OPC Suite S7 connection overview

dataFEED OPC Suite S7 connection overview

If the configuration has changed, save the configuration when prompted.

dataFEED OPC Suite S7 connection overview

dataFEED OPC Suite S7 connection overview

Browse the dataFEED OPC UA endpoint URI and select nodes for publishing

Open the Connected factory webpage and add the endpoint URI of the dataFEED OPC UA server.

Note: The URL of your Connected factory is shown in Azure Portal if you click onto your Connected factory App Service.

Connected Factory OPC Server Add

Connected Factory OPC Server Add

Connect and then Proceed at the certificate warning.

Connected Factory Certificate Warning

Connected Factory Certificate Warning

An error message is shown on first connect, because the Connected factory certificate is untrusted in dataFEED OPC UA Server.

Connected Factory Connect Error

Connected Factory Connect Error

Select Configure in the certificates section of the dataFEED OPC UA settings.

dataFEED OPC UA configure certificates

dataFEED OPC UA configure certificates

Find the Connected factory UA client certificate in the rejected certificates store.

dataFEED OPC UA untrusted UA Web Client

dataFEED OPC UA untrusted UA Web Client

Move the Connected factory UA client certificate to the trusted certificates store.

dataFEED OPC UA trusted UA Web Client

dataFEED OPC UA trusted UA Web Client

Connect again to the dataFEED OPC UA server. The connection succeeds and the root hierarchy of the OPC UA server is shown.

Connected Factory Browse Root

Connected Factory Browse Root

The OPC UA server hierarchy can be expanded and browsed by clicking on the nodes.

Connected Factory Browse Hierarchy

Connected Factory Browse Hierarchy

Right clicking an item brings up the context menu. Depending on access permissions Read, Write and Publish options are available.

Connected Factory Item Context Menu

Connected Factory Item Context Menu

Reading an item will show its current value.

Connected Factory Item Read

Connected Factory Item Read

To write an item, enter the new value and click Write.

Connected Factory Item Write

Connected Factory Item Write

An item can also be published via MQTT. This will instruct the iot-edge-opc-publisher component to create a subscription at the OPC UA server and monitor the item for value changes. On value change the dataset is send via MQTT to Azure IoT hub. A violett hook appears and shows that this value is published.

Connected Factory Item Publish

Connected Factory Item Publish

Because the iot-edge-opc-publisher is untrusted in the dataFEED OPC UA server, the certificate will be also first in the rejected certificates store.

dataFEED OPC UA untrusted Publisher

dataFEED OPC UA untrusted Publisher

Move the iot-edge-opc-publisher certificate to the trusted certificates store.

dataFEED OPC UA trusted Publisher

dataFEED OPC UA trusted Publisher

From the publish success message a link to the Time Series Insights can be opened. This is a service from Microsoft Azure showing historian data.

Connected Factory Item Publish Link Insights

Connected Factory Item Publish Link Insights

The published data can be viewed.

Time Series Insights

Time Series Insights

Alternatively in the Data tab of the Device Explorer the iot-edge-opc-publisher can also be monitored for new values.

Device Explorer Data View

Device Explorer Data View

To stop publishing new values to the Azure IoT hub, right click the item to bring up the unpublish option

Connected Factory Item Context Menu

Connected Factory Item Context Menu

After unpublishing no further data for this item will be send to the Azure IoT hub. The violett hook disappears.

Connected Factory Item Unpublish

Connected Factory Item Unpublish


Continue reading with:
* Table of Content
* Troubleshooting


Version: Documentation-v1.1.0