Data Integration: WinCC OA, Databus (MQTT) and Flow Creator

This chapter outlines the workflow for integrating data between WinCC OA, Industrial Edge Databus (MQTT), and Flow Creator. It explains how data is published from WinCC OA to the Databus, processed or subscribed to by Flow Creator, and optionally sent back to WinCC OA.

Install WinCC OA, Databus, and Flow Creator

Install the required applications using Industrial Edge Management.

  1. Log in to your local Industrial Edge Management instance.
  2. Go to the Catalog and install WinCC OA (x86), Databus, and Flow Creator on your device.

Set Up Databus MQTT Topic and User Credentials

Create a topic and set default credentials for MQTT access.

  1. In Data Connections, select Databus and start it on the Edge Device.
  2. In the Databus Configurator, add a new topic by clicking the + button in the Users list.
  3. Enter the Topic name, Username, Password, and Permission for the new topic.
    Example root topic: /winccoa/#; default username and password: admin/admin.
  4. Deploy the configuration to apply and save your settings.

Set Up an MQTT Data Flow Using Flow Creator

Configure MQTT nodes in Flow Creator to exchange data between Databus and WinCC OA.

  1. Go to your Edge Device by selecting it from the Edge Devices overview.
  2. Log in to your Edge Device.
  3. On your Edge Device, open Flow Creator.
  4. In the lower right corner, select Not right now to skip project creation.
  5. On the left side of the interface, you will see nodes that you can drag into the main area. These nodes allow you to publish and subscribe to values using MQTT.
  6. Drag the following nodes into the workspace: mqtt in, debug, another mqtt in, and an mqtt out.
  7. Connect one mqtt in with the debug node and the second mqtt in node with the mqtt out node.
  8. Configure the mqtt in node that is connected to the debug node.
    1. Double-click the mqtt in node to open its properties.
    2. In the Topic field, enter /winccoa/#.
    3. In the Server section, click the pen icon to add a new MQTT broker.
    4. In the broker dialog, enter a name, set the hostname to ie-databus, and add/save the broker.
    5. Go to the Security tab and enter the credentials for the topic you created in Databus Configurator.
      Default credentials: admin/admin (change these for non-demo or production use).
    6. Click Done to save your configuration.
  9. Configure the second mqtt in node.
    1. Double-click the second mqtt in node to open its properties.
    2. In the Topic field, enter /winccoa/System1/MQTTPUBLISHER/S7/Maschine_Nachbereitung/Sensor_01.
      This is a tag published by the WinCC OA project.
    3. Click Done to save your configuration.
  10. Configure the mqtt out node to publish data back to WinCC OA.
    1. Double-click the mqtt out node to open its properties.
    2. In the Topic field, enter /winccoa/myTag.
    3. Click Done to save your configuration.
    4. Click Deploy to apply the changes.

    If you used the default values and the WinCC OA project is running, you should now see values in the debug window of the Flow Creator.

    If you do not see any values, you may need to adjust the configuration in the WinCC OA project, see. Instructions for this are provided in the following steps.

Configure WinCC OA to provide MQTT Data for the Databus

Set up, configure, and connect a WinCC OA project on an Edge Device and an engineering station.

  1. Log in to your Edge Device and open the WinCC OA (x86) App UI.
  2. Log in using the default credentials.
    User: admin, Password: admin
    Important:
    You will be asked to change the password and log in again. Make sure to remember your new password. If you forget it, you will need to reset the volumes.
  3. Go to the Upload card and install the demo project.
  4. Click the Download button to download the project. You will configure it later on the engineering station.
  5. Start the project by clicking the Start button.

    In the Console tab, check if the project has started successfully.

  6. Check the project status in the WinCC OA Console tab.

    All managers, except the User Interface managers, should show a green LED.

    Note:
    If you are only using default values for demonstration purposes, you can skip the following steps for configuring an MQTT client and continue here.
  7. Switch to your engineering station and extract the downloaded demo project.
  8. Start WinCC OA 3.20 Project Administration.
  9. Register a new project and select the folder where you extracted the demo project.

    For more details on registering a WinCC OA project, see Register project

  10. Edit the project configuration file.
    1. Click Edit config file, enable mxProxy = none, and save the file.
    2. Double-click the User Interface manager and update the IP addresses for -event and -data to match the IP address and ports of your Edge Device.
  11. Connect remotely to the project running on the Edge Device.
    Start the manager by clicking Start. With Remote UI, you can work directly on the device project, but some features may be limited.
  12. Open GEDI and adjust the MQTT Publisher settings if you did not use the default values.

    If you changed the credentials or root topic from the defaults, update them here. To re-establish the connection: clear Establish connection, click Apply, enable it again, and click Apply once more.

  13. Update the MQTT Client settings if you changed the user or password from the defaults.
  14. Close the project when you finish remote engineering.
  15. Check that data is streaming correctly in Flow Creator.

    If everything is set up correctly, you should see a stream of values in the Flow Creator UI.

Validate Live Data in the Dashboard

Access the Dashboard of the project, add a data widget, and verify that live data values are displayed correctly.

  1. Check if the MQTT tag published in Flow Creator is received in the Dashboard.
    1. Go to the WinCC OA Administration App and open the Dashboard UI by clocking the Go To Link button of your newly uploaded WinCC OA Demo Project.
  2. Accept the certificate and log in to the Dashboard UI.
  3. After logging in, create and set up a new dashboard.
    1. Add a new dashboard and open it.
    2. Click Edit to add a widget.
    3. Select the Label widget.
    4. Use the Search Loupe in the Datapoint Element to find and select the tag Test.TestValue, which is connected to the Databus via MQTTClient.
  4. Check the widget preview and save the dashboard.

    The value should update in the widget preview on the right side. Click Save to complete the process and store the dashboard configuration.

Live values confirm that data is flowing successfully through MQTT and Flow Creator.