Skip to content

Commit

Permalink
Ied2 msp (#8)
Browse files Browse the repository at this point in the history
* Update install_Device_Northbound.md

* Update install_MindSphere.md

* Add files via upload

* Update README.md

* Update install_PLC_Devices_Southbound.md

* Update install_MindSphere.md

* Update install_Device_Northbound.md

* Add files via upload

* Delete S7_Connector.png

* Add files via upload

* Delete energy1_S7_Connector.json

* Delete energy2_S7_Connector.json

* Add files via upload

* Add files via upload

* Add files via upload

* Update README.md

* Update README.md

* Update install_PLC_Devices_Southbound.md

* Add files via upload

* Update install_Device_Northbound.md

* Update README.md

* Update README.md

* updated wording

Co-authored-by: KaiFisc007 <102217012+KaiFisc007@users.noreply.github.com>
Co-authored-by: Thomas Boehmlaender <thomas.boehmlaender@siemens.com>
Co-authored-by: Thomas Boehmlaender <74045802+Boehmi-TB@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 5, 2022
1 parent 9751c4b commit 17eff61
Show file tree
Hide file tree
Showing 22 changed files with 148 additions and 62 deletions.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Use case for communication from Edge Device to Edge Device and company Cloud (e.
- [Shopfloor to Cloud Connectivity - Integrate machine & production data securely into the company cloud](#shopfloor-to-cloud-connectivity---integrate-machine--production-data-securely-into-the-company-cloud)
- [Overview](#overview)
- [Reference Architecture](#reference-architecture)
- [Option 1: IE Cloud Connector - MindConnect IoT Extension](#option-1-ie-cloud-connector---mindconnect-iot-extension)
- [Option 2: MindSphere Connector - MindSphere Native MQTT](#option-2-mindsphere-connector---mindsphere-native-mqtt)
- [Option 1: MindSphere Connector - MindConnect MQTT](#option-1-mindsphere-connector---mindconnect-mqtt)
- [Option 2: IE Cloud Connector - MindConnect IoT Extension](#option-2-ie-cloud-connector---mindconnect-iot-extension)
- [Network Architecture](#network-architecture)
- [General task](#general-task)
- [Requirements](#requirements)
Expand All @@ -25,13 +25,13 @@ Use case for communication from Edge Device to Edge Device and company Cloud (e.

### Reference Architecture

#### Option 1: IE Cloud Connector - MindConnect IoT Extension
#### Option 1: MindSphere Connector - MindConnect MQTT

![overview3](docs/graphics/overview3.png)
![overview3](docs/graphics/overview4.png)

#### Option 2: MindSphere Connector - MindSphere Native MQTT (coming soon)
#### Option 2: IE Cloud Connector - MindConnect IoT Extension

![overview3](docs/graphics/overview4.png)
![overview3](docs/graphics/overview3.png)

### Network Architecture

Expand Down Expand Up @@ -59,12 +59,12 @@ and forwarding them to MindSphere.
- Established connection to 2 PLCs to acquire data with the Edge Device
- Access to an Industrial Edge Management System (IEM)
- Onboarded 3 Industrial Edge Devices (IEDs) on Industrial Edge Management
- Installed System App Configurators on IEM (S7 Connector Configurator, IE Databus Configurator, Cloud Connector Configurator)
- Installed apps on Southbound-Devices (SIMATIC S7 Connector, IE Cloud Connector, IE Databus, IE Flow Creator)
- Installed apps on Northbound-Device (Data Service, IE Databus, IE Flow Creator, Energy Manager, IE MQTT Connector, IE Cloud Connector)
- Installed System App Configurators on IEM (OPC UA Connector Configurator, IE Databus Configurator, Cloud Connector Configurator, IE MIndSphere Connector Configurator)
- Installed apps on Southbound-Devices (OPC UA Connector, IE Cloud Connector, IE Databus, IE Flow Creator)
- Installed apps on Northbound-Device (Data Service, IE Databus, IE Flow Creator, Energy Manager, IE MQTT Connector, IE Cloud Connector, IE MindSphere Connector)
- Google Chrome (Version ≥ 72) or Firefox (Version ≥ 62)
- Access to MindSphere
- MindConnect IoT Extension
- MindConnect IoT Extension (Optional)
- Energy Manager

### Used components
Expand All @@ -74,21 +74,21 @@ TIA & PLCs:
- PLC 1512SP-1 PN FW V2.1

Industrial Edge:
- Industrial Edge Management V1.5.6
- Industrial Edge Management V1.7.4
- Industrial Edge Device V1.5.0-21-amd64
- SIMATIC S7 Connector V1.6.0-8
- IE Databus V1.6.3
- IE MQTT Connector V1.5.1
- OPC UA Connector V1.7.0-15
- IE Databus V1.7.0
- IE MQTT Connector V1.6.2
- Data Service V1.3.3-13224869
- IE Flow Creator V1.3.3
- IE Flow Creator V1.3.9
- Energy Manager V1.2.0
- IE Cloud Connector V 1.6.2
- IE Mindsphere Connector
- IE Cloud Connector V1.6.2
- IE Mindsphere Connector V1.3.2
- Web browser (Mozilla or Chrome)

MindSphere:
- Asset Manager
- MindConnect IoT Extension
- MindConnect IoT Extension (Optional)
- Energy Manager

## Configuration Southbound Devices
Expand All @@ -97,7 +97,7 @@ You can find the further information about the following steps in the [docs](doc

- Configure PLC project in TIA-Portal
- Configure PLC connections in Industrial Edge
- SIMATIC S7 Connector
- OPC UA Connector
- IE Databus
- Configure Data preprocessing
- IE Flow Creator
Expand All @@ -113,19 +113,20 @@ You can find the further information about the following steps in the [docs](doc
- IE Databus
- IE MQTT Connector
- Data Service
- **Option 1**: Configure Connection to MindSphere - MindConnect IoT Extension
- IE Flow Creator
- IE Cloud Connector
- **Option 2**: Configure Connection to MindSphere - MindSphere Native MQTT (coming soon)
- IE Mindsphere Connector
- **Option 1**: Configure Connection to MindSphere - MindConnect MQTT
- IE Mindsphere Connector
- **Option 2**: Configure Connection to MindSphere - MindConnect IoT Extension
- IE Flow Creator
- IE Cloud Connector

- Configure visualization
- Energy Manager


## Configuration MindSphere
You can find the further information about the following steps in the [docs](docs/install_MindSphere.md)

- Configure Connection to Northbound
- Configure Connection to Northbound (Only for option 2 - IE Cloud Connector with MindConnect IoT Extensions)
- Asset Manager
- MindConnect IoT Extension
- Configure visualization
Expand All @@ -139,6 +140,7 @@ You can find further documentation and help in the following links
- [Industrial Edge Forum](https://www.siemens.com/industrial-edge-forum)
- [Industrial Edge landing page](https://new.siemens.com/global/en/products/automation/topic-areas/industrial-edge/simatic-edge.html)
- [Industrial Edge Learning Path](https://siemens-learning-simaticedge.sabacloud.com/)
- [Energy Manager on MindSphere application manual](https://documentation.mindsphere.io/resources/html/energy-manager/en-US/index.html)
## Contribution

Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.
Expand Down
Binary file added docs/graphics/Cloud_Connector_ClientStandard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/IEMindSphereConnector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/IEMindSphereConnector_Adapter.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/IEMindSphereConnector_Adapter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/IEMindSphereConnector_route.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/MindSphere_Datamodel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graphics/OPCUA_Connector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/graphics/S7_Connector.png
Binary file not shown.
Binary file modified docs/graphics/overview3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/graphics/overview4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 87 additions & 12 deletions docs/install_Device_Northbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
- [IE Databus](#ie-databus)
- [IE MQTT Connector](#ie-mqtt-connector)
- [Data Service](#data-service)
- [Option 1: IE Flow Creator](#option-1-ie-flow-creator)
- [Option 1: IE Cloud Connector - MindConnect IoT Extension](#option-1-ie-cloud-connector---mindconnect-iot-extension)
- [MindSphere - Energy Manager](#mindsphere---energy-manager)
- [Option 1: MindConnect MQTT](#option-1-mindconnect-mqtt)
- [Create an agent private key](#create-an-agent-private-key)
- [Configure IE MindSphere Connector](#configure-ie-mindsphere-connector)
- [Option 2: MindConnect IoT Extension](#option-2-mindconnect-iot-extension)
- [IE Flow Creator](#ie-flow-creator)
- [IE Cloud Connector - MindConnect IoT Extension](#ie-cloud-connector---mindconnect-iot-extension)
- [Northbound Device - Energy Manager](#northbound-device---energy-manager)
- [Navigation](#navigation)

# Configure Northbound
Expand All @@ -17,12 +21,12 @@ Installed Apps on Central Device:
- Data Service
- IE Databus
- Energy Manager
- IE MQTT Connector
- Option 1: MindConnect IoT Extension
- IE MQTT Connector
- Option 1: MindConnect MQTT
- IE Mindsphere Connector
- Option 2: MindConnect IoT Extension
- IE Flow Creator
- IE Cloud Connector
- Option 2: MindSphere Native MQTT (coming soon)
- IE Mindsphere Connector

## IE Databus

Expand Down Expand Up @@ -141,10 +145,80 @@ To sort the data add aspects in the Data Service.


![IE_Dataservice7](graphics/IE_Dataservice7.png)


## Option 1: MindConnect MQTT

### Create an agent private key

On how to create the agent key, please refer to the [How To](https://documentation.mindsphere.io/MindSphere/howto/howto-onboard-mindconnect-mqtt.html) on https://mindsphere.io

```
set TENANT=<yourtenant>
set DEVICE_NAME=<yourdevicename>
set COUNTRY_CODE=<COUNTRY_CODE>
set CITY=<CITY>
set ORGANIZATION=<ORGANIZATION>
set CLIENT_ID="%TENANT%"_"%DEVICE_NAME%"
```

1. ```openssl genrsa -out %DEVICE_NAME%.key 2048```
2. ```openssl req -new -key %DEVICE_NAME%.key -out %DEVICE_NAME%.csr -subj "/C=%COUNTRY_CODE%/ST=%CITY%/O=%ORGANIZATION%/OU=IT/CN=%DEVICE_NAME%"```
3. ```openssl x509 -req -in %DEVICE_NAME%.csr -CA "%TENANT%.pem" -CAkey "%TENANT%.key" -CAcreateserial -out %DEVICE_NAME%.pem -days 365 -sha256```
4. ```type %DEVICE_NAME%.pem "%TENANT%.pem" > "%DEVICE_NAME%"_chain.pem```

You now have a private key for your agent: ```%DEVICE_NAME%".pem```

### Configure IE MindSphere Connector
In your Industrial Edge Management, go to Data Connections -> IE MindSphere Connector -> Choose your device -> Launch.

1. Set up the Databus adapter for IE MindSphere Connector -> Click Add Topic, fill in the required info and select the correct topic.

- Username: `edge`

- Password: `edge`

- Metadata for Subscription: `ie/m/j/simatic/v1/iefc/dp/energy1line1`

Then select List Data Topics and choose `ie/d/j/simatic/v1/iefc/dp/r/energy1line1/default` from "Select Data Topics".
Repeat these steps for `ie/m/j/simatic/v1/iefc/dp/energy2line2`

![IEMindSphereConnector_Adapter](graphics/IEMindSphereConnector_Adapter.png)

2. Create the MindSphere client by selecting "Add Client".

Choose a name and the type (Depending on your MindSphere tenant).
Upload the previously created client certificate and key.

![IEMindSphereConnector_CloudClient1](graphics/IEMindSphereConnector_CloudClient1.png)

3. Edit your Cloud Client and select the Tenant & Client ID.
> **_NOTE:_** The Client ID must be in the format `tenant_yourClientName`.
![IEMindSphereConnector_CloudClient2](graphics/IEMindSphereConnector_CloudClient2.png)


5. Prepare the Model by selecting the data model on Edge which should be transferred to MindSphere.

![IEMindSphereConnector_CloudClient3](graphics/IEMindSphereConnector_CloudClient3.png)

6. Create a Route by clicking "Add Route", select a name, connect the topics and the client and click "Save Route".

![IEMindSphereConnector_route](graphics/IEMindSphereConnector_route.png)

6. Deploy the configuration.

![IEMindSphereConnector](graphics/IEMindSphereConnector.png)

In MindSphere Energy Manager, you should now see your data structure from Data Service.

![MindSphere_Datamodel](graphics/MindSphere_Datamodel.png)

## Option 2: MindConnect IoT Extension

## Option 1: IE Flow Creator
### IE Flow Creator

> **_NOTE:_** Only required when connesction to MindConnect IoT Extension.
> **_NOTE:_** Only required when connecting to MindConnect IoT Extension. Otherwise you can skip to [Northbound Device - Energy Manager](#northbound-device---energy-manager)
The IE Flow Creator will extract the packaged data from IE Cloud Connector
and also converts the data to MindSphere IOT Extension data format
Expand All @@ -153,7 +227,7 @@ and also converts the data to MindSphere IOT Extension data format

2. Enter IE-Databus credentials

## Option 1: IE Cloud Connector - MindConnect IoT Extension
### IE Cloud Connector - MindConnect IoT Extension

Requirements:

Expand Down Expand Up @@ -202,8 +276,9 @@ Example:
6. Deploy the configuration


## Northbound Device - Energy Manager

## MindSphere - Energy Manager
To analyze the data locally on the Edge Device, you can use Energy Manager App on the Northbound Device

Energy Manager displays the total energy consumption, the energy consumption per bottle and the associated costs for each line.

Expand Down Expand Up @@ -344,4 +419,4 @@ Used KPI types:

[Configuration Southbound Device](install_PLC_Devices_Southbound.md)

[Configuration MindSphere](install_MindSphere.md)
[Configuration MindSphere](install_MindSphere.md)
14 changes: 10 additions & 4 deletions docs/install_MindSphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@


- [Configuration Steps](#configuration-steps)
- [Configure MindSphere](#configure-mindsphere)
- [Option 1 MindSphere MindConnect MQTT](#option-1-mindsphere-mindconnect-mqtt)
- [Option 2: MindConnect IoT Extension](#option-2-mindconnect-iot-extension)
- [Asset Manager](#asset-manager)
- [MindConnect IoT Extension](#mindconnect-iot-extension)
- [Energy Manager](#energy-manager)
- [Configure Energy Manager](#configure-energy-manager)
- [Navigation](#navigation)

# Option 1 MindSphere MindConnect MQTT

No further steps have to be done to connect the data to MindSphere. Data in MindSphere should already be available from [previous steps](install_Device_Northbound.md)

# Configure MindSphere
> **_NOTE:_** Continue with [configuration of Energy Manager on MindSphere](#configure-energy-manager)
# Option 2: MindConnect IoT Extension

## Asset Manager

Expand Down Expand Up @@ -83,7 +88,8 @@ The Central Device is named "Media Consumption Factory1" this name was defined i

5. Commit changes

## Energy Manager

# Configure Energy Manager

The Energy Manager shows the data from the whole Factory1

Expand Down
39 changes: 21 additions & 18 deletions docs/install_PLC_Devices_Southbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- [Configure PLC-Project in TIA-Portal](#configure-plc-project-in-tia-portal)
- [Configuration Southbound for Industrial Edge](#configuration-southbound-for-industrial-edge)
- [IE Databus](#ie-databus)
- [SIMATIC S7 Connector](#simatic-s7-connector)
- [OPC UA Connector](#opc-ua-connector)
- [IE Flow Creator](#ie-flow-creator)
- [IE Cloud Connector](#ie-cloud-connector)
- [Navigation](#navigation)
Expand All @@ -22,15 +22,15 @@

The Southbound consist of two devices. In the following they are called "Energy1" and "Energy2"

Installed Apps Device Energy1 and Energy2:
- SIMATIC S7 Connector
Installed Apps on the Device Energy1 and Energy2:
- OPC UA Connector
- IE Cloud Connector
- IE Databus
- IE Flow Creator

## IE Databus

Add a user in the IE Databus Configurator with username and password and provide necessary access right to the required topics so the SIMATIC S7 Connector, IE Flow Creator and IE Cloud Connector can publish and subscribe to topics.
Add a user in the IE Databus Configurator with username and password and provide necessary access right to the required topics so the OPC UA Connector, IE Flow Creator and IE Cloud Connector can publish and subscribe to topics.

Instead of manually configuring you can also import the configuration files:

Expand All @@ -52,16 +52,15 @@ Instead of manually configuring you can also import the configuration files:
![ie_databus](graphics/IE_Databus.png)


## SIMATIC S7 Connector
## OPC UA Connector

To provide data from the PLC on the IE Databus connect the SIMATIC S7 Connector to the PLC and add the required PLC variables
To provide data from the PLC on the IE Databus connect the OPC UA Connector to the PLC and add the required PLC variables

1. Launch the S7 Connector Configurator and configure the PLC connection
2. Import the JSON file [energy1_S7_Connector](../src/Device_Energy1/energy1_S7_Connector.json) for Energy1 and [energy2_S7_Connector](../src/Device_Energy2/energy2_S7_Connector.json) for Energy2
3. Enter Credentials for IE Databus
4. Deploy and start your S7 Connector configuration
1. Launch the OPC UA Connector Configurator in the Industrial Edge Management under 'Data Connections' and configure the PLC connection
2. Import the JSON file [energy1_OPCUA_Connector](../src/Device_Energy1/energy1_OPCUA_Connector.json) for Energy1 and [energy2_OPCUA_Connector](../src/Device_Energy2/energy2_OPCUA_Connector.json) for Energy2
3. Deploy and start your OPC UA Connector configuration

![S7_connector](graphics/S7_Connector.png)
![OPCUA_connector](graphics/OPCUA_Connector.png)

## IE Flow Creator

Expand All @@ -73,7 +72,7 @@ Aggregate the raw data from the PLC to:

After aggregation the data and metadata are published to IE Databus. IE Cloud Connector subscribes to these topics and sends them to the central device

The aggregated values are published on newly defined topics to prevent collision with SIMATIC S7-Connector
The aggregated values are published on newly defined topics to prevent collision with OPC UA Connector related topic names

1. Import the JSON-File

Expand Down Expand Up @@ -158,7 +157,8 @@ Note: Create one topic for the data and one topic for the metadata.
5. Add Cloud Connector Clients
- Type: `LOCAL_LAKE`

- Publish Topic:
- Publish Topic & enter the Databus credentials of the northbound device:

Energy1:
- Metadata: `ie/m/j/simatic/v1/energy1line1:iefc/dp`
- Data: `ie/d/j/simatic/v1/energy1line1:iefc/dp/r/line1/default`
Expand All @@ -168,18 +168,21 @@ Note: Create one topic for the data and one topic for the metadata.
- Data: `ie/d/j/simatic/v1/energy2line2:iefc/dp/r/line2/default`


![Cloud_Connector4](graphics/Cloud_Connector_Client1.png)
![Cloud_Connector4](graphics/Cloud_Connector_ClientStandard.png)


![Cloud_Connector5](graphics/Cloud_Connector_Client1.png)


![Cloud_Connector5](graphics/Cloud_Connector_Client2.png)
![Cloud_Connector6](graphics/Cloud_Connector_Client2.png)

6. Mark the data and metadata routs an click "Save Route"
6. Mark the data and metadata routes an click "Save Route"


![Cloud_Connector6](graphics/Cloud_Connector_Route1.png)
![Cloud_Connector7](graphics/Cloud_Connector_Route1.png)


![Cloud_Connector7](graphics/Cloud_Connector_Route2.png)
![Cloud_Connector8](graphics/Cloud_Connector_Route2.png)

7. Deploy your configuration

Expand Down
Loading

0 comments on commit 17eff61

Please sign in to comment.