Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Machine Insight V2.0 #12

Merged
merged 8 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This repository describes how to setup the environment for using the Machine Ins
### General task

For the remote diagnostic of a PLC via Machine Insight, it is required that the PLC and the IED are connected to the same network.
Machine Insight collects the device data from the PLC via the S7+ Connector. This connector must be configured via the Common Configurator app. For retrieving the PLC alarms you need to create an asset structure and a dedicated alarm channel within the IIH Essentials app. Since Machine Insight is based on this asset structure, you can configure one PLC dashboard for each asset. For visualizing the machine status it is necessary to configure a status mapping within Machine Insight and assign the dedicated PLC parameter to the asset. Finally you can configure one or more assets to show the dedicated device and machine data:
Machine Insight collects the device data from the PLC via the SIMATIC S7+ Connector. This connector must be configured via the Common Configurator app. For retrieving the PLC alarms you need to create an asset structure and a dedicated alarm channel within the IIH Essentials app. Since Machine Insight is based on this asset structure, you can configure one PLC dashboard for each asset. For visualizing the machine status it is necessary to configure a status mapping within Machine Insight and assign the dedicated PLC parameter to the asset. Finally you can configure one or more assets to show the dedicated device and machine data:
- Machine status (via PLC variable and status mapping)
- Device status (PLC status)
- Device alarms (system/process/security alarms)
Expand All @@ -41,7 +41,7 @@ Machine Insight collects the device data from the PLC via the S7+ Connector. Thi
**Important to know:**
- V2.0 only supports S7-1500 PLCs
- Max. 8 connected PLCs per app possible
- S7+ Connector >= V1.4 necessary
- SIMATIC S7+ Connector >= V1.4 necessary

## Requirements

Expand All @@ -52,6 +52,7 @@ Machine Insight collects the device data from the PLC via the S7+ Connector. Thi
- Installed apps (see list "Used components")
- IED is connected to PLC
- TIA portal project loaded on PLC
- Export of TIA portal project via SIMATIC SCADA Export available (.zip)
- Google Chrome (Version ≥ 72)

### Used components
Expand All @@ -61,12 +62,15 @@ Machine Insight collects the device data from the PLC via the S7+ Connector. Thi
- Common Connector Configurator V 1.10.1-2
- Industrial Edge Device (IED) simatic-ipc-ied-os-2.1.0-22
- Databus V 3.0.0
- S7+ Connector V 1.4.0
- SIMATIC S7+ Connector V 1.4.0
- IIH Essentials V1.11.0
- Common Configurator V 1.11.1
- Registry Service V 1.11.0
- Common Import Converter V 2.2.0
- Machine Insight V 2.0.0
- PLC: CPU 1515F-2
- TIA Portal V16
- SIMATIC SCADA Export (V16) V2.0

### TIA Project

Expand All @@ -76,7 +80,7 @@ The used TIA Portal project can be found in the [miscellenous repository](https:

You can find further information about the following steps in the [Configuration](docs/Installation.md) documentation:
- Configuration of Databus
- Configuration of S7+ Connector via Common Configurator
- Configuration of SIMATIC S7+ Connector via Common Configurator
- Configuration of IIH Essentials
- Configuration of Machine Insight

Expand Down
129 changes: 93 additions & 36 deletions docs/Installation.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,127 @@
# Configuration

- [Configuration](#configuration)
- [Configuration for Device Scanner Service](#configuration-for-device-scanner-service)
- [Configure PLC Connection](#configure-plc-connection)
- [Configure Databus](#configure-databus)
- [Configure OPC UA Connector](#configure-opc-ua-connector)
- [Configure Databus](#configure-databus)
- [Configure SIMATIC S7+ Connector via Common Configurator](#configure-simatic-s7-connector-via-common-configurator)
- [Configure IIH Essentials](#configure-iih-essentials)
- [Configure Machine Insight](#configure-machine-insight)

To run the Machine Insight application, all the following applications must be deployed and configured in **the same IED**:
To run the Machine Insight application, the following applications must be deployed and configured on **the same IED**:

- Device Scanner Service (for scan functionality)
- Databus (for machine status feature)
- OPC UA Connector (for machine status feature)
- Machine Insight Configurator
- Databus (MQTT broker)
- SIMATIC S7+ Connector (provide machine status parameter, retrieve alarms)
- Common Configurator (configure SIMATIC 7+ connector)
- Registry Service (register SIMATIC S7+ connector) > no config necessary
- Common Import Converter (import S7+ tags) > no config necessary
- IIH Essentials (define asset structure, create alarm channels)
- Machine Insight

## Configuration for Device Scanner Service
## Configure Databus

The Device Scanner Service is **optional** but required to be able to use the **scan functionality** in Machine Insight Configurator. It requires a specific network configuration called **Layer-2-Access** on the IED to work properly. Here you define an address pool used by Docker to configure a container IP address for the Device Scanner Service.
The **Databus** acts as MQTT broker and is essential to exchange data between a PLC and the IED via a connector. You need to create an user and one or more topics in the Databus configuration, which cover the process data.
EvaKaul marked this conversation as resolved.
Show resolved Hide resolved

To configure the Layer-2-Access, open the UI of the IED and in the menu go to Settings > Connectivity > LAN Network. For the network interface, that is connected to the PLC, the Layer-2-Access must be configured. Click the corresponding edit icon for that interface and add the needed.
Therefore follow these steps:

![Configure device LAN](/docs/graphics/Configure_Device_LAN.PNG)
![Configure_Device_Layer_2_Access](/docs/graphics/Configure_Device_Layer_2_Access.PNG)
- open the Industrial Edge Management (IEM)
- go to 'Data Connections' > Databus
- select the corresponding IED and launch
- create a new user ('edge'/'edge') with the dedicated topic `ie/#` and set the permissions to 'Publish and Subscribe'
- deploy the configuration and wait for the job to be finished successfully

Make sure the Device Scanner Service is running on the IED.
![databus](/docs/graphics/Databus.PNG)

## Configure PLC Connection
## Configure SIMATIC S7+ Connector via Common Configurator

The IE Databus is **optional** but required to be able to use the **machine status feature** in Machine Insight Configurator. To read data from the PLC, we will use the OPC UA Connector to establish a connection and publish the PLC data on the Databus.
To read data from the PLC, we will use the **SIMATIC S7+ Connector**. The connector configuration is done via the **Common Configurator**. Furthermore the apps **Registry Service** and **Common Import Converter** need to be launched on the IED.

In order to build this infrastructure, these apps must be configured properly:
The Common Configurator publishes the connector data on the Databus. Therefore, you must enter the Databus credentials within the Common Configurator:
EvaKaul marked this conversation as resolved.
Show resolved Hide resolved

- Databus
- OPC UA Connector
- open the IED web interface
- open the app Common Configurator
- go to the tab 'Settings' and select the menu 'Databus credentials'
- enter the databus service name: 'ie-databus:1883'
- in tab 'Data Publisher settings' enter the databus user name and password ('edge'/'edge')
- in tab 'Data Subscriber settings' enter the databus user name and password ('edge'/'edge')
- save the settings

Hint: Username and password should be the same for all system apps, e.g. "edge" / "edge".
![IIHDatabusSettings](/docs/graphics/IIHDatabusSettings.png]

### Configure Databus
As soon as the SIMATIC S7+ Connector is installed and started on the same IED as the Common Configurator, the connector is visible within the configurator. In this example we want to configure a S7+ connection to a CPU 1515F-2. It is required to have an SIMATIC SCADA export of the dedicated TIA project available (Export.zip).
EvaKaul marked this conversation as resolved.
Show resolved Hide resolved

In your IEM open the IE Databus and launch the configurator.
- go to the tab 'Get data'
- select the SIMATIC S7+ Connector
- switch to tab 'Tags'
- add a new data source
- choose 'add from file'
- select the Export.zip from the SIMATIC SCADA Export of the TIA project
- add a name and the IP address of the PLC
- select the option 'Provide PLC alarms'
- click 'Continue to "Select tags"'

Add a user with this topic:
`"ie/#"`
![DataSource](/docs/graphics/IIHDataSource.png)

![databus](/docs/graphics/Databus.PNG)
- select an acquisition cycle and a access mode in the drop down fields
- select the parameter that represents the machine state
- click 'Import'

![DataSource2](/docs/graphics/IIHDataSource2.png)

For writing the tag values onto the MQTT databus you need to activate and confirm the 'Publish on the databus' option for each tag:

- select the parameter
- click on the edit icon of the parameter
- activate the option 'publish on the databus'
- select an acquisition cycle
- accept the settings

![DataSource3](/docs/graphics/IIHDataSource3.png)

Select the newly created PLC including all the tags and click 'Deploy' to save the configuration and start the project.

**Important to know:**
The alarms can only be activated when creating the data source. It is not possible to add them afterwards!

## Configure IIH Essentials

Within **IIH Essentials** you can define the asset structure for your plant:

- open the app IIH Essentials
- create the asset hirarchy accordingly

The app gathers all the necessary process data and saves it for a configured period of time. In this case we want to get data out of the S7+ Connector, therefore this must be activated:

Deploy the configuration.
- go to the tab 'Settings' and select 'Databus settings'
- enter the databus service name: `ie-databus:1883`
- enter the user name and password ('edge'/'edge')
- save

### Configure OPC UA Connector
- go to the tab 'Connectors'
- select the 'SIMATIC S7 Plus Connector'
EvaKaul marked this conversation as resolved.
Show resolved Hide resolved
- activate and save

In your IEM open the OPC UAgit Connector and launch the configurator.
![IIHEssentialsAdaper](/docs/graphics/IIHEssentialsAdapter.png)

Add a data source:
To add the PLC parameter for the machine state, proceed as following:

![OPC UA Connector Data Source](/docs/graphics/OPCUA_Connector_Data_Source.PNG)
- go to tab 'Assets & Connectivity'
- select the dedicated asset
- clickt 'Create first variable'
- select the SIMATIC S7 Plus Connector
EvaKaul marked this conversation as resolved.
Show resolved Hide resolved
- select the machine state parameter
- add variable

Add the needed tag for the machine status:
![IIHEssentialsParameter](/docs/graphics/IIEssentialsParameter.png)

![opcua_connector_config](/docs/graphics/OPCUA_Connector_Configuration.PNG)
For this asset we also need to create an alarm channel for getting the alarm data out of the PLC:

Edit the settings:
- within the asset, select the tab 'Alarms'
- select 'Create first alarm channel'
- configure it as following and save

![opcua_connector_settings](/docs/graphics/OPCUA_Connector_Settings.PNG)
![IIHEssentialsAlarmChannel](/docs/graphics/IIHEssentialsAlarmChannel.png)

Deploy and start the project.
**Important to know:**
It is essential to have **only one source selected** on the alarm channel. Otherwise no device status will be displayed within Machine Insight!

## Configure Machine Insight

Expand Down
Binary file removed docs/graphics/Configure_Device_LAN.PNG
Binary file not shown.
Binary file removed docs/graphics/Configure_Device_Layer_2_Access.PNG
Binary file not shown.
Binary file modified docs/graphics/Databus.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/IIHDataSource.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/IIHDataSource2.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/IIHDataSource3.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/IIHDatabusSettings.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/IIHEssentialsAdapter.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/IIHEssentialsAlarmChannel.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/IIHEssentialsParameter.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/OPCUA_Connector_Configuration.PNG
Binary file not shown.
Binary file removed docs/graphics/OPCUA_Connector_Data_Source.PNG
Binary file not shown.
Binary file removed docs/graphics/OPCUA_Connector_Settings.PNG
Binary file not shown.