/livetwin-earthquake-detection

Running a simulation model on edge device using the Siemens app LiveTwin by creating LiveTwin project.

MIT LicenseMIT

Simulating virtual sensor with LiveTwin

Running a simulation model on a Industrial Edge Device using the Siemens app LiveTwin.

Description

Overview

This application example shows how to export Simulink virtual sensor model and run it on a Industrial Edge Device with LiveTwin edge application. The model can read data from PLC and send the current status back to the PLC.

General task

The main goal of this automation task is to create Simulink model that simulates shock sensor, export it in the required format and run it on the Industrial Edge Device using LiveTwin. The edge device can read data from PLC simulating vibrations via integrated S7 Connector using S7 communication protocol. Based on logic in the SIMATIC Flow Creator, the model can evaluate whether the vibrations have occurred and send the current shock status back to PLC. The data flow can be visualized directly in LiveTwin.

Requirements

Prerequisities

  • Onboarded Industrial Edge Device on Industrial Edge Management
  • Installed system configurators
  • Installed system applications
  • Installed LiveTwin and SIMATIC Flow Creator applications
  • Edge device is connected to PLC
  • TIA portal project downloaded to PLC (TIA project)

Used components

  • Industrial Edge Device V 1.2.0-56
  • PLC: CPU 1511
  • TIA Portal V16
  • Matlab 2019b
  • SIMATIC S7 Connector V 1.2.26
  • SIMATIC S7 Connector Configurator V 1.2.16
  • IE Databus V 1.2.32
  • IE Databus Configurator V 1.2.29
  • SIMATIC Flow Creator V 1.0.5
  • LiveTwin V1.0.5

Installation steps

You can find the further information about the following steps in the Installation documentation

  • Export Simulink model
  • Import the model to LiveTwin
    • Create instance
    • Create LiveTwin project
  • Configure the LiveTwin project properties
  • Configure IE Databus
  • Configure SIMATIC S7 Connector
  • Run the simulation
    • Visualize the data
    • Send shock status back to PLC

Documentation

Contribution

Thank you for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section. Additionally everybody is free to propose any changes to this repository using Pull Requests.

If you haven't previously signed the Siemens Contributor License Agreement (CLA), the system will automatically prompt you to do so when you submit your Pull Request. This can be conveniently done through the CLA Assistant's online platform. Once the CLA is signed, your Pull Request will automatically be cleared and made ready for merging if all other test stages succeed.

Licence & Legal Information

Please read the Legal information